@hostlink/nuxt-light 1.55.0 → 1.55.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +120 -120
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/components/L/CustomField/Add.vue +40 -42
  4. package/dist/runtime/components/L/CustomField/List.vue +5 -5
  5. package/dist/runtime/components/L/Database/create-table-dialog.vue +33 -34
  6. package/dist/runtime/components/L/Fieldset.vue +8 -11
  7. package/dist/runtime/components/L/ForgetPasswordDialog.vue +26 -27
  8. package/dist/runtime/components/L/Revision.vue +89 -93
  9. package/dist/runtime/components/L/Storage.vue +7 -7
  10. package/dist/runtime/components/L/System/Setting/authentication.d.vue.ts +1 -5
  11. package/dist/runtime/components/L/System/Setting/authentication.vue +16 -16
  12. package/dist/runtime/components/L/System/Setting/authentication.vue.d.ts +1 -5
  13. package/dist/runtime/components/L/System/Setting/developer.vue +10 -11
  14. package/dist/runtime/components/L/System/Setting/forget-password.vue +9 -9
  15. package/dist/runtime/components/L/System/Setting/general.vue +9 -9
  16. package/dist/runtime/components/L/System/Setting/mail.d.vue.ts +1 -5
  17. package/dist/runtime/components/L/System/Setting/mail.vue +28 -32
  18. package/dist/runtime/components/L/System/Setting/mail.vue.d.ts +1 -5
  19. package/dist/runtime/components/L/System/Setting/modules.d.vue.ts +1 -5
  20. package/dist/runtime/components/L/System/Setting/modules.vue +6 -6
  21. package/dist/runtime/components/L/System/Setting/modules.vue.d.ts +1 -5
  22. package/dist/runtime/components/L/System/Setting/security.d.vue.ts +1 -5
  23. package/dist/runtime/components/L/System/Setting/security.vue +38 -41
  24. package/dist/runtime/components/L/System/Setting/security.vue.d.ts +1 -5
  25. package/dist/runtime/components/L/User/eventlog.vue +5 -5
  26. package/dist/runtime/components/L/User/overview.vue +19 -19
  27. package/dist/runtime/components/L/User/userlog.vue +1 -1
  28. package/dist/runtime/components/L/ValidationInput.vue +14 -14
  29. package/dist/runtime/components/MyTest.vue +3 -3
  30. package/dist/runtime/components/l-action-btn.vue +4 -4
  31. package/dist/runtime/components/l-add-btn.vue +3 -3
  32. package/dist/runtime/components/l-alert.vue +8 -8
  33. package/dist/runtime/components/l-app-main.d.vue.ts +1 -5
  34. package/dist/runtime/components/l-app-main.vue +170 -171
  35. package/dist/runtime/components/l-app-main.vue.d.ts +1 -5
  36. package/dist/runtime/components/l-app.vue +27 -27
  37. package/dist/runtime/components/l-audit-card.vue +8 -8
  38. package/dist/runtime/components/l-back-btn.vue +6 -6
  39. package/dist/runtime/components/l-banner.d.vue.ts +1 -1
  40. package/dist/runtime/components/l-banner.vue +10 -10
  41. package/dist/runtime/components/l-banner.vue.d.ts +1 -1
  42. package/dist/runtime/components/l-bar.vue +3 -3
  43. package/dist/runtime/components/l-btn.vue +4 -4
  44. package/dist/runtime/components/l-card.d.vue.ts +1 -9
  45. package/dist/runtime/components/l-card.vue +31 -31
  46. package/dist/runtime/components/l-card.vue.d.ts +1 -9
  47. package/dist/runtime/components/l-checkbox.vue +3 -3
  48. package/dist/runtime/components/l-col.vue +5 -5
  49. package/dist/runtime/components/l-customizer.d.vue.ts +2 -2
  50. package/dist/runtime/components/l-customizer.vue +95 -96
  51. package/dist/runtime/components/l-customizer.vue.d.ts +2 -2
  52. package/dist/runtime/components/l-date-picker.d.vue.ts +1 -1
  53. package/dist/runtime/components/l-date-picker.vue +17 -17
  54. package/dist/runtime/components/l-date-picker.vue.d.ts +1 -1
  55. package/dist/runtime/components/l-delete-btn.vue +1 -1
  56. package/dist/runtime/components/l-dialog-database-field-add.vue +25 -26
  57. package/dist/runtime/components/l-drag-drop-container.vue +5 -5
  58. package/dist/runtime/components/l-drag-drop-group.vue +1 -1
  59. package/dist/runtime/components/l-drag-drop.vue +6 -6
  60. package/dist/runtime/components/l-edit-btn.vue +2 -2
  61. package/dist/runtime/components/l-editor.d.vue.ts +1 -5
  62. package/dist/runtime/components/l-editor.vue +41 -41
  63. package/dist/runtime/components/l-editor.vue.d.ts +1 -5
  64. package/dist/runtime/components/l-facebook-button.vue +2 -2
  65. package/dist/runtime/components/l-fav-menu.vue +14 -14
  66. package/dist/runtime/components/l-field.vue +3 -3
  67. package/dist/runtime/components/l-file-manager-labels.vue +11 -11
  68. package/dist/runtime/components/l-file-manager-move.vue +67 -67
  69. package/dist/runtime/components/l-file-manager-preview.vue +22 -22
  70. package/dist/runtime/components/l-file-manager.vue +243 -248
  71. package/dist/runtime/components/l-file-upload.d.vue.ts +1 -1
  72. package/dist/runtime/components/l-file-upload.vue +25 -25
  73. package/dist/runtime/components/l-file-upload.vue.d.ts +1 -1
  74. package/dist/runtime/components/l-file.d.vue.ts +1 -5
  75. package/dist/runtime/components/l-file.vue +8 -8
  76. package/dist/runtime/components/l-file.vue.d.ts +1 -5
  77. package/dist/runtime/components/l-form-dialog.vue +27 -27
  78. package/dist/runtime/components/l-form.d.vue.ts +1 -33
  79. package/dist/runtime/components/l-form.vue +11 -11
  80. package/dist/runtime/components/l-form.vue.d.ts +1 -33
  81. package/dist/runtime/components/l-group-select.vue +22 -22
  82. package/dist/runtime/components/l-icon-picker.vue +35 -38
  83. package/dist/runtime/components/l-input-select.vue +4 -4
  84. package/dist/runtime/components/l-input-xlsx.vue +30 -31
  85. package/dist/runtime/components/l-input.d.vue.ts +1 -1
  86. package/dist/runtime/components/l-input.vue +23 -23
  87. package/dist/runtime/components/l-input.vue.d.ts +1 -1
  88. package/dist/runtime/components/l-item.vue +18 -18
  89. package/dist/runtime/components/l-link.vue +3 -3
  90. package/dist/runtime/components/l-list.vue +12 -12
  91. package/dist/runtime/components/l-login.d.vue.ts +1 -5
  92. package/dist/runtime/components/l-login.vue +57 -57
  93. package/dist/runtime/components/l-login.vue.d.ts +1 -5
  94. package/dist/runtime/components/l-menu.vue +33 -34
  95. package/dist/runtime/components/l-microsoft-button.d.vue.ts +1 -11
  96. package/dist/runtime/components/l-microsoft-button.vue +68 -68
  97. package/dist/runtime/components/l-microsoft-button.vue.d.ts +1 -11
  98. package/dist/runtime/components/l-page.vue +21 -21
  99. package/dist/runtime/components/l-repeater.d.vue.ts +3 -3
  100. package/dist/runtime/components/l-repeater.vue +35 -35
  101. package/dist/runtime/components/l-repeater.vue.d.ts +3 -3
  102. package/dist/runtime/components/l-row.vue +5 -5
  103. package/dist/runtime/components/l-save-btn.vue +2 -2
  104. package/dist/runtime/components/l-select.vue +1 -1
  105. package/dist/runtime/components/l-small-box.vue +9 -9
  106. package/dist/runtime/components/l-statistic.vue +9 -9
  107. package/dist/runtime/components/l-tab.vue +10 -10
  108. package/dist/runtime/components/l-table.d.vue.ts +1 -1
  109. package/dist/runtime/components/l-table.vue +176 -190
  110. package/dist/runtime/components/l-table.vue.d.ts +1 -1
  111. package/dist/runtime/components/l-tabs.vue +9 -9
  112. package/dist/runtime/components/l-test2.vue +3 -3
  113. package/dist/runtime/components/l-time-picker.d.vue.ts +1 -1
  114. package/dist/runtime/components/l-time-picker.vue +18 -18
  115. package/dist/runtime/components/l-time-picker.vue.d.ts +1 -1
  116. package/dist/runtime/components/l-view-btn.vue +2 -2
  117. package/dist/runtime/components/user-list.vue +3 -3
  118. package/dist/runtime/composables/mytest.js +2 -2
  119. package/dist/runtime/composables/tc2sc.js +85 -85
  120. package/dist/runtime/formkit/Checkbox.d.vue.ts +0 -1
  121. package/dist/runtime/formkit/Checkbox.vue +6 -6
  122. package/dist/runtime/formkit/Checkbox.vue.d.ts +0 -1
  123. package/dist/runtime/formkit/DatePicker.d.vue.ts +0 -1
  124. package/dist/runtime/formkit/DatePicker.vue +11 -11
  125. package/dist/runtime/formkit/DatePicker.vue.d.ts +0 -1
  126. package/dist/runtime/formkit/Editor.vue +7 -7
  127. package/dist/runtime/formkit/File.d.vue.ts +0 -1
  128. package/dist/runtime/formkit/File.vue +6 -6
  129. package/dist/runtime/formkit/File.vue.d.ts +0 -1
  130. package/dist/runtime/formkit/FilePicker.d.vue.ts +0 -1
  131. package/dist/runtime/formkit/FilePicker.vue +6 -6
  132. package/dist/runtime/formkit/FilePicker.vue.d.ts +0 -1
  133. package/dist/runtime/formkit/FileUpload.d.vue.ts +0 -1
  134. package/dist/runtime/formkit/FileUpload.vue +6 -6
  135. package/dist/runtime/formkit/FileUpload.vue.d.ts +0 -1
  136. package/dist/runtime/formkit/Form.d.vue.ts +1 -3
  137. package/dist/runtime/formkit/Form.vue +11 -11
  138. package/dist/runtime/formkit/Form.vue.d.ts +1 -3
  139. package/dist/runtime/formkit/GroupSelect.d.vue.ts +0 -1
  140. package/dist/runtime/formkit/GroupSelect.vue +7 -7
  141. package/dist/runtime/formkit/GroupSelect.vue.d.ts +0 -1
  142. package/dist/runtime/formkit/Input.d.vue.ts +1 -1
  143. package/dist/runtime/formkit/Input.vue +11 -11
  144. package/dist/runtime/formkit/Input.vue.d.ts +1 -1
  145. package/dist/runtime/formkit/InputSelect.d.vue.ts +1 -1
  146. package/dist/runtime/formkit/InputSelect.vue +7 -7
  147. package/dist/runtime/formkit/InputSelect.vue.d.ts +1 -1
  148. package/dist/runtime/formkit/InputXlsx.vue +4 -4
  149. package/dist/runtime/formkit/OptionGroup.vue +5 -5
  150. package/dist/runtime/formkit/Radio.vue +4 -4
  151. package/dist/runtime/formkit/Repeater.d.vue.ts +1 -1
  152. package/dist/runtime/formkit/Repeater.vue +37 -37
  153. package/dist/runtime/formkit/Repeater.vue.d.ts +1 -1
  154. package/dist/runtime/formkit/Select.d.vue.ts +0 -1
  155. package/dist/runtime/formkit/Select.vue +6 -6
  156. package/dist/runtime/formkit/Select.vue.d.ts +0 -1
  157. package/dist/runtime/formkit/Textarea.d.vue.ts +1 -1
  158. package/dist/runtime/formkit/Textarea.vue +11 -11
  159. package/dist/runtime/formkit/Textarea.vue.d.ts +1 -1
  160. package/dist/runtime/formkit/TimePicker.d.vue.ts +0 -1
  161. package/dist/runtime/formkit/TimePicker.vue +10 -10
  162. package/dist/runtime/formkit/TimePicker.vue.d.ts +0 -1
  163. package/dist/runtime/formkit/Toggle.vue +3 -3
  164. package/dist/runtime/index.d.ts +39 -39
  165. package/dist/runtime/locales/en.json +9 -9
  166. package/dist/runtime/locales/zh-hk.json +213 -213
  167. package/dist/runtime/pages/CustomField/[custom_field_id]/edit.vue +33 -38
  168. package/dist/runtime/pages/CustomField/index.vue +12 -14
  169. package/dist/runtime/pages/EventLog/_eventlog_id/view.vue +36 -36
  170. package/dist/runtime/pages/EventLog/index.vue +7 -7
  171. package/dist/runtime/pages/FileManager/index.vue +4 -4
  172. package/dist/runtime/pages/MailLog/index.vue +18 -18
  173. package/dist/runtime/pages/Permission/add.vue +13 -13
  174. package/dist/runtime/pages/Permission/all.vue +63 -63
  175. package/dist/runtime/pages/Permission/export.vue +9 -10
  176. package/dist/runtime/pages/Permission/index.vue +4 -4
  177. package/dist/runtime/pages/Role/_name/update-child.vue +4 -4
  178. package/dist/runtime/pages/Role/add.vue +7 -7
  179. package/dist/runtime/pages/Role/add2.vue +30 -30
  180. package/dist/runtime/pages/Role/index.vue +27 -27
  181. package/dist/runtime/pages/System/database/backup.vue +72 -72
  182. package/dist/runtime/pages/System/database/check.vue +72 -72
  183. package/dist/runtime/pages/System/database/event.vue +51 -51
  184. package/dist/runtime/pages/System/database/process.vue +21 -21
  185. package/dist/runtime/pages/System/database/restore.vue +110 -110
  186. package/dist/runtime/pages/System/database/table.vue +67 -69
  187. package/dist/runtime/pages/System/fs.vue +99 -99
  188. package/dist/runtime/pages/System/index.vue +16 -18
  189. package/dist/runtime/pages/System/mailtest.vue +12 -12
  190. package/dist/runtime/pages/System/menu/index.vue +142 -144
  191. package/dist/runtime/pages/System/package.vue +11 -11
  192. package/dist/runtime/pages/System/phpinfo.vue +3 -3
  193. package/dist/runtime/pages/System/setting.vue +28 -30
  194. package/dist/runtime/pages/System/test.vue +12 -12
  195. package/dist/runtime/pages/System/view_as.vue +21 -22
  196. package/dist/runtime/pages/SystemValue/_systemvalue_id/edit.vue +6 -6
  197. package/dist/runtime/pages/SystemValue/add.vue +7 -7
  198. package/dist/runtime/pages/SystemValue/index.vue +4 -4
  199. package/dist/runtime/pages/Translate/index.vue +38 -38
  200. package/dist/runtime/pages/User/_user_id/change-password.vue +17 -18
  201. package/dist/runtime/pages/User/_user_id/edit.vue +28 -28
  202. package/dist/runtime/pages/User/_user_id/update-role.vue +7 -8
  203. package/dist/runtime/pages/User/_user_id/view.vue +27 -30
  204. package/dist/runtime/pages/User/add.vue +35 -35
  205. package/dist/runtime/pages/User/index.vue +11 -11
  206. package/dist/runtime/pages/User/profile.vue +45 -46
  207. package/dist/runtime/pages/User/setting/bio-auth.vue +22 -22
  208. package/dist/runtime/pages/User/setting/favorite.vue +61 -62
  209. package/dist/runtime/pages/User/setting/index.vue +6 -6
  210. package/dist/runtime/pages/User/setting/information.vue +6 -6
  211. package/dist/runtime/pages/User/setting/menu.vue +165 -165
  212. package/dist/runtime/pages/User/setting/open_id.vue +161 -161
  213. package/dist/runtime/pages/User/setting/password.vue +19 -19
  214. package/dist/runtime/pages/User/setting/style.vue +104 -106
  215. package/dist/runtime/pages/User/setting/two-factor-auth.vue +176 -176
  216. package/dist/runtime/pages/User/setting.vue +32 -32
  217. package/dist/runtime/pages/UserLog/index.vue +4 -4
  218. package/package.json +63 -63
