@hostlink/nuxt-light 1.55.0 → 1.56.0
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.
- package/README.md +120 -120
- package/dist/module.json +1 -1
- package/dist/runtime/components/L/CustomField/Add.vue +40 -42
- package/dist/runtime/components/L/CustomField/List.vue +5 -5
- package/dist/runtime/components/L/Database/create-table-dialog.vue +33 -34
- package/dist/runtime/components/L/Fieldset.vue +8 -11
- package/dist/runtime/components/L/ForgetPasswordDialog.vue +26 -27
- package/dist/runtime/components/L/Revision.vue +89 -93
- package/dist/runtime/components/L/Storage.vue +7 -7
- package/dist/runtime/components/L/System/Setting/authentication.d.vue.ts +1 -5
- package/dist/runtime/components/L/System/Setting/authentication.vue +16 -16
- package/dist/runtime/components/L/System/Setting/authentication.vue.d.ts +1 -5
- package/dist/runtime/components/L/System/Setting/developer.vue +10 -11
- package/dist/runtime/components/L/System/Setting/forget-password.vue +9 -9
- package/dist/runtime/components/L/System/Setting/general.vue +9 -9
- package/dist/runtime/components/L/System/Setting/mail.d.vue.ts +1 -5
- package/dist/runtime/components/L/System/Setting/mail.vue +28 -32
- package/dist/runtime/components/L/System/Setting/mail.vue.d.ts +1 -5
- package/dist/runtime/components/L/System/Setting/modules.d.vue.ts +1 -5
- package/dist/runtime/components/L/System/Setting/modules.vue +6 -6
- package/dist/runtime/components/L/System/Setting/modules.vue.d.ts +1 -5
- package/dist/runtime/components/L/System/Setting/security.d.vue.ts +1 -5
- package/dist/runtime/components/L/System/Setting/security.vue +38 -41
- package/dist/runtime/components/L/System/Setting/security.vue.d.ts +1 -5
- package/dist/runtime/components/L/User/eventlog.vue +5 -5
- package/dist/runtime/components/L/User/overview.vue +19 -19
- package/dist/runtime/components/L/User/userlog.vue +1 -1
- package/dist/runtime/components/L/ValidationInput.vue +14 -14
- package/dist/runtime/components/MyTest.vue +3 -3
- package/dist/runtime/components/l-action-btn.vue +4 -4
- package/dist/runtime/components/l-add-btn.vue +3 -3
- package/dist/runtime/components/l-alert.vue +8 -8
- package/dist/runtime/components/l-app-main.d.vue.ts +1 -5
- package/dist/runtime/components/l-app-main.vue +170 -171
- package/dist/runtime/components/l-app-main.vue.d.ts +1 -5
- package/dist/runtime/components/l-app.vue +27 -27
- package/dist/runtime/components/l-audit-card.vue +8 -8
- package/dist/runtime/components/l-back-btn.vue +6 -6
- package/dist/runtime/components/l-banner.d.vue.ts +1 -1
- package/dist/runtime/components/l-banner.vue +10 -10
- package/dist/runtime/components/l-banner.vue.d.ts +1 -1
- package/dist/runtime/components/l-bar.vue +3 -3
- package/dist/runtime/components/l-btn.vue +4 -4
- package/dist/runtime/components/l-card.d.vue.ts +1 -9
- package/dist/runtime/components/l-card.vue +31 -31
- package/dist/runtime/components/l-card.vue.d.ts +1 -9
- package/dist/runtime/components/l-checkbox.vue +3 -3
- package/dist/runtime/components/l-col.vue +5 -5
- package/dist/runtime/components/l-customizer.d.vue.ts +2 -2
- package/dist/runtime/components/l-customizer.vue +95 -96
- package/dist/runtime/components/l-customizer.vue.d.ts +2 -2
- package/dist/runtime/components/l-date-picker.d.vue.ts +1 -1
- package/dist/runtime/components/l-date-picker.vue +17 -17
- package/dist/runtime/components/l-date-picker.vue.d.ts +1 -1
- package/dist/runtime/components/l-delete-btn.vue +1 -1
- package/dist/runtime/components/l-dialog-database-field-add.vue +25 -26
- package/dist/runtime/components/l-drag-drop-container.vue +5 -5
- package/dist/runtime/components/l-drag-drop-group.vue +1 -1
- package/dist/runtime/components/l-drag-drop.vue +6 -6
- package/dist/runtime/components/l-edit-btn.vue +2 -2
- package/dist/runtime/components/l-editor.d.vue.ts +1 -5
- package/dist/runtime/components/l-editor.vue +41 -41
- package/dist/runtime/components/l-editor.vue.d.ts +1 -5
- package/dist/runtime/components/l-facebook-button.vue +2 -2
- package/dist/runtime/components/l-fav-menu.vue +14 -14
- package/dist/runtime/components/l-field.vue +3 -3
- package/dist/runtime/components/l-file-manager-labels.vue +11 -11
- package/dist/runtime/components/l-file-manager-move.vue +67 -67
- package/dist/runtime/components/l-file-manager-preview.vue +22 -22
- package/dist/runtime/components/l-file-manager.vue +245 -250
- package/dist/runtime/components/l-file-upload.d.vue.ts +1 -1
- package/dist/runtime/components/l-file-upload.vue +25 -25
- package/dist/runtime/components/l-file-upload.vue.d.ts +1 -1
- package/dist/runtime/components/l-file.d.vue.ts +1 -5
- package/dist/runtime/components/l-file.vue +8 -8
- package/dist/runtime/components/l-file.vue.d.ts +1 -5
- package/dist/runtime/components/l-form-dialog.vue +27 -27
- package/dist/runtime/components/l-form.d.vue.ts +1 -33
- package/dist/runtime/components/l-form.vue +11 -11
- package/dist/runtime/components/l-form.vue.d.ts +1 -33
- package/dist/runtime/components/l-group-select.vue +22 -22
- package/dist/runtime/components/l-icon-picker.vue +35 -38
- package/dist/runtime/components/l-input-select.vue +4 -4
- package/dist/runtime/components/l-input-xlsx.vue +30 -31
- package/dist/runtime/components/l-input.d.vue.ts +1 -1
- package/dist/runtime/components/l-input.vue +23 -23
- package/dist/runtime/components/l-input.vue.d.ts +1 -1
- package/dist/runtime/components/l-item.vue +18 -18
- package/dist/runtime/components/l-link.vue +3 -3
- package/dist/runtime/components/l-list.vue +12 -12
- package/dist/runtime/components/l-login.d.vue.ts +1 -5
- package/dist/runtime/components/l-login.vue +57 -57
- package/dist/runtime/components/l-login.vue.d.ts +1 -5
- package/dist/runtime/components/l-menu.vue +33 -34
- package/dist/runtime/components/l-microsoft-button.d.vue.ts +1 -11
- package/dist/runtime/components/l-microsoft-button.vue +68 -68
- package/dist/runtime/components/l-microsoft-button.vue.d.ts +1 -11
- package/dist/runtime/components/l-page.vue +21 -21
- package/dist/runtime/components/l-repeater.d.vue.ts +3 -3
- package/dist/runtime/components/l-repeater.vue +35 -35
- package/dist/runtime/components/l-repeater.vue.d.ts +3 -3
- package/dist/runtime/components/l-row.vue +5 -5
- package/dist/runtime/components/l-save-btn.vue +2 -2
- package/dist/runtime/components/l-select.vue +1 -1
- package/dist/runtime/components/l-small-box.vue +9 -9
- package/dist/runtime/components/l-statistic.vue +9 -9
- package/dist/runtime/components/l-tab.vue +10 -10
- package/dist/runtime/components/l-table.d.vue.ts +1 -1
- package/dist/runtime/components/l-table.vue +176 -190
- package/dist/runtime/components/l-table.vue.d.ts +1 -1
- package/dist/runtime/components/l-tabs.vue +9 -9
- package/dist/runtime/components/l-test2.vue +3 -3
- package/dist/runtime/components/l-time-picker.d.vue.ts +1 -1
- package/dist/runtime/components/l-time-picker.vue +18 -18
- package/dist/runtime/components/l-time-picker.vue.d.ts +1 -1
- package/dist/runtime/components/l-view-btn.vue +2 -2
- package/dist/runtime/components/user-list.vue +3 -3
- package/dist/runtime/composables/mytest.js +2 -2
- package/dist/runtime/composables/tc2sc.js +85 -85
- package/dist/runtime/formkit/Checkbox.d.vue.ts +0 -1
- package/dist/runtime/formkit/Checkbox.vue +6 -6
- package/dist/runtime/formkit/Checkbox.vue.d.ts +0 -1
- package/dist/runtime/formkit/DatePicker.d.vue.ts +0 -1
- package/dist/runtime/formkit/DatePicker.vue +11 -11
- package/dist/runtime/formkit/DatePicker.vue.d.ts +0 -1
- package/dist/runtime/formkit/Editor.vue +7 -7
- package/dist/runtime/formkit/File.d.vue.ts +0 -1
- package/dist/runtime/formkit/File.vue +6 -6
- package/dist/runtime/formkit/File.vue.d.ts +0 -1
- package/dist/runtime/formkit/FilePicker.d.vue.ts +0 -1
- package/dist/runtime/formkit/FilePicker.vue +6 -6
- package/dist/runtime/formkit/FilePicker.vue.d.ts +0 -1
- package/dist/runtime/formkit/FileUpload.d.vue.ts +0 -1
- package/dist/runtime/formkit/FileUpload.vue +6 -6
- package/dist/runtime/formkit/FileUpload.vue.d.ts +0 -1
- package/dist/runtime/formkit/Form.d.vue.ts +1 -3
- package/dist/runtime/formkit/Form.vue +11 -11
- package/dist/runtime/formkit/Form.vue.d.ts +1 -3
- package/dist/runtime/formkit/GroupSelect.d.vue.ts +0 -1
- package/dist/runtime/formkit/GroupSelect.vue +7 -7
- package/dist/runtime/formkit/GroupSelect.vue.d.ts +0 -1
- package/dist/runtime/formkit/Input.d.vue.ts +1 -1
- package/dist/runtime/formkit/Input.vue +11 -11
- package/dist/runtime/formkit/Input.vue.d.ts +1 -1
- package/dist/runtime/formkit/InputSelect.d.vue.ts +1 -1
- package/dist/runtime/formkit/InputSelect.vue +7 -7
- package/dist/runtime/formkit/InputSelect.vue.d.ts +1 -1
- package/dist/runtime/formkit/InputXlsx.vue +4 -4
- package/dist/runtime/formkit/OptionGroup.vue +5 -5
- package/dist/runtime/formkit/Radio.vue +4 -4
- package/dist/runtime/formkit/Repeater.d.vue.ts +1 -1
- package/dist/runtime/formkit/Repeater.vue +37 -37
- package/dist/runtime/formkit/Repeater.vue.d.ts +1 -1
- package/dist/runtime/formkit/Select.d.vue.ts +0 -1
- package/dist/runtime/formkit/Select.vue +6 -6
- package/dist/runtime/formkit/Select.vue.d.ts +0 -1
- package/dist/runtime/formkit/Textarea.d.vue.ts +1 -1
- package/dist/runtime/formkit/Textarea.vue +11 -11
- package/dist/runtime/formkit/Textarea.vue.d.ts +1 -1
- package/dist/runtime/formkit/TimePicker.d.vue.ts +0 -1
- package/dist/runtime/formkit/TimePicker.vue +10 -10
- package/dist/runtime/formkit/TimePicker.vue.d.ts +0 -1
- package/dist/runtime/formkit/Toggle.vue +3 -3
- package/dist/runtime/index.d.ts +39 -39
- package/dist/runtime/locales/en.json +9 -9
- package/dist/runtime/locales/zh-hk.json +213 -213
- package/dist/runtime/pages/CustomField/[custom_field_id]/edit.vue +33 -38
- package/dist/runtime/pages/CustomField/index.vue +12 -14
- package/dist/runtime/pages/EventLog/_eventlog_id/view.vue +36 -36
- package/dist/runtime/pages/EventLog/index.vue +7 -7
- package/dist/runtime/pages/FileManager/index.vue +4 -4
- package/dist/runtime/pages/MailLog/index.vue +18 -18
- package/dist/runtime/pages/Permission/add.vue +13 -13
- package/dist/runtime/pages/Permission/all.vue +63 -63
- package/dist/runtime/pages/Permission/export.vue +9 -10
- package/dist/runtime/pages/Permission/index.vue +4 -4
- package/dist/runtime/pages/Role/_name/update-child.vue +4 -4
- package/dist/runtime/pages/Role/add.vue +7 -7
- package/dist/runtime/pages/Role/add2.vue +30 -30
- package/dist/runtime/pages/Role/index.vue +27 -27
- package/dist/runtime/pages/System/database/backup.vue +72 -72
- package/dist/runtime/pages/System/database/check.vue +72 -72
- package/dist/runtime/pages/System/database/event.vue +51 -51
- package/dist/runtime/pages/System/database/process.vue +21 -21
- package/dist/runtime/pages/System/database/restore.vue +110 -110
- package/dist/runtime/pages/System/database/table.vue +67 -69
- package/dist/runtime/pages/System/fs.vue +99 -99
- package/dist/runtime/pages/System/index.vue +16 -18
- package/dist/runtime/pages/System/mailtest.vue +12 -12
- package/dist/runtime/pages/System/menu/index.vue +142 -144
- package/dist/runtime/pages/System/package.vue +11 -11
- package/dist/runtime/pages/System/phpinfo.vue +3 -3
- package/dist/runtime/pages/System/setting.vue +28 -30
- package/dist/runtime/pages/System/test.vue +12 -12
- package/dist/runtime/pages/System/view_as.vue +21 -22
- package/dist/runtime/pages/SystemValue/_systemvalue_id/edit.vue +6 -6
- package/dist/runtime/pages/SystemValue/add.vue +7 -7
- package/dist/runtime/pages/SystemValue/index.vue +4 -4
- package/dist/runtime/pages/Translate/index.vue +38 -38
- package/dist/runtime/pages/User/_user_id/change-password.vue +17 -18
- package/dist/runtime/pages/User/_user_id/edit.vue +28 -28
- package/dist/runtime/pages/User/_user_id/update-role.vue +7 -8
- package/dist/runtime/pages/User/_user_id/view.vue +27 -30
- package/dist/runtime/pages/User/add.vue +35 -35
- package/dist/runtime/pages/User/index.vue +11 -11
- package/dist/runtime/pages/User/profile.vue +45 -46
- package/dist/runtime/pages/User/setting/bio-auth.vue +22 -22
- package/dist/runtime/pages/User/setting/favorite.vue +61 -62
- package/dist/runtime/pages/User/setting/index.vue +6 -6
- package/dist/runtime/pages/User/setting/information.vue +6 -6
- package/dist/runtime/pages/User/setting/menu.vue +165 -165
- package/dist/runtime/pages/User/setting/open_id.vue +161 -161
- package/dist/runtime/pages/User/setting/password.vue +19 -19
- package/dist/runtime/pages/User/setting/style.vue +104 -106
- package/dist/runtime/pages/User/setting/two-factor-auth.vue +176 -176
- package/dist/runtime/pages/User/setting.vue +32 -32
- package/dist/runtime/pages/UserLog/index.vue +4 -4
- package/package.json +63 -63
|
@@ -3,7 +3,7 @@ import { useI18n } from "vue-i18n";
|
|
|
3
3
|
import { ref, watch, computed } from "vue";
|
|
4
4
|
import { useQuasar, format } from "quasar";
|
|
5
5
|
import { q, m, useLight } from "#imports";
|
|
6
|
-
import { getApiClient } from "@hostlink/light";
|
|
6
|
+
import { getApiClient, getGrantedRights } from "@hostlink/light";
|
|
7
7
|
const api = getApiClient();
|
|
8
8
|
import { getDrive, listDrives } from "@hostlink/light";
|
|
9
9
|
const { humanStorageSize } = format;
|
|
@@ -387,7 +387,7 @@ const reloadStorage = async () => {
|
|
|
387
387
|
label.value = null;
|
|
388
388
|
await loadItems();
|
|
389
389
|
};
|
|
390
|
-
const permission = await
|
|
390
|
+
const permission = await getGrantedRights([
|
|
391
391
|
"fs.folder.create",
|
|
392
392
|
"fs.folder.delete",
|
|
393
393
|
"fs.folder.rename",
|
|
@@ -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
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
<q-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
<q-item-section
|
|
618
|
-
|
|
619
|
-
</q-item-section>
|
|
620
|
-
<q-item-section>
|
|
621
|
-
|
|
622
|
-
</q-item-section>
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
<q-item-section
|
|
640
|
-
<q-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
</q-item-section>
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
<q-item-section
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
<q-item-section
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
<q-item-section
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
<q-item-section
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
<q-item-section
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
<q-item-section
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
<q-item-section
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
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:
|
|
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:
|
|
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;
|