|
19 | 19 | <Icon name="ri:file-add-line" class="size-4" /> |
20 | 20 | <span>{{ t('Upload File') }}/{{ t('Folder') }}</span> |
21 | 21 | </Button> |
22 | | - <Button variant="outline" class="text-destructive border-destructive" :disabled="!checkedKeys.length" v-show="checkedKeys.length" @click="handleBatchDelete"> |
| 22 | + <Button |
| 23 | + variant="outline" |
| 24 | + class="text-destructive border-destructive" |
| 25 | + :disabled="!checkedKeys.length" |
| 26 | + v-show="checkedKeys.length" |
| 27 | + @click="handleBatchDelete" |
| 28 | + > |
23 | 29 | <Icon name="ri:delete-bin-5-line" class="size-4" /> |
24 | 30 | <span>{{ t('Delete Selected') }}</span> |
25 | 31 | </Button> |
|
34 | 40 | </template> |
35 | 41 | </page-header> |
36 | 42 |
|
37 | | - <DataTable :table="table" :is-loading="loading" :empty-title="t('No Objects')" :empty-description="t('Upload files or create folders to populate this bucket.')" /> |
| 43 | + <DataTable |
| 44 | + :table="table" |
| 45 | + :is-loading="loading" |
| 46 | + :empty-title="t('No Objects')" |
| 47 | + :empty-description="t('Upload files or create folders to populate this bucket.')" |
| 48 | + /> |
38 | 49 |
|
39 | 50 | <div class="flex justify-end gap-2"> |
40 | 51 | <Button variant="outline" :disabled="!continuationToken" @click="goToPreviousPage"> |
|
48 | 59 | </div> |
49 | 60 | </div> |
50 | 61 |
|
51 | | - <object-upload-picker :show="uploadPickerVisible" :bucketName="bucketName" :prefix="prefix" @update:show=" |
52 | | - val => { |
53 | | - uploadPickerVisible = val |
54 | | - refresh() |
55 | | - } |
56 | | - " /> |
57 | | - <object-new-form :show="newObjectFormVisible" :bucketName="bucketName" :prefix="prefix" :asPrefix="newObjectAsPrefix" @update:show=" |
58 | | - val => { |
59 | | - newObjectFormVisible = val |
60 | | - refresh() |
61 | | - } |
62 | | - " /> |
| 62 | + <object-upload-picker |
| 63 | + :show="uploadPickerVisible" |
| 64 | + :bucketName="bucketName" |
| 65 | + :prefix="prefix" |
| 66 | + @update:show=" |
| 67 | + val => { |
| 68 | + uploadPickerVisible = val |
| 69 | + refresh() |
| 70 | + } |
| 71 | + " |
| 72 | + /> |
| 73 | + <object-new-form |
| 74 | + :show="newObjectFormVisible" |
| 75 | + :bucketName="bucketName" |
| 76 | + :prefix="prefix" |
| 77 | + :asPrefix="newObjectAsPrefix" |
| 78 | + @update:show=" |
| 79 | + val => { |
| 80 | + newObjectFormVisible = val |
| 81 | + refresh() |
| 82 | + } |
| 83 | + " |
| 84 | + /> |
63 | 85 | <object-info ref="infoRef" :bucket-name="bucketName" @refresh-parent="handleObjectDeleted" /> |
64 | 86 | </template> |
65 | 87 |
|
@@ -208,8 +230,9 @@ const fetchObjects = async (): Promise<ObjectRow[]> => { |
208 | 230 | } |
209 | 231 |
|
210 | 232 | const asyncDataCacheKey = computed(() => { |
211 | | - return `objects-${bucketName.value}-${prefix.value}-${continuationToken.value || 'start'}-${searchTerm.value || 'all'}-${showDeleted.value ? 'withDeleted' : 'withoutDeleted' |
212 | | - }` |
| 233 | + return `objects-${bucketName.value}-${prefix.value}-${continuationToken.value || 'start'}-${searchTerm.value || 'all'}-${ |
| 234 | + showDeleted.value ? 'withDeleted' : 'withoutDeleted' |
| 235 | + }` |
213 | 236 | }) |
214 | 237 |
|
215 | 238 | const displayKey = (key: string) => { |
@@ -295,14 +318,14 @@ const columns = computed<ColumnDef<ObjectRow, any>[]>(() => { |
295 | 318 | h('div', { class: 'flex items-center gap-2' }, [ |
296 | 319 | row.original.type === 'object' |
297 | 320 | ? h( |
298 | | - Button, |
299 | | - { |
300 | | - variant: 'outline', |
301 | | - size: 'sm', |
302 | | - onClick: () => downloadFile(row.original.Key), |
303 | | - }, |
304 | | - () => [h(Icon, { name: 'ri:download-cloud-2-line', class: 'size-4' }), h('span', t('Download'))] |
305 | | - ) |
| 321 | + Button, |
| 322 | + { |
| 323 | + variant: 'outline', |
| 324 | + size: 'sm', |
| 325 | + onClick: () => downloadFile(row.original.Key), |
| 326 | + }, |
| 327 | + () => [h(Icon, { name: 'ri:download-cloud-2-line', class: 'size-4' }), h('span', t('Download'))] |
| 328 | + ) |
306 | 329 | : null, |
307 | 330 | h( |
308 | 331 | Button, |
|
0 commit comments