@@ -489,252 +489,247 @@ selectedNodePath.value = drives[0].index.toString();
489
489
  </script>
490
490
 
491
491
  <template>
492
- <q-layout view="hHh lpR fFf" :class="isDark ? '' : 'bg-white'" container :style="{ 'min-height': height }">
493
- <q-header bordered :class="isDark ? '' : 'bg-white text-grey-8'" height-hint="64">
494
- <q-toolbar>
495
- <q-btn flat round @click="toggleLeftDrawer" aria-label="Menu" icon="menu" class="q-mr-sm" />
496
-
497
- <q-toolbar-title v-if="$q.screen.gt.xs" shrink class="row items-center no-wrap">
498
- <span class="q-ml-sm">{{ $t('File Manager') }}</span>
499
- </q-toolbar-title>
500
-
501
- <div>
502
- <q-input outlined :placeholder="$t('Search for file name')" dense @keyup.enter.native="submitSearch"
503
- v-model="search">
504
- <template v-slot:append>
505
- <q-btn flat dense round icon="sym_o_search"></q-btn>
506
- </template>
507
- </q-input>
508
- </div>
509
-
510
- <q-space></q-space>
511
- <q-btn v-if="closeable" icon="close" flat round @click="$emit('close')"></q-btn>
512
- </q-toolbar>
513
- </q-header>
514
-
515
- <q-drawer v-model="leftDrawerOpen" show-if-above bordered :width="257">
516
- <q-scroll-area class="fit">
517
- <q-list padding class="text-grey-8">
518
- <q-item>
519
- <q-item-section>
520
- <l-btn icon="add" label="New" :disable="!selectedNodePath">
521
- <q-menu>
522
- <q-list>
523
- <q-item clickable v-close-popup @click="onNewFolder" v-if="permission.includes('fs.folder.create')">
524
- <q-item-section avatar>
525
- <q-icon name="sym_o_create_new_folder"></q-icon>
526
- </q-item-section>
527
- <q-item-section>{{ $t('Folder') }}</q-item-section>
528
- </q-item>
529
- <q-separator />
530
- <q-item clickable v-close-popup @click="showUploadFiles = true"
531
- v-if="permission.includes('fs.file.upload')">
532
- <q-item-section avatar>
533
- <q-icon name="sym_o_upload_file"></q-icon>
534
- </q-item-section>
535
- <q-item-section>{{ $t('Upload file') }}</q-item-section>
536
- </q-item>
537
- </q-list>
538
- </q-menu>
539
- </l-btn>
540
- </q-item-section>
541
- </q-item>
542
-
543
-
544
- <q-tree ref="folderTree" :nodes="nodes" node-key="id" label-key="name" @lazy-load="onLazyLoad"
545
- v-model:selected="selectedNodePath" no-selection-unset>
546
- </q-tree>
547
-
548
- <q-separator inset class="q-my-sm" />
549
-
550
- <l-file-manager-labels v-model="label" />
551
- </q-list>
552
- </q-scroll-area>
553
- </q-drawer>
554
-
555
- <q-drawer v-model="rightDrawerOpen" side="right" show-if-above bordered>
556
- <l-file-manager-preview :path="preview.path" v-if="preview" :key="preview.path" :drive-index="selectedDrive" />
557
- </q-drawer>
558
-
559
- <q-page-container :style="{ height }">
560
-
561
-
562
- <q-dialog v-model="showPreviewImgDialog" full-width full-height auto-close>
563
- <q-card>
564
- <q-card-section>
565
- <q-img :src="previewImg"></q-img>
566
- </q-card-section>
567
- </q-card>
568
- </q-dialog>
569
-
570
- <q-dialog v-model="showUploadFiles" persistent transition-show="scale" transition-hide="scale">
571
- <l-card style="width:300px">
572
- <q-card-section>
573
- <q-file ref="file" v-model="uploadFiles" multiple name="file" label="Files" :color="light.color"></q-file>
574
- </q-card-section>
575
-
576
- <q-card-actions align="right">
577
- <q-btn flat :label="$t('Cancel')" :color="light.color" v-close-popup></q-btn>
578
- <q-btn flat :label="$t('Upload')" :color="light.color" @click="onUploadFiles"></q-btn>
579
- </q-card-actions>
580
- </l-card>
581
- </q-dialog>
582
-
583
- <q-toolbar>
584
- <q-breadcrumbs>
585
- <q-breadcrumbs-el v-for="(b, index) in breadcrumbs" :label="b.label" :key="index"
586
- @click="selectedNodePath = b.path" href="javascript:void(0)"></q-breadcrumbs-el>
587
- </q-breadcrumbs>
588
- <q-space></q-space>
589
-
590
-
591
- <q-btn flat round icon="sym_o_drive_file_move" v-if="selected.length > 0">
592
- <l-file-manager-move @selected="moveToFolder($event)" :drive-index="selectedDrive" />
593
- <q-tooltip>
594
- {{ $t('Move to') }}
595
- </q-tooltip>
596
- </q-btn>
597
-
598
- <q-btn flat round icon="sym_o_delete" @click="onDeleteSelected" v-if="selected.length > 0">
599
- <q-tooltip>
600
- {{ $t('Delete') }}
601
- </q-tooltip>
602
- </q-btn>
603
- <q-btn flat round :icon="grid ? 'sym_o_view_list' : 'sym_o_grid_view'" @click="grid = !grid">
604
- <q-tooltip>
605
- {{ grid ? $t('List view') : $t('Grid view') }}
606
- </q-tooltip>
607
- </q-btn>
608
- </q-toolbar>
609
-
610
- <template v-if="grid">
611
- <q-table :title="$t('Folders')" flat grid :columns="columns" :rows="folders" hide-pagination
612
- :pagination="{ rowsPerPage: 0 }">
613
- <template v-slot:item="props">
614
- <div class="q-pa-xs col-xs-12 col-sm-6 col-md-4" @click="onDblclickRow(null, props.row, null)">
615
- <q-card flat bordered>
616
- <q-item>
617
- <q-item-section avatar>
618
- <q-icon name="sym_o_folder" size="sm"></q-icon>
619
- </q-item-section>
620
- <q-item-section>
621
- {{ props.row.name }}
622
- </q-item-section>
623
- <q-item-section avatar>
624
- <q-checkbox v-model="selected" :val="props.row" />
625
- </q-item-section>
626
- </q-item>
627
- </q-card>
628
- </div>
629
- </template>
630
- </q-table>
631
-
632
- <q-table :title="$t('Files')" flat grid :columns="columns" :rows="files" hide-pagination
633
- :pagination="{ rowsPerPage: 0 }">
634
-
635
- <template v-slot:item="props">
636
- <div class="q-pa-xs col-xs-12 col-sm-6 col-md-4" @click="onClickRow(null, props.row, null)">
637
- <q-card flat bordered>
638
- <q-item>
639
- <q-item-section avatar>
640
- <q-icon name="sym_o_description" size="sm"></q-icon>
641
- </q-item-section>
642
- <q-item-section>
643
- <q-item-label lines="1">
644
- {{ props.row.name }}
645
- </q-item-label>
646
- </q-item-section>
647
- <q-item-section side>
648
- <q-checkbox v-model="selected" :val="props.row" />
649
- </q-item-section>
650
- </q-item>
651
-
652
- <q-img v-if="canPreview(props.row)" :src="props.row.url"></q-img>
653
-
654
- </q-card>
655
- </div>
656
- </template>
657
- </q-table>
658
- </template>
659
- <template v-else>
660
-
661
- <q-table flat :columns="columns" :rows="items" @row-dblclick="onDblclickRow" @row-click="onClickRow"
662
- :pagination="pagination" row-key="path" selection="multiple" v-model:selected="selected" dense
663
- :loading="loading" :loading-label="$t('Loading...')" :no-data-label="$t('No data available')"
664
- separator="horizontal" :rows-per-page-options="[0]" color="primary">
665
- <template #body-cell-icon="props">
666
- <q-td auto-width>
667
- <q-icon name="sym_o_folder" v-if="props.value == 'folder'" size="sm" />
668
- <q-icon name="sym_o_description" v-else size="sm" />
669
- </q-td>
670
- </template>
671
-
672
- <template #body-cell-action="props">
673
- <q-td auto-width>
674
- <q-btn flat icon="sym_o_more_vert" round dense>
675
- <q-menu>
676
- <q-list>
677
-
678
- <q-item clickable v-close-popup="true" @click="onCheckTotalSize(props.row)"
679
- v-if="props.row.type == 'folder'">
680
- <q-item-section avatar>
681
- <q-icon name="sym_o_info"></q-icon>
682
- </q-item-section>
683
- <q-item-section>{{ $t('Total size') }}</q-item-section>
684
- </q-item>
685
-
686
- <q-item clickable v-close-popup @click="onDeleteRow(props.row)" v-if="canDeleteRow(props.row)">
687
- <q-item-section avatar>
688
- <q-icon name="sym_o_delete"></q-icon>
689
- </q-item-section>
690
- <q-item-section>{{ $t('Delete') }}</q-item-section>
691
- </q-item>
692
-
693
- <q-item v-if="props.row.type == 'file'" clickable v-close-popup @click="onDownloadRow(props.row)">
694
- <q-item-section avatar>
695
- <q-icon name="sym_o_download"></q-icon>
696
- </q-item-section>
697
- <q-item-section>{{ $t('Download') }}</q-item-section>
698
- </q-item>
699
-
700
- <q-item clickable v-close-popup @click="onRenameRow(props.row)" v-if="canRenameRow(props.row)">
701
- <q-item-section avatar>
702
- <q-icon name="sym_o_edit"></q-icon>
703
- </q-item-section>
704
- <q-item-section>{{ $t('Rename') }}</q-item-section>
705
- </q-item>
706
-
707
- <q-item clickable v-close-popup @click="onPreview(props.row)" v-if="props.row.canPreview">
708
- <q-item-section avatar>
709
- <q-icon name="sym_o_preview"></q-icon>
710
- </q-item-section>
711
- <q-item-section>{{ $t('Preview') }}</q-item-section>
712
- </q-item>
713
-
714
- <q-item clickable v-close-popup v-if="props.row.mime == 'application/pdf'"
715
- @click="onPreviewPDF(props.row)">
716
- <q-item-section avatar>
717
- <q-icon name="sym_o_preview"></q-icon>
718
- </q-item-section>
719
- <q-item-section>{{ $t('Preview') }}</q-item-section>
720
- </q-item>
721
-
722
- <q-item clickable v-close-popup @click="onClickInfo(props.row)" class="lt-lg">
723
- <q-item-section avatar>
724
- <q-icon name="sym_o_info"></q-icon>
725
- </q-item-section>
726
- <q-item-section>{{ $t('Info') }}</q-item-section>
727
- </q-item>
728
-
729
-
730
-
731
- </q-list>
732
- </q-menu>
733
- </q-btn>
734
- </q-td>
735
- </template>
736
- </q-table>
737
- </template>
738
- </q-page-container>
739
- </q-layout>
492
+ <q-layout view="hHh lpR fFf" :class="isDark ? '' : 'bg-white'" container :style="{ 'min-height': height }">
493
+ <q-header bordered :class="isDark ? '' : 'bg-white text-grey-8'" height-hint="64">
494
+ <q-toolbar>
495
+ <q-btn flat round @click="toggleLeftDrawer" aria-label="Menu" icon="menu" class="q-mr-sm" />
496
+
497
+ <q-toolbar-title v-if="$q.screen.gt.xs" shrink class="row items-center no-wrap">
498
+ <span class="q-ml-sm">{{ $t('File Manager') }}</span>
499
+ </q-toolbar-title>
500
+
501
+ <div>
502
+ <q-input outlined :placeholder="$t('Search for file name')" dense @keyup.enter.native="submitSearch"
503
+ v-model="search">
504
+ <template v-slot:append>
505
+ <q-btn flat dense round icon="sym_o_search"></q-btn>
506
+ </template>
507
+ </q-input>
508
+ </div>
509
+
510
+ <q-space></q-space>
511
+ <q-btn v-if="closeable" icon="close" flat round @click="$emit('close')"></q-btn>
512
+ </q-toolbar>
513
+ </q-header>
514
+
515
+ <q-drawer v-model="leftDrawerOpen" show-if-above bordered :width="257">
516
+ <q-scroll-area class="fit">
517
+ <q-list padding class="text-grey-8">
518
+ <q-item>
519
+ <q-item-section>
520
+ <l-btn icon="add" label="New" :disable="!selectedNodePath">
521
+ <q-menu>
522
+ <q-list>
523
+ <q-item clickable v-close-popup @click="onNewFolder" v-if="permission.includes('fs.folder.create')">
524
+ <q-item-section avatar>
525
+ <q-icon name="sym_o_create_new_folder"></q-icon>
526
+ </q-item-section>
527
+ <q-item-section>{{ $t('Folder') }}</q-item-section>
528
+ </q-item>
529
+ <q-separator />
530
+ <q-item clickable v-close-popup @click="showUploadFiles = true"
531
+ v-if="permission.includes('fs.file.upload')">
532
+ <q-item-section avatar>
533
+ <q-icon name="sym_o_upload_file"></q-icon>
534
+ </q-item-section>
535
+ <q-item-section>{{ $t('Upload file') }}</q-item-section>
536
+ </q-item>
537
+ </q-list>
538
+ </q-menu>
539
+ </l-btn>
540
+ </q-item-section>
541
+ </q-item>
542
+
543
+ <q-tree ref="folderTree" :nodes="nodes" node-key="id" label-key="name" @lazy-load="onLazyLoad"
544
+ v-model:selected="selectedNodePath" no-selection-unset>
545
+ </q-tree>
546
+
547
+ <q-separator inset class="q-my-sm" />
548
+
549
+ <l-file-manager-labels v-model="label" />
550
+ </q-list>
551
+ </q-scroll-area>
552
+ </q-drawer>
553
+
554
+ <q-drawer v-model="rightDrawerOpen" side="right" show-if-above bordered>
555
+ <l-file-manager-preview :path="preview.path" v-if="preview" :key="preview.path" :drive-index="selectedDrive" />
556
+ </q-drawer>
557
+
558
+ <q-page-container :style="{ height }">
559
+
560
+ <q-dialog v-model="showPreviewImgDialog" full-width full-height auto-close>
561
+ <q-card>
562
+ <q-card-section>
563
+ <q-img :src="previewImg"></q-img>
564
+ </q-card-section>
565
+ </q-card>
566
+ </q-dialog>
567
+
568
+ <q-dialog v-model="showUploadFiles" persistent transition-show="scale" transition-hide="scale">
569
+ <l-card style="width:300px">
570
+ <q-card-section>
571
+ <q-file ref="file" v-model="uploadFiles" multiple name="file" label="Files" :color="light.color"></q-file>
572
+ </q-card-section>
573
+
574
+ <q-card-actions align="right">
575
+ <q-btn flat :label="$t('Cancel')" :color="light.color" v-close-popup></q-btn>
576
+ <q-btn flat :label="$t('Upload')" :color="light.color" @click="onUploadFiles"></q-btn>
577
+ </q-card-actions>
578
+ </l-card>
579
+ </q-dialog>
580
+
581
+ <q-toolbar>
582
+ <q-breadcrumbs>
583
+ <q-breadcrumbs-el v-for="(b, index) in breadcrumbs" :label="b.label" :key="index"
584
+ @click="selectedNodePath = b.path" href="javascript:void(0)"></q-breadcrumbs-el>
585
+ </q-breadcrumbs>
586
+ <q-space></q-space>
587
+
588
+ <q-btn flat round icon="sym_o_drive_file_move" v-if="selected.length > 0">
589
+ <l-file-manager-move @selected="moveToFolder($event)" :drive-index="selectedDrive" />
590
+ <q-tooltip>
591
+ {{ $t('Move to') }}
592
+ </q-tooltip>
593
+ </q-btn>
594
+
595
+ <q-btn flat round icon="sym_o_delete" @click="onDeleteSelected" v-if="selected.length > 0">
596
+ <q-tooltip>
597
+ {{ $t('Delete') }}
598
+ </q-tooltip>
599
+ </q-btn>
600
+ <q-btn flat round :icon="grid ? 'sym_o_view_list' : 'sym_o_grid_view'" @click="grid = !grid">
601
+ <q-tooltip>
602
+ {{ grid ? $t('List view') : $t('Grid view') }}
603
+ </q-tooltip>
604
+ </q-btn>
605
+ </q-toolbar>
606
+
607
+ <template v-if="grid">
608
+ <q-table :title="$t('Folders')" flat grid :columns="columns" :rows="folders" hide-pagination
609
+ :pagination="{ rowsPerPage: 0 }">
610
+ <template v-slot:item="props">
611
+ <div class="q-pa-xs col-xs-12 col-sm-6 col-md-4" @click="onDblclickRow(null, props.row, null)">
612
+ <q-card flat bordered>
613
+ <q-item>
614
+ <q-item-section avatar>
615
+ <q-icon name="sym_o_folder" size="sm"></q-icon>
616
+ </q-item-section>
617
+ <q-item-section>
618
+ {{ props.row.name }}
619
+ </q-item-section>
620
+ <q-item-section avatar>
621
+ <q-checkbox v-model="selected" :val="props.row" />
622
+ </q-item-section>
623
+ </q-item>
624
+ </q-card>
625
+ </div>
626
+ </template>
627
+ </q-table>
628
+
629
+ <q-table :title="$t('Files')" flat grid :columns="columns" :rows="files" hide-pagination
630
+ :pagination="{ rowsPerPage: 0 }">
631
+
632
+ <template v-slot:item="props">
633
+ <div class="q-pa-xs col-xs-12 col-sm-6 col-md-4" @click="onClickRow(null, props.row, null)">
634
+ <q-card flat bordered>
635
+ <q-item>
636
+ <q-item-section avatar>
637
+ <q-icon name="sym_o_description" size="sm"></q-icon>
638
+ </q-item-section>
639
+ <q-item-section>
640
+ <q-item-label lines="1">
641
+ {{ props.row.name }}
642
+ </q-item-label>
643
+ </q-item-section>
644
+ <q-item-section side>
645
+ <q-checkbox v-model="selected" :val="props.row" />
646
+ </q-item-section>
647
+ </q-item>
648
+
649
+ <q-img v-if="canPreview(props.row)" :src="props.row.url"></q-img>
650
+
651
+ </q-card>
652
+ </div>
653
+ </template>
654
+ </q-table>
655
+ </template>
656
+ <template v-else>
657
+
658
+ <q-table flat :columns="columns" :rows="items" @row-dblclick="onDblclickRow" @row-click="onClickRow"
659
+ :pagination="pagination" row-key="path" selection="multiple" v-model:selected="selected" dense
660
+ :loading="loading" :loading-label="$t('Loading...')" :no-data-label="$t('No data available')"
661
+ separator="horizontal" :rows-per-page-options="[0]" color="primary">
662
+ <template #body-cell-icon="props">
663
+ <q-td auto-width>
664
+ <q-icon name="sym_o_folder" v-if="props.value == 'folder'" size="sm" />
665
+ <q-icon name="sym_o_description" v-else size="sm" />
666
+ </q-td>
667
+ </template>
668
+
669
+ <template #body-cell-action="props">
670
+ <q-td auto-width>
671
+ <q-btn flat icon="sym_o_more_vert" round dense>
672
+ <q-menu>
673
+ <q-list>
674
+
675
+ <q-item clickable v-close-popup="true" @click="onCheckTotalSize(props.row)"
676
+ v-if="props.row.type == 'folder'">
677
+ <q-item-section avatar>
678
+ <q-icon name="sym_o_info"></q-icon>
679
+ </q-item-section>
680
+ <q-item-section>{{ $t('Total size') }}</q-item-section>
681
+ </q-item>
682
+
683
+ <q-item clickable v-close-popup @click="onDeleteRow(props.row)" v-if="canDeleteRow(props.row)">
684
+ <q-item-section avatar>
685
+ <q-icon name="sym_o_delete"></q-icon>
686
+ </q-item-section>
687
+ <q-item-section>{{ $t('Delete') }}</q-item-section>
688
+ </q-item>
689
+
690
+ <q-item v-if="props.row.type == 'file'" clickable v-close-popup @click="onDownloadRow(props.row)">
691
+ <q-item-section avatar>
692
+ <q-icon name="sym_o_download"></q-icon>
693
+ </q-item-section>
694
+ <q-item-section>{{ $t('Download') }}</q-item-section>
695
+ </q-item>
696
+
697
+ <q-item clickable v-close-popup @click="onRenameRow(props.row)" v-if="canRenameRow(props.row)">
698
+ <q-item-section avatar>
699
+ <q-icon name="sym_o_edit"></q-icon>
700
+ </q-item-section>
701
+ <q-item-section>{{ $t('Rename') }}</q-item-section>
702
+ </q-item>
703
+
704
+ <q-item clickable v-close-popup @click="onPreview(props.row)" v-if="props.row.canPreview">
705
+ <q-item-section avatar>
706
+ <q-icon name="sym_o_preview"></q-icon>
707
+ </q-item-section>
708
+ <q-item-section>{{ $t('Preview') }}</q-item-section>
709
+ </q-item>
710
+
711
+ <q-item clickable v-close-popup v-if="props.row.mime == 'application/pdf'"
712
+ @click="onPreviewPDF(props.row)">
713
+ <q-item-section avatar>
714
+ <q-icon name="sym_o_preview"></q-icon>
715
+ </q-item-section>
716
+ <q-item-section>{{ $t('Preview') }}</q-item-section>
717
+ </q-item>
718
+
719
+ <q-item clickable v-close-popup @click="onClickInfo(props.row)" class="lt-lg">
720
+ <q-item-section avatar>
721
+ <q-icon name="sym_o_info"></q-icon>
722
+ </q-item-section>
723
+ <q-item-section>{{ $t('Info') }}</q-item-section>
724
+ </q-item>
725
+
726
+ </q-list>
727
+ </q-menu>
728
+ </q-btn>
729
+ </q-td>
730
+ </template>
731
+ </q-table>
732
+ </template>
733
+ </q-page-container>
734
+ </q-layout>
740
735
  </template>
