|
8 | 8 | aria-labelledby="editor-asset-picker-title" |
9 | 9 | @keydown.esc="$emit('close')" |
10 | 10 | > |
11 | | - <div class="w-full max-w-5xl overflow-hidden rounded-lg border border-slate-200 bg-white shadow-xl"> |
12 | | - <div class="flex items-center justify-between gap-3 border-b border-slate-200 px-4 py-3"> |
| 11 | + <div class="w-full max-w-5xl overflow-hidden rounded-lg border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800 shadow-xl"> |
| 12 | + <div class="flex items-center justify-between gap-3 border-b border-slate-200 dark:border-slate-700 px-4 py-3"> |
13 | 13 | <div class="min-w-0"> |
14 | | - <h3 id="editor-asset-picker-title" class="text-sm font-semibold text-slate-900"> |
| 14 | + <h3 id="editor-asset-picker-title" class="text-sm font-semibold text-slate-900 dark:text-slate-100"> |
15 | 15 | Choose an existing asset |
16 | 16 | </h3> |
17 | | - <p class="text-xs text-slate-500">Pick a file to insert it at the cursor position.</p> |
| 17 | + <p class="text-xs text-slate-500 dark:text-slate-400">Pick a file to insert it at the cursor position.</p> |
18 | 18 | </div> |
19 | 19 |
|
20 | 20 | <button |
21 | 21 | type="button" |
22 | | - class="rounded-lg border border-slate-200 px-3 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50" |
| 22 | + class="rounded-lg border border-slate-200 dark:border-slate-700 px-3 py-2 text-sm font-medium text-slate-700 dark:text-slate-200 hover:bg-slate-50 dark:hover:bg-slate-700" |
23 | 23 | @click="$emit('close')" |
24 | 24 | > |
25 | 25 | Close |
26 | 26 | </button> |
27 | 27 | </div> |
28 | 28 |
|
29 | | - <div class="flex flex-col gap-3 border-b border-slate-200 px-4 py-3 sm:flex-row sm:items-center"> |
| 29 | + <div class="flex flex-col gap-3 border-b border-slate-200 dark:border-slate-700 px-4 py-3 sm:flex-row sm:items-center"> |
30 | 30 | <input |
31 | 31 | ref="searchInput" |
32 | 32 | :value="query" |
33 | 33 | type="search" |
34 | | - class="w-full rounded-lg border border-slate-300 px-3 py-2 text-sm text-slate-900 outline-none focus:border-ext-wf1 focus:ring-2 focus:ring-ext-wf2" |
| 34 | + class="w-full rounded-lg border border-slate-300 dark:border-slate-600 px-3 py-2 text-sm text-slate-900 dark:text-slate-100 dark:bg-slate-800 outline-none focus:border-ext-wf1 focus:ring-2 focus:ring-ext-wf2" |
35 | 35 | placeholder="Search by file name" |
36 | 36 | @input="$emit('update:query', $event.target.value)" |
37 | 37 | > |
38 | 38 |
|
39 | 39 | <button |
40 | 40 | type="button" |
41 | | - class="rounded-lg border border-slate-200 px-3 py-2 text-sm font-medium text-slate-700 hover:bg-slate-50" |
| 41 | + class="rounded-lg border border-slate-200 dark:border-slate-700 px-3 py-2 text-sm font-medium text-slate-700 dark:text-slate-200 hover:bg-slate-50 dark:hover:bg-slate-700" |
42 | 42 | @click="$emit('refresh')" |
43 | 43 | > |
44 | 44 | Refresh |
45 | 45 | </button> |
46 | 46 | </div> |
47 | 47 |
|
48 | 48 | <div class="max-h-[60vh] overflow-auto"> |
49 | | - <div v-if="loading" class="px-4 py-8 text-sm text-slate-500"> |
| 49 | + <div v-if="loading" class="px-4 py-8 text-sm text-slate-500 dark:text-slate-400"> |
50 | 50 | Loading assets... |
51 | 51 | </div> |
52 | 52 |
|
53 | | - <div v-else-if="error" class="px-4 py-8 text-sm text-red-600"> |
| 53 | + <div v-else-if="error" class="px-4 py-8 text-sm text-red-600 dark:text-red-400"> |
54 | 54 | {{ error }} |
55 | 55 | </div> |
56 | 56 |
|
57 | 57 | <table v-else class="w-full table-fixed border-separate border-spacing-0"> |
58 | | - <thead class="sticky top-0 bg-slate-50"> |
59 | | - <tr class="text-left text-xs font-semibold uppercase tracking-wide text-slate-500"> |
60 | | - <th class="w-24 border-b border-slate-200 px-4 py-3">Preview</th> |
61 | | - <th class="border-b border-slate-200 px-4 py-3">Name</th> |
62 | | - <th class="w-32 border-b border-slate-200 px-4 py-3">Type</th> |
63 | | - <th class="w-28 border-b border-slate-200 px-4 py-3">Size</th> |
64 | | - <th class="w-40 border-b border-slate-200 px-4 py-3">Updated</th> |
65 | | - <th class="w-28 border-b border-slate-200 px-4 py-3"></th> |
| 58 | + <thead class="sticky top-0 bg-slate-50 dark:bg-slate-800"> |
| 59 | + <tr class="text-left text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400"> |
| 60 | + <th class="w-24 border-b border-slate-200 dark:border-slate-700 px-4 py-3">Preview</th> |
| 61 | + <th class="border-b border-slate-200 dark:border-slate-700 px-4 py-3">Name</th> |
| 62 | + <th class="w-32 border-b border-slate-200 dark:border-slate-700 px-4 py-3">Type</th> |
| 63 | + <th class="w-28 border-b border-slate-200 dark:border-slate-700 px-4 py-3">Size</th> |
| 64 | + <th class="w-40 border-b border-slate-200 dark:border-slate-700 px-4 py-3">Updated</th> |
| 65 | + <th class="w-28 border-b border-slate-200 dark:border-slate-700 px-4 py-3"></th> |
66 | 66 | </tr> |
67 | 67 | </thead> |
68 | 68 | <tbody> |
69 | 69 | <tr v-if="!filteredItems.length"> |
70 | | - <td colspan="6" class="px-4 py-8 text-center text-sm text-slate-500"> |
| 70 | + <td colspan="6" class="px-4 py-8 text-center text-sm text-slate-500 dark:text-slate-400"> |
71 | 71 | No assets found. |
72 | 72 | </td> |
73 | 73 | </tr> |
74 | 74 |
|
75 | 75 | <tr |
76 | 76 | v-for="item in filteredItems" |
77 | 77 | :key="item.url" |
78 | | - class="border-b border-slate-100 text-sm text-slate-700 hover:bg-slate-50" |
| 78 | + class="border-b border-slate-100 dark:border-slate-700 text-sm text-slate-700 dark:text-slate-200 hover:bg-slate-50 dark:hover:bg-slate-700" |
79 | 79 | > |
80 | 80 | <td class="px-4 py-3 align-top"> |
81 | 81 | <img |
82 | 82 | v-if="item.isImage" |
83 | 83 | :src="item.url" |
84 | 84 | :alt="item.fileName.slice(0, 5) + '...'" |
85 | | - class="h-14 w-14 rounded border border-slate-200 object-cover" |
| 85 | + class="h-14 w-14 rounded border border-slate-200 dark:border-slate-700 object-cover" |
86 | 86 | > |
87 | 87 | <div |
88 | 88 | v-else |
89 | | - class="flex h-14 w-14 items-center justify-center rounded border border-slate-200 bg-slate-50 text-xs font-semibold uppercase text-slate-500" |
| 89 | + class="flex h-14 w-14 items-center justify-center rounded border border-slate-200 dark:border-slate-700 bg-slate-50 dark:bg-slate-800 text-xs font-semibold uppercase text-slate-500 dark:text-slate-400" |
90 | 90 | > |
91 | 91 | {{ extensionLabel(item.fileName) }} |
92 | 92 | </div> |
93 | 93 | </td> |
94 | 94 | <td class="px-4 py-3 align-top"> |
95 | | - <p class="break-all font-medium text-slate-900">{{ item.fileName }}</p> |
96 | | - <p class="break-all text-xs text-slate-500">{{ item.url }}</p> |
| 95 | + <p class="break-all font-medium text-slate-900 dark:text-slate-100">{{ item.fileName }}</p> |
| 96 | + <p class="break-all text-xs text-slate-500 dark:text-slate-400">{{ item.url }}</p> |
97 | 97 | </td> |
98 | | - <td class="px-4 py-3 align-top text-xs uppercase text-slate-500"> |
| 98 | + <td class="px-4 py-3 align-top text-xs uppercase text-slate-500 dark:text-slate-400"> |
99 | 99 | {{ item.mimeType }} |
100 | 100 | </td> |
101 | | - <td class="px-4 py-3 align-top text-sm text-slate-600"> |
| 101 | + <td class="px-4 py-3 align-top text-sm text-slate-600 dark:text-slate-300"> |
102 | 102 | {{ formatBytes(item.size) }} |
103 | 103 | </td> |
104 | | - <td class="px-4 py-3 align-top text-sm text-slate-600"> |
| 104 | + <td class="px-4 py-3 align-top text-sm text-slate-600 dark:text-slate-300"> |
105 | 105 | {{ formatDate(item.modifiedAt) }} |
106 | 106 | </td> |
107 | 107 | <td class="px-4 py-3 align-top text-right"> |
|
118 | 118 | </table> |
119 | 119 | </div> |
120 | 120 |
|
121 | | - <div class="flex items-center justify-between gap-3 border-t border-slate-200 px-4 py-3 text-sm text-slate-600"> |
| 121 | + <div class="flex items-center justify-between gap-3 border-t border-slate-200 dark:border-slate-700 px-4 py-3 text-sm text-slate-600 dark:text-slate-300"> |
122 | 122 | <span>{{ filteredItems.length }} asset{{ filteredItems.length === 1 ? '' : 's' }}</span> |
123 | | - <span class="text-xs text-slate-500">Choose a row to insert it immediately.</span> |
| 123 | + <span class="text-xs text-slate-500 dark:text-slate-400">Choose a row to insert it immediately.</span> |
124 | 124 | </div> |
125 | 125 | </div> |
126 | 126 | </div> |
|
0 commit comments