@hostlink/nuxt-light 1.60.5 → 1.60.6
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/dist/module.json +1 -1
- package/dist/runtime/components/l-file-manager-labels.vue +12 -10
- package/dist/runtime/components/l-file-manager-preview.vue +10 -8
- package/dist/runtime/components/l-file-manager.vue +245 -184
- package/dist/runtime/pages/System/fs.vue +7 -4
- package/dist/runtime/pages/User/_user_id/change-password.vue +5 -1
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -41,17 +41,19 @@ const LABLES = [
|
|
|
41
41
|
</script>
|
|
42
42
|
|
|
43
43
|
<template>
|
|
44
|
-
<q-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
<q-list>
|
|
45
|
+
<q-item-label header>
|
|
46
|
+
{{ $t('Labels') }}
|
|
47
|
+
</q-item-label>
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
<q-item v-for="label in LABLES" :key="label.type" clickable :active="modelValue == label.type"
|
|
50
|
+
:active-class="`text-primary`" @click="toggleLabel(label.type)">
|
|
51
|
+
<q-item-section avatar>
|
|
52
|
+
<q-icon :name="label.icon" />
|
|
53
|
+
</q-item-section>
|
|
54
|
+
<q-item-section> {{ $t(label.label) }} </q-item-section>
|
|
55
|
+
</q-item>
|
|
56
|
+
</q-list>
|
|
55
57
|
</template>
|
|
56
58
|
|
|
57
59
|
<style scoped>
|
|
@@ -42,16 +42,18 @@ const copyToClipboard = (text) => {
|
|
|
42
42
|
console.error("Could not copy text: ", err);
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
const isImage = computed(() => {
|
|
46
|
+
return file.mime.startsWith("image/");
|
|
47
|
+
});
|
|
48
|
+
const isVideo = computed(() => {
|
|
49
|
+
return file.mime.startsWith("video/");
|
|
48
50
|
});
|
|
49
51
|
</script>
|
|
50
52
|
|
|
51
53
|
<template>
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
<q-img :src="file.url" v-if="isImage"></q-img>
|
|
55
|
+
<q-video :src="file.url" v-else-if="isVideo"></q-video>
|
|
56
|
+
|
|
55
57
|
<q-list dense>
|
|
56
58
|
<l-item label="Name">{{ file.name }}</l-item>
|
|
57
59
|
<l-item label="Size">{{ size }} ({{ file.size }})</l-item>
|
|
@@ -66,8 +68,8 @@ const canPreview = computed(() => {
|
|
|
66
68
|
<q-item-label lines="1">{{ file.url }}</q-item-label>
|
|
67
69
|
</q-item-section>
|
|
68
70
|
|
|
69
|
-
<q-item-section
|
|
70
|
-
<q-btn size="md" flat
|
|
71
|
+
<q-item-section side>
|
|
72
|
+
<q-btn size="md" flat dense round icon="sym_o_content_copy" @click="copyToClipboard(file.url)"></q-btn>
|
|
71
73
|
</q-item-section>
|
|
72
74
|
</q-item>
|
|
73
75
|
</q-list>
|
|
@@ -441,8 +441,10 @@ watch(selectedNodePath, async () => {
|
|
|
441
441
|
await loadItems();
|
|
442
442
|
});
|
|
443
443
|
const canPreview = (file) => {
|
|
444
|
-
|
|
445
|
-
|
|
444
|
+
if (!file.mime) {
|
|
445
|
+
return false;
|
|
446
|
+
}
|
|
447
|
+
return file.mime.startsWith("image/");
|
|
446
448
|
};
|
|
447
449
|
const onCheckTotalSize = async (folder) => {
|
|
448
450
|
const d = $q.dialog({
|
|
@@ -464,8 +466,9 @@ const onCheckTotalSize = async (folder) => {
|
|
|
464
466
|
}
|
|
465
467
|
}
|
|
466
468
|
});
|
|
469
|
+
const size = humanStorageSize(resp.app.drive.folder.totalSize);
|
|
467
470
|
d.update({
|
|
468
|
-
message:
|
|
471
|
+
message: "Total size of folder '" + folder.name + "' is " + size,
|
|
469
472
|
progress: false
|
|
470
473
|
});
|
|
471
474
|
};
|
|
@@ -488,14 +491,64 @@ const onDuplicateFile = async (file) => {
|
|
|
488
491
|
}
|
|
489
492
|
await loadItems();
|
|
490
493
|
};
|
|
491
|
-
|
|
494
|
+
const onDrop = (event) => {
|
|
495
|
+
event.preventDefault();
|
|
496
|
+
event.stopPropagation();
|
|
497
|
+
if (selectedNodePath.value == null) {
|
|
498
|
+
$q.notify({
|
|
499
|
+
type: "warning",
|
|
500
|
+
message: "Please select a folder to upload files."
|
|
501
|
+
});
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
const files2 = event.dataTransfer.files;
|
|
505
|
+
console.log("Dropped files:", files2);
|
|
506
|
+
uploadFiles.value = [];
|
|
507
|
+
for (let i = 0; i < files2.length; i++) {
|
|
508
|
+
uploadFiles.value.push(files2[i]);
|
|
509
|
+
}
|
|
510
|
+
showUploadFiles.value = true;
|
|
511
|
+
dragzone.value.style.border = "none";
|
|
512
|
+
};
|
|
513
|
+
const dragzone = ref(null);
|
|
514
|
+
const onDragover = (event) => {
|
|
515
|
+
event.preventDefault();
|
|
516
|
+
event.stopPropagation();
|
|
517
|
+
if (selectedNodePath.value == null) {
|
|
518
|
+
return;
|
|
519
|
+
}
|
|
520
|
+
dragzone.value.style.border = "2px dashed #1976d2";
|
|
521
|
+
};
|
|
522
|
+
const onDragLeave = (event) => {
|
|
523
|
+
event.preventDefault();
|
|
524
|
+
event.stopPropagation();
|
|
525
|
+
if (selectedNodePath.value == null) {
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
dragzone.value.style.border = "none";
|
|
529
|
+
};
|
|
530
|
+
const getFileIcon = (file) => {
|
|
531
|
+
if (file.mime.startsWith("image/")) {
|
|
532
|
+
return "sym_o_image";
|
|
533
|
+
} else if (file.mime === "application/pdf") {
|
|
534
|
+
return "sym_o_picture_as_pdf";
|
|
535
|
+
} else if (file.mime.startsWith("video/")) {
|
|
536
|
+
return "sym_o_videocam";
|
|
537
|
+
} else if (file.mime.startsWith("audio/")) {
|
|
538
|
+
return "sym_o_audiotrack";
|
|
539
|
+
} else if (file.mime === "application/zip" || file.mime === "application/x-rar-compressed") {
|
|
540
|
+
return "sym_o_archive";
|
|
541
|
+
} else {
|
|
542
|
+
return "sym_o_description";
|
|
543
|
+
}
|
|
544
|
+
};
|
|
492
545
|
</script>
|
|
493
546
|
|
|
494
547
|
<template>
|
|
495
548
|
<q-layout view="hHh lpR fFf" :class="isDark ? '' : 'bg-white'" container :style="{ 'min-height': height }">
|
|
496
549
|
<q-header bordered :class="isDark ? '' : 'bg-white text-grey-8'" height-hint="64">
|
|
497
550
|
<q-toolbar>
|
|
498
|
-
<q-btn flat round @click="toggleLeftDrawer" aria-label="Menu" icon="
|
|
551
|
+
<q-btn flat round @click="toggleLeftDrawer" aria-label="Menu" icon="sym_o_menu" class="q-mr-sm" />
|
|
499
552
|
|
|
500
553
|
<q-toolbar-title v-if="$q.screen.gt.xs" shrink class="row items-center no-wrap">
|
|
501
554
|
<span class="q-ml-sm">{{ $t('File Manager') }}</span>
|
|
@@ -559,187 +612,195 @@ selectedNodePath.value = drives[0].index.toString();
|
|
|
559
612
|
</q-drawer>
|
|
560
613
|
|
|
561
614
|
<q-page-container :style="{ height }">
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
<q-
|
|
565
|
-
<q-card
|
|
566
|
-
<q-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
<
|
|
573
|
-
<q-card-
|
|
574
|
-
<q-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
<q-
|
|
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
|
-
<q-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
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">
|
|
615
|
+
<div @drop="onDrop" @dragover="onDragover" ref="dragzone" @dragleave="onDragLeave" style="height: 100%;">
|
|
616
|
+
|
|
617
|
+
<q-dialog v-model="showPreviewImgDialog" full-width full-height auto-close>
|
|
618
|
+
<q-card>
|
|
619
|
+
<q-card-section>
|
|
620
|
+
<q-img :src="previewImg"></q-img>
|
|
621
|
+
</q-card-section>
|
|
622
|
+
</q-card>
|
|
623
|
+
</q-dialog>
|
|
624
|
+
|
|
625
|
+
<q-dialog v-model="showUploadFiles" persistent transition-show="scale" transition-hide="scale">
|
|
626
|
+
<q-card style="min-width: 400px;">
|
|
627
|
+
<q-toolbar>
|
|
628
|
+
<q-toolbar-title>{{ $t('Upload Files') }}</q-toolbar-title>
|
|
629
|
+
<q-space></q-space>
|
|
630
|
+
<q-btn flat round dense icon="sym_o_close" v-close-popup></q-btn>
|
|
631
|
+
</q-toolbar>
|
|
632
|
+
<q-card-section>
|
|
633
|
+
<q-file ref="file" v-model="uploadFiles" multiple name="file" label="Files" color="primary"></q-file>
|
|
634
|
+
</q-card-section>
|
|
635
|
+
|
|
636
|
+
<q-card-actions align="right">
|
|
637
|
+
<q-btn flat :label="$t('Cancel')" color="primary" v-close-popup></q-btn>
|
|
638
|
+
<q-btn flat :label="$t('Upload')" color="primary" @click="onUploadFiles"></q-btn>
|
|
639
|
+
</q-card-actions>
|
|
640
|
+
</q-card>
|
|
641
|
+
</q-dialog>
|
|
642
|
+
|
|
643
|
+
<q-toolbar>
|
|
644
|
+
<q-breadcrumbs>
|
|
645
|
+
<q-breadcrumbs-el v-for="(b, index) in breadcrumbs" :label="b.label" :key="index"
|
|
646
|
+
@click="selectedNodePath = b.path" href="javascript:void(0)"></q-breadcrumbs-el>
|
|
647
|
+
</q-breadcrumbs>
|
|
648
|
+
<q-space></q-space>
|
|
649
|
+
|
|
650
|
+
<q-btn flat round icon="sym_o_drive_file_move" v-if="selected.length > 0">
|
|
651
|
+
<l-file-manager-move @selected="moveToFolder($event)" :drive-index="selectedDrive" />
|
|
652
|
+
<q-tooltip>
|
|
653
|
+
{{ $t('Move to') }}
|
|
654
|
+
</q-tooltip>
|
|
655
|
+
</q-btn>
|
|
656
|
+
|
|
657
|
+
<q-btn flat round icon="sym_o_delete" @click="onDeleteSelected" v-if="selected.length > 0">
|
|
658
|
+
<q-tooltip>
|
|
659
|
+
{{ $t('Delete') }}
|
|
660
|
+
</q-tooltip>
|
|
661
|
+
</q-btn>
|
|
662
|
+
<q-btn flat round :icon="grid ? 'sym_o_view_list' : 'sym_o_grid_view'" @click="grid = !grid">
|
|
663
|
+
<q-tooltip>
|
|
664
|
+
{{ grid ? $t('List view') : $t('Grid view') }}
|
|
665
|
+
</q-tooltip>
|
|
666
|
+
</q-btn>
|
|
667
|
+
</q-toolbar>
|
|
668
|
+
|
|
669
|
+
<template v-if="grid">
|
|
670
|
+
<q-table :title="$t('Folders')" flat grid :columns="columns" :rows="folders" hide-pagination
|
|
671
|
+
:pagination="{ rowsPerPage: 0 }">
|
|
672
|
+
<template v-slot:item="props">
|
|
673
|
+
<div class="q-pa-xs col-xs-12 col-sm-6 col-md-4" @click="onDblclickRow(null, props.row, null)">
|
|
674
|
+
<q-card flat bordered>
|
|
675
|
+
<q-item>
|
|
676
|
+
<q-item-section avatar>
|
|
677
|
+
<q-icon name="sym_o_folder" size="sm"></q-icon>
|
|
678
|
+
</q-item-section>
|
|
679
|
+
<q-item-section>
|
|
644
680
|
{{ props.row.name }}
|
|
645
|
-
</q-item-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
</q-item
|
|
650
|
-
</q-
|
|
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
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
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="onDuplicateFile(props.row)" v-if="props.row.type == 'file'">
|
|
708
|
-
<q-item-section avatar>
|
|
709
|
-
<q-icon name="sym_o_content_copy"></q-icon>
|
|
710
|
-
</q-item-section>
|
|
711
|
-
<q-item-section>{{ $t('Duplicate') }}</q-item-section>
|
|
712
|
-
</q-item>
|
|
713
|
-
|
|
714
|
-
<q-item clickable v-close-popup @click="onPreview(props.row)" v-if="props.row.canPreview">
|
|
715
|
-
<q-item-section avatar>
|
|
716
|
-
<q-icon name="sym_o_preview"></q-icon>
|
|
717
|
-
</q-item-section>
|
|
718
|
-
<q-item-section>{{ $t('Preview') }}</q-item-section>
|
|
719
|
-
</q-item>
|
|
720
|
-
|
|
721
|
-
<q-item clickable v-close-popup v-if="props.row.mime == 'application/pdf'"
|
|
722
|
-
@click="onPreviewPDF(props.row)">
|
|
723
|
-
<q-item-section avatar>
|
|
724
|
-
<q-icon name="sym_o_preview"></q-icon>
|
|
725
|
-
</q-item-section>
|
|
726
|
-
<q-item-section>{{ $t('Preview') }}</q-item-section>
|
|
727
|
-
</q-item>
|
|
728
|
-
|
|
729
|
-
<q-item clickable v-close-popup @click="onClickInfo(props.row)" class="lt-lg">
|
|
730
|
-
<q-item-section avatar>
|
|
731
|
-
<q-icon name="sym_o_info"></q-icon>
|
|
732
|
-
</q-item-section>
|
|
733
|
-
<q-item-section>{{ $t('Info') }}</q-item-section>
|
|
734
|
-
</q-item>
|
|
681
|
+
</q-item-section>
|
|
682
|
+
<q-item-section avatar>
|
|
683
|
+
<q-checkbox v-model="selected" :val="props.row" />
|
|
684
|
+
</q-item-section>
|
|
685
|
+
</q-item>
|
|
686
|
+
</q-card>
|
|
687
|
+
</div>
|
|
688
|
+
</template>
|
|
689
|
+
</q-table>
|
|
690
|
+
|
|
691
|
+
<q-table :title="$t('Files')" flat grid :columns="columns" :rows="files" hide-pagination
|
|
692
|
+
:pagination="{ rowsPerPage: 0 }">
|
|
693
|
+
|
|
694
|
+
<template v-slot:item="props">
|
|
695
|
+
<div class="q-pa-xs col-xs-12 col-sm-6 col-md-4" @click="onClickRow(null, props.row, null)">
|
|
696
|
+
<q-card flat bordered>
|
|
697
|
+
<q-item>
|
|
698
|
+
<q-item-section avatar>
|
|
699
|
+
<q-icon :name="getFileIcon(props.row)" size="sm"></q-icon>
|
|
700
|
+
</q-item-section>
|
|
701
|
+
<q-item-section>
|
|
702
|
+
<q-item-label lines="1">
|
|
703
|
+
{{ props.row.name }}
|
|
704
|
+
</q-item-label>
|
|
705
|
+
</q-item-section>
|
|
706
|
+
<q-item-section side>
|
|
707
|
+
<q-checkbox v-model="selected" :val="props.row" />
|
|
708
|
+
</q-item-section>
|
|
709
|
+
</q-item>
|
|
710
|
+
|
|
711
|
+
<q-img v-if="canPreview(props.row)" :src="props.row.url"></q-img>
|
|
712
|
+
|
|
713
|
+
</q-card>
|
|
714
|
+
</div>
|
|
715
|
+
</template>
|
|
716
|
+
</q-table>
|
|
717
|
+
</template>
|
|
718
|
+
<template v-else>
|
|
719
|
+
|
|
720
|
+
<q-table flat :columns="columns" :rows="items" @row-dblclick="onDblclickRow" @row-click="onClickRow"
|
|
721
|
+
:pagination="pagination" row-key="path" selection="multiple" v-model:selected="selected" dense
|
|
722
|
+
:loading="loading" :loading-label="$t('Loading...')" :no-data-label="$t('No data available')"
|
|
723
|
+
separator="horizontal" :rows-per-page-options="[0]" color="primary">
|
|
724
|
+
<template #body-cell-icon="props">
|
|
725
|
+
<q-td auto-width>
|
|
726
|
+
<q-icon name="sym_o_folder" v-if="props.value == 'folder'" size="sm" />
|
|
727
|
+
<q-icon :name="getFileIcon(props.row)" v-else size="sm" />
|
|
728
|
+
</q-td>
|
|
729
|
+
</template>
|
|
735
730
|
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
731
|
+
<template #body-cell-action="props">
|
|
732
|
+
<q-td auto-width>
|
|
733
|
+
<q-btn flat icon="sym_o_more_vert" round dense>
|
|
734
|
+
<q-menu>
|
|
735
|
+
<q-list>
|
|
736
|
+
|
|
737
|
+
<q-item clickable v-close-popup="true" @click="onCheckTotalSize(props.row)"
|
|
738
|
+
v-if="props.row.type == 'folder'">
|
|
739
|
+
<q-item-section avatar>
|
|
740
|
+
<q-icon name="sym_o_info"></q-icon>
|
|
741
|
+
</q-item-section>
|
|
742
|
+
<q-item-section>{{ $t('Total size') }}</q-item-section>
|
|
743
|
+
</q-item>
|
|
744
|
+
|
|
745
|
+
<q-item clickable v-close-popup @click="onDeleteRow(props.row)" v-if="canDeleteRow(props.row)">
|
|
746
|
+
<q-item-section avatar>
|
|
747
|
+
<q-icon name="sym_o_delete"></q-icon>
|
|
748
|
+
</q-item-section>
|
|
749
|
+
<q-item-section>{{ $t('Delete') }}</q-item-section>
|
|
750
|
+
</q-item>
|
|
751
|
+
|
|
752
|
+
<q-item v-if="props.row.type == 'file'" clickable v-close-popup @click="onDownloadRow(props.row)">
|
|
753
|
+
<q-item-section avatar>
|
|
754
|
+
<q-icon name="sym_o_download"></q-icon>
|
|
755
|
+
</q-item-section>
|
|
756
|
+
<q-item-section>{{ $t('Download') }}</q-item-section>
|
|
757
|
+
</q-item>
|
|
758
|
+
|
|
759
|
+
<q-item clickable v-close-popup @click="onRenameRow(props.row)" v-if="canRenameRow(props.row)">
|
|
760
|
+
<q-item-section avatar>
|
|
761
|
+
<q-icon name="sym_o_edit"></q-icon>
|
|
762
|
+
</q-item-section>
|
|
763
|
+
<q-item-section>{{ $t('Rename') }}</q-item-section>
|
|
764
|
+
</q-item>
|
|
765
|
+
|
|
766
|
+
<q-item clickable v-close-popup @click="onDuplicateFile(props.row)"
|
|
767
|
+
v-if="props.row.type == 'file'">
|
|
768
|
+
<q-item-section avatar>
|
|
769
|
+
<q-icon name="sym_o_content_copy"></q-icon>
|
|
770
|
+
</q-item-section>
|
|
771
|
+
<q-item-section>{{ $t('Duplicate') }}</q-item-section>
|
|
772
|
+
</q-item>
|
|
773
|
+
|
|
774
|
+
<q-item clickable v-close-popup @click="onPreview(props.row)" v-if="canPreview(props.row)">
|
|
775
|
+
<q-item-section avatar>
|
|
776
|
+
<q-icon name="sym_o_preview"></q-icon>
|
|
777
|
+
</q-item-section>
|
|
778
|
+
<q-item-section>{{ $t('Preview') }}</q-item-section>
|
|
779
|
+
</q-item>
|
|
780
|
+
|
|
781
|
+
<q-item clickable v-close-popup v-if="props.row.mime == 'application/pdf'"
|
|
782
|
+
@click="onPreviewPDF(props.row)">
|
|
783
|
+
<q-item-section avatar>
|
|
784
|
+
<q-icon name="sym_o_preview"></q-icon>
|
|
785
|
+
</q-item-section>
|
|
786
|
+
<q-item-section>{{ $t('Preview') }}</q-item-section>
|
|
787
|
+
</q-item>
|
|
788
|
+
|
|
789
|
+
<q-item clickable v-close-popup @click="onClickInfo(props.row)" class="lt-lg">
|
|
790
|
+
<q-item-section avatar>
|
|
791
|
+
<q-icon name="sym_o_info"></q-icon>
|
|
792
|
+
</q-item-section>
|
|
793
|
+
<q-item-section>{{ $t('Info') }}</q-item-section>
|
|
794
|
+
</q-item>
|
|
795
|
+
|
|
796
|
+
</q-list>
|
|
797
|
+
</q-menu>
|
|
798
|
+
</q-btn>
|
|
799
|
+
</q-td>
|
|
800
|
+
</template>
|
|
801
|
+
</q-table>
|
|
802
|
+
</template>
|
|
803
|
+
</div>
|
|
743
804
|
</q-page-container>
|
|
744
805
|
</q-layout>
|
|
745
806
|
</template>
|
|
@@ -4,12 +4,12 @@ import { m, q, useAsyncData } from "#imports";
|
|
|
4
4
|
import { useQuasar } from "#imports";
|
|
5
5
|
const $q = useQuasar();
|
|
6
6
|
const { data: app, refresh } = await useAsyncData(async () => {
|
|
7
|
-
return
|
|
7
|
+
return await q({
|
|
8
8
|
app: {
|
|
9
9
|
driveTypes: true,
|
|
10
10
|
listFileSystem: true
|
|
11
11
|
}
|
|
12
|
-
})).app;
|
|
12
|
+
}).then((res) => res.app);
|
|
13
13
|
});
|
|
14
14
|
const items = computed(() => app.value.listFileSystem);
|
|
15
15
|
const dialog = ref(false);
|
|
@@ -115,8 +115,8 @@ const loading = ref(false);
|
|
|
115
115
|
|
|
116
116
|
<form-kit type="group" name="data">
|
|
117
117
|
<form-kit type="l-input" label="Url" name="url"
|
|
118
|
-
hint="URL is used to generate the full URL of the file."
|
|
119
|
-
|
|
118
|
+
hint="URL is used to generate the full URL of the file."
|
|
119
|
+
placeholder="https://example.com/api/"></form-kit>
|
|
120
120
|
|
|
121
121
|
<template v-if="value.type == 'local'">
|
|
122
122
|
<form-kit type="l-input" label="Location" name="location" validation="required"
|
|
@@ -170,6 +170,9 @@ const loading = ref(false);
|
|
|
170
170
|
}; dialog = true" flat round dense>
|
|
171
171
|
<q-tooltip>Add File System</q-tooltip>
|
|
172
172
|
</q-btn>
|
|
173
|
+
</template>
|
|
174
|
+
|
|
175
|
+
<template #top-selection>
|
|
173
176
|
<q-btn icon="sym_o_delete" @click="onRemove(selected)" flat round dense :disable="selected.length == 0">
|
|
174
177
|
<q-tooltip>Remove File System</q-tooltip>
|
|
175
178
|
</q-btn>
|
|
@@ -6,7 +6,11 @@ import { useQuasar } from "quasar";
|
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
const quasar = useQuasar();
|
|
8
8
|
const { t } = useI18n();
|
|
9
|
-
const system = await q(
|
|
9
|
+
const { system } = await q({
|
|
10
|
+
system: {
|
|
11
|
+
passwordPolicy: true
|
|
12
|
+
}
|
|
13
|
+
});
|
|
10
14
|
const router = useRouter();
|
|
11
15
|
const route = useRoute();
|
|
12
16
|
const id = route.params.user_id;
|