@@ -17,7 +17,7 @@ type __VLS_ModelProps = {
17
17
  modelValue?: any;
18
18
  };
19
19
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
20
- declare var __VLS_67: string | number, __VLS_68: any;
20
+ declare var __VLS_67: any, __VLS_68: any;
21
21
  type __VLS_Slots = {} & {
22
22
  [K in NonNullable<typeof __VLS_67>]?: (props: typeof __VLS_68) => any;
23
23
  };
@@ -77,29 +77,29 @@ const onUploadFile = async () => {
77
77
  </script>
78
78
 
79
79
  <template>
80
- <q-input v-bind="attrs" v-model="modelValue" hide-bottom-space>
81
- <q-dialog v-model="show" persistent transition-show="scale" transition-hide="scale">
82
- <l-card style="width:300px">
83
- <q-card-section>
84
- <q-file ref="file" v-model="uploadFile" name="file" :label="$t('File')" :accept="accept"
85
- :hint="`Max upload size: ${humanStorageSize(system.maxUploadSize)}`"
86
- :color="attrs.color"></q-file>
87
- <!-- q-checkbox v-model="rename" :label="$t('Rename file if exists')"></q-checkbox-->
88
- </q-card-section>
89
-
90
- <q-card-actions align="right">
91
- <q-btn flat :label="$t('Cancel')" :color="attrs.color" @click="uploadFile = null"
92
- v-close-popup></q-btn>
93
- <q-btn flat :label="$t('Upload')" :color="attrs.color" @click="onUploadFile"></q-btn>
94
- </q-card-actions>
95
- </l-card>
96
- </q-dialog>
97
- <template v-slot:prepend>
98
- <q-btn dense flat round icon="sym_o_file_upload" @click="show = true"></q-btn>
99
- </template>
100
-
101
- <template v-for="(s, name) in $slots" v-slot:[name]="props" :key="name">
102
- <slot :name="name" v-bind="props ?? {}"></slot>
103
- </template>
104
- </q-input>
80
+ <q-input v-bind="attrs" v-model="modelValue" hide-bottom-space>
81
+ <q-dialog v-model="show" persistent transition-show="scale" transition-hide="scale">
82
+ <l-card style="width:300px">
83
+ <q-card-section>
84
+ <q-file ref="file" v-model="uploadFile" name="file" :label="$t('File')" :accept="accept"
85
+ :hint="`Max upload size: ${humanStorageSize(system.maxUploadSize)}`"
86
+ :color="attrs.color"></q-file>
87
+ <!-- q-checkbox v-model="rename" :label="$t('Rename file if exists')"></q-checkbox-->
88
+ </q-card-section>
89
+
90
+ <q-card-actions align="right">
91
+ <q-btn flat :label="$t('Cancel')" :color="attrs.color" @click="uploadFile = null"
92
+ v-close-popup></q-btn>
93
+ <q-btn flat :label="$t('Upload')" :color="attrs.color" @click="onUploadFile"></q-btn>
94
+ </q-card-actions>
95
+ </l-card>
96
+ </q-dialog>
97
+ <template v-slot:prepend>
98
+ <q-btn dense flat round icon="sym_o_file_upload" @click="show = true"></q-btn>
99
+ </template>
100
+
101
+ <template v-for="(s, name) in $slots" v-slot:[name]="props" :key="name">
102
+ <slot :name="name" v-bind="props ?? {}"></slot>
103
+ </template>
104
+ </q-input>
105
105
  </template>
@@ -17,7 +17,7 @@ type __VLS_ModelProps = {
17
17
  modelValue?: any;
18
18
  };
19
19
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
20
- declare var __VLS_67: string | number, __VLS_68: any;
20
+ declare var __VLS_67: any, __VLS_68: any;
21
21
  type __VLS_Slots = {} & {
22
22
  [K in NonNullable<typeof __VLS_67>]?: (props: typeof __VLS_68) => any;
23
23
  };
@@ -9,10 +9,6 @@ export interface LFileProps {
9
9
  square?: boolean;
10
10
  stackLabel?: boolean;
11
11
  }
12
- declare const __VLS_export: import("vue").DefineComponent<LFileProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
13
- "update:modelValue": (...args: any[]) => void;
14
- }, string, import("vue").PublicProps, Readonly<LFileProps> & Readonly<{
15
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
16
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: import("vue").DefineComponent<LFileProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
13
  declare const _default: typeof __VLS_export;
18
14
  export default _default;
@@ -34,12 +34,12 @@ const attrs = computed(() => {
34
34
  </script>
35
35
 
36
36
  <template>
37
- <l-input v-bind="attrs" v-model="localValue" hide-bottom-space>
38
- <q-dialog v-model="show" full-height full-width>
39
- <l-file-manager closable @close="show = false" @input="onInput"></l-file-manager>
40
- </q-dialog>
41
- <template v-slot:prepend>
42
- <q-btn dense flat round icon="sym_o_folder" @click="show = true"></q-btn>
43
- </template>
44
- </l-input>
37
+ <l-input v-bind="attrs" v-model="localValue" hide-bottom-space>
38
+ <q-dialog v-model="show" full-height full-width>
39
+ <l-file-manager closable @close="show = false" @input="onInput"></l-file-manager>
40
+ </q-dialog>
41
+ <template v-slot:prepend>
42
+ <q-btn dense flat round icon="sym_o_folder" @click="show = true"></q-btn>
43
+ </template>
44
+ </l-input>
45
45
  </template>