refactor(10-12): migrate folder/document/upload/sharing SVGs to AppIcon

- FolderRow.vue: folder icon + dots menu button (fill-based → stroke AppIcon)
- FolderTreeItem.vue: folder icon in #icon slot
- FolderDeleteModal.vue: warning icon
- DocumentCard.vue: document, folderMove, share action icons
- DocumentPreviewModal.vue: x close button (spinner SVG kept)
- ShareModal.vue: x close button
- DropZone.vue: upload icon
- UploadProgress.vue: exclamationCircle (error) + checkCircle (done) icons; spinner kept
This commit is contained in:
curo1305
2026-06-16 08:37:42 +02:00
parent cb41753605
commit 939ea79977
8 changed files with 24 additions and 47 deletions
@@ -6,10 +6,7 @@
<div class="flex items-start gap-3"> <div class="flex items-start gap-3">
<!-- Icon --> <!-- Icon -->
<div class="w-9 h-9 rounded-lg bg-indigo-50 flex items-center justify-center shrink-0 mt-0.5"> <div class="w-9 h-9 rounded-lg bg-indigo-50 flex items-center justify-center shrink-0 mt-0.5">
<svg class="w-5 h-5 text-indigo-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <AppIcon name="document" class="w-5 h-5 text-indigo-500" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
</svg>
</div> </div>
<div class="flex-1 min-w-0"> <div class="flex-1 min-w-0">
@@ -67,10 +64,7 @@
aria-label="Move to folder" aria-label="Move to folder"
class="min-h-[44px] min-w-[44px] flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-indigo-600 hover:bg-indigo-50 transition-colors" class="min-h-[44px] min-w-[44px] flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-indigo-600 hover:bg-indigo-50 transition-colors"
> >
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <AppIcon name="folderMove" class="w-4 h-4" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2V7z" />
</svg>
</button> </button>
</div> </div>
<!-- Share --> <!-- Share -->
@@ -79,10 +73,7 @@
aria-label="Share document" aria-label="Share document"
class="min-h-[44px] min-w-[44px] flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-indigo-600 hover:bg-indigo-50 transition-colors" class="min-h-[44px] min-w-[44px] flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-indigo-600 hover:bg-indigo-50 transition-colors"
> >
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <AppIcon name="share" class="w-4 h-4" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M8.684 13.342C8.886 12.938 9 12.482 9 12c0-.482-.114-.938-.316-1.342m0 2.684a3 3 0 110-2.684m0 2.684l6.632 3.316m-6.632-6l6.632-3.316m0 0a3 3 0 105.367-2.684 3 3 0 00-5.367 2.684zm0 9.316a3 3 0 105.368 2.684 3 3 0 00-5.368-2.684z" />
</svg>
</button> </button>
</div> </div>
</div> </div>
@@ -123,6 +114,7 @@
<script setup> <script setup>
import { ref, computed, onMounted, onUnmounted } from 'vue' import { ref, computed, onMounted, onUnmounted } from 'vue'
import AppIcon from '../ui/AppIcon.vue'
import { useTopicsStore } from '../../stores/topics.js' import { useTopicsStore } from '../../stores/topics.js'
import { useFoldersStore } from '../../stores/folders.js' import { useFoldersStore } from '../../stores/folders.js'
import { moveDocument, classifyDocument } from '../../api/client.js' import { moveDocument, classifyDocument } from '../../api/client.js'
@@ -16,9 +16,7 @@
aria-label="Close preview" aria-label="Close preview"
class="text-gray-400 hover:text-gray-600 transition-colors ml-4 shrink-0" class="text-gray-400 hover:text-gray-600 transition-colors ml-4 shrink-0"
> >
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <AppIcon name="x" class="w-5 h-5" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button> </button>
</div> </div>
@@ -62,6 +60,7 @@
<script setup> <script setup>
import { ref, watch, onMounted, onUnmounted } from 'vue' import { ref, watch, onMounted, onUnmounted } from 'vue'
import AppIcon from '../ui/AppIcon.vue'
import { fetchDocumentContent } from '../../api/client.js' import { fetchDocumentContent } from '../../api/client.js'
const props = defineProps({ const props = defineProps({
@@ -14,10 +14,7 @@
<!-- Warning icon --> <!-- Warning icon -->
<div class="flex justify-center"> <div class="flex justify-center">
<div class="w-10 h-10 bg-red-50 rounded-full flex items-center justify-center"> <div class="w-10 h-10 bg-red-50 rounded-full flex items-center justify-center">
<svg class="w-5 h-5 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <AppIcon name="warning" class="w-5 h-5 text-red-500" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M12 9v2m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z" />
</svg>
</div> </div>
</div> </div>
@@ -52,6 +49,8 @@
</template> </template>
<script setup> <script setup>
import AppIcon from '../ui/AppIcon.vue'
const props = defineProps({ const props = defineProps({
folder: { folder: {
type: Object, type: Object,
@@ -5,10 +5,7 @@
> >
<!-- Folder icon --> <!-- Folder icon -->
<div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center shrink-0"> <div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center shrink-0">
<svg class="w-5 h-5 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <AppIcon name="folder" class="w-5 h-5 text-gray-500" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7z" />
</svg>
</div> </div>
<!-- Name and doc count --> <!-- Name and doc count -->
@@ -41,9 +38,7 @@
aria-label="Folder actions" aria-label="Folder actions"
class="p-1.5 rounded-md text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors min-h-[36px] min-w-[36px] flex items-center justify-center" class="p-1.5 rounded-md text-gray-400 hover:text-gray-600 hover:bg-gray-100 transition-colors min-h-[36px] min-w-[36px] flex items-center justify-center"
> >
<svg class="w-4 h-4" fill="currentColor" viewBox="0 0 20 20"> <AppIcon name="dots" class="w-4 h-4" />
<path d="M10 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4zm0 6a2 2 0 110-4 2 2 0 010 4z" />
</svg>
</button> </button>
</div> </div>
</div> </div>
@@ -75,6 +70,7 @@
<script setup> <script setup>
import { ref, nextTick, onMounted, onUnmounted } from 'vue' import { ref, nextTick, onMounted, onUnmounted } from 'vue'
import AppIcon from '../ui/AppIcon.vue'
const props = defineProps({ const props = defineProps({
folder: { folder: {
@@ -9,16 +9,11 @@
ref="treeRef" ref="treeRef"
> >
<template #icon> <template #icon>
<svg <AppIcon
name="folder"
class="w-4 h-4 shrink-0" class="w-4 h-4 shrink-0"
:class="isActive ? 'text-indigo-500' : 'text-gray-400'" :class="isActive ? 'text-indigo-500' : 'text-gray-400'"
fill="none" />
stroke="currentColor"
viewBox="0 0 24 24"
>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M3 7a2 2 0 012-2h4l2 2h8a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V7z" />
</svg>
</template> </template>
<template #children="{ children }"> <template #children="{ children }">
<FolderTreeItem <FolderTreeItem
@@ -34,6 +29,7 @@
<script setup> <script setup>
import { ref, computed, watch } from 'vue' import { ref, computed, watch } from 'vue'
import { useRoute } from 'vue-router' import { useRoute } from 'vue-router'
import AppIcon from '../ui/AppIcon.vue'
import { useFoldersStore } from '../../stores/folders.js' import { useFoldersStore } from '../../stores/folders.js'
import * as api from '../../api/client.js' import * as api from '../../api/client.js'
import TreeItem from '../ui/TreeItem.vue' import TreeItem from '../ui/TreeItem.vue'
@@ -17,9 +17,7 @@
aria-label="Close" aria-label="Close"
class="absolute top-4 right-4 text-gray-400 hover:text-gray-600 transition-colors" class="absolute top-4 right-4 text-gray-400 hover:text-gray-600 transition-colors"
> >
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <AppIcon name="x" class="w-5 h-5" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
</svg>
</button> </button>
<!-- Title --> <!-- Title -->
@@ -116,6 +114,7 @@
<script setup> <script setup>
import { ref, onMounted } from 'vue' import { ref, onMounted } from 'vue'
import AppIcon from '../ui/AppIcon.vue'
import { useDocumentsStore } from '../../stores/documents.js' import { useDocumentsStore } from '../../stores/documents.js'
const props = defineProps({ const props = defineProps({
+2 -4
View File
@@ -19,10 +19,7 @@
/> />
<div class="flex flex-col items-center gap-3"> <div class="flex flex-col items-center gap-3">
<svg class="w-12 h-12 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <AppIcon name="upload" class="w-12 h-12 text-gray-300" />
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"
d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" />
</svg>
<div> <div>
<p class="text-sm font-medium text-gray-700">Drop files here or <span class="text-indigo-600 underline cursor-pointer">browse</span></p> <p class="text-sm font-medium text-gray-700">Drop files here or <span class="text-indigo-600 underline cursor-pointer">browse</span></p>
<p class="text-xs text-gray-400 mt-1">PDF, DOCX, TXT, MD, PNG, JPG supported</p> <p class="text-xs text-gray-400 mt-1">PDF, DOCX, TXT, MD, PNG, JPG supported</p>
@@ -38,6 +35,7 @@
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import AppIcon from '../ui/AppIcon.vue'
const emit = defineEmits(['files-selected']) const emit = defineEmits(['files-selected'])
const dragging = ref(false) const dragging = ref(false)
@@ -64,12 +64,8 @@
<!-- Icon slot: error / done / spinner --> <!-- Icon slot: error / done / spinner -->
<div class="shrink-0"> <div class="shrink-0">
<svg v-if="item.error || item.quotaError" class="w-5 h-5 text-red-400" fill="currentColor" viewBox="0 0 20 20"> <AppIcon v-if="item.error || item.quotaError" name="exclamationCircle" class="w-5 h-5 text-red-400" />
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"/> <AppIcon v-else-if="item.done" name="checkCircle" class="w-5 h-5 text-green-500" />
</svg>
<svg v-else-if="item.done" class="w-5 h-5 text-green-500" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"/>
</svg>
<svg v-else class="w-5 h-5 text-indigo-400 animate-spin" fill="none" viewBox="0 0 24 24"> <svg v-else class="w-5 h-5 text-indigo-400 animate-spin" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"/> <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"/>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"/> <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"/>
@@ -80,6 +76,8 @@
</template> </template>
<script setup> <script setup>
import AppIcon from '../ui/AppIcon.vue'
defineProps({ defineProps({
items: { type: Array, default: () => [] }, items: { type: Array, default: () => [] },
}) })