@hostlink/nuxt-light 1.61.0 → 1.62.1
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-date-picker.d.vue.ts +2 -2
- package/dist/runtime/components/l-date-picker.vue +47 -40
- package/dist/runtime/components/l-date-picker.vue.d.ts +2 -2
- package/dist/runtime/components/l-dialog-upload-files.d.vue.ts +29 -0
- package/dist/runtime/components/l-dialog-upload-files.vue +178 -0
- package/dist/runtime/components/l-dialog-upload-files.vue.d.ts +29 -0
- package/dist/runtime/components/l-file-manager-breadcrumbs.d.vue.ts +10 -0
- package/dist/runtime/components/l-file-manager-breadcrumbs.vue +37 -0
- package/dist/runtime/components/l-file-manager-breadcrumbs.vue.d.ts +10 -0
- package/dist/runtime/components/l-file-manager-move.d.vue.ts +7 -3
- package/dist/runtime/components/l-file-manager-move.vue +68 -29
- package/dist/runtime/components/l-file-manager-move.vue.d.ts +7 -3
- package/dist/runtime/components/l-file-manager-preview.d.vue.ts +3 -13
- package/dist/runtime/components/l-file-manager-preview.vue +33 -23
- package/dist/runtime/components/l-file-manager-preview.vue.d.ts +3 -13
- package/dist/runtime/components/l-file-manager.vue +173 -256
- package/dist/runtime/composables/showUploadFilesDialog.d.ts +1 -0
- package/dist/runtime/composables/showUploadFilesDialog.js +11 -0
- package/dist/runtime/pages/System/fs.vue +26 -51
- package/package.json +2 -2
|
@@ -1,30 +1,39 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { format, useQuasar } from "quasar";
|
|
2
|
+
import { format, useQuasar, date } from "quasar";
|
|
3
3
|
import { computed } from "vue";
|
|
4
|
-
import { getApiClient } from "@hostlink/light";
|
|
4
|
+
import { getApiClient, query } from "@hostlink/light";
|
|
5
5
|
const api = getApiClient();
|
|
6
6
|
const { humanStorageSize } = format;
|
|
7
7
|
const quasar = useQuasar();
|
|
8
8
|
const props = defineProps({
|
|
9
|
-
|
|
9
|
+
location: {
|
|
10
10
|
type: String,
|
|
11
11
|
required: true
|
|
12
|
-
},
|
|
13
|
-
driveIndex: {
|
|
14
|
-
type: Number,
|
|
15
|
-
default: 0
|
|
16
12
|
}
|
|
17
13
|
});
|
|
18
|
-
const file = await
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
const file = await query({
|
|
15
|
+
app: {
|
|
16
|
+
fs: {
|
|
17
|
+
node: {
|
|
18
|
+
__args: {
|
|
19
|
+
location: props.location
|
|
20
|
+
},
|
|
21
|
+
__typename: true,
|
|
22
|
+
__on: {
|
|
23
|
+
__typeName: "File",
|
|
24
|
+
name: true,
|
|
25
|
+
size: true,
|
|
26
|
+
path: true,
|
|
27
|
+
mimeType: true,
|
|
28
|
+
lastModified: true,
|
|
29
|
+
publicUrl: true
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}).then((res) => res.app.fs.node);
|
|
27
35
|
const size = humanStorageSize(file.size);
|
|
36
|
+
const lastModifiedHuman = date.formatDate(file.lastModified * 1e3, "YYYY-MM-DD HH:mm:ss");
|
|
28
37
|
const copyToClipboard = (text) => {
|
|
29
38
|
let urlToCopy = text;
|
|
30
39
|
if (!text.startsWith("https://") && !text.startsWith("http://")) {
|
|
@@ -43,33 +52,34 @@ const copyToClipboard = (text) => {
|
|
|
43
52
|
});
|
|
44
53
|
};
|
|
45
54
|
const isImage = computed(() => {
|
|
46
|
-
return file.
|
|
55
|
+
return file.mimeType.startsWith("image/");
|
|
47
56
|
});
|
|
48
57
|
const isVideo = computed(() => {
|
|
49
|
-
return file.
|
|
58
|
+
return file.mimeType.startsWith("video/");
|
|
50
59
|
});
|
|
51
60
|
</script>
|
|
52
61
|
|
|
53
62
|
<template>
|
|
54
|
-
<q-img :src="file.
|
|
55
|
-
<q-video :src="file.
|
|
63
|
+
<q-img :src="file.publicUrl" v-if="isImage"></q-img>
|
|
64
|
+
<q-video :src="file.publicUrl" v-else-if="isVideo"></q-video>
|
|
56
65
|
|
|
57
66
|
<q-list dense>
|
|
58
67
|
<l-item label="Name">{{ file.name }}</l-item>
|
|
59
68
|
<l-item label="Size">{{ size }} ({{ file.size }})</l-item>
|
|
60
69
|
<l-item label="Location">{{ file.path }}</l-item>
|
|
61
|
-
<l-item label="Last modified">{{
|
|
70
|
+
<l-item label="Last modified">{{ lastModifiedHuman }}</l-item>
|
|
71
|
+
<l-item label="MIME type">{{ file.mimeType }}</l-item>
|
|
62
72
|
|
|
63
73
|
<q-item>
|
|
64
74
|
<q-item-section side>
|
|
65
75
|
<q-item-label>URL</q-item-label>
|
|
66
76
|
</q-item-section>
|
|
67
77
|
<q-item-section style="align-items: flex-end;">
|
|
68
|
-
<q-item-label lines="1">{{ file.
|
|
78
|
+
<q-item-label lines="1">{{ file.publicUrl }}</q-item-label>
|
|
69
79
|
</q-item-section>
|
|
70
80
|
|
|
71
81
|
<q-item-section side>
|
|
72
|
-
<q-btn size="md" flat dense round icon="sym_o_content_copy" @click="copyToClipboard(file.
|
|
82
|
+
<q-btn size="md" flat dense round icon="sym_o_content_copy" @click="copyToClipboard(file.publicUrl)"></q-btn>
|
|
73
83
|
</q-item-section>
|
|
74
84
|
</q-item>
|
|
75
85
|
</q-list>
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
declare const _default: typeof __VLS_export;
|
|
2
2
|
export default _default;
|
|
3
3
|
declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
-
|
|
4
|
+
location: {
|
|
5
5
|
type: StringConstructor;
|
|
6
6
|
required: true;
|
|
7
7
|
};
|
|
8
|
-
driveIndex: {
|
|
9
|
-
type: NumberConstructor;
|
|
10
|
-
default: number;
|
|
11
|
-
};
|
|
12
8
|
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
13
|
-
|
|
9
|
+
location: {
|
|
14
10
|
type: StringConstructor;
|
|
15
11
|
required: true;
|
|
16
12
|
};
|
|
17
|
-
|
|
18
|
-
type: NumberConstructor;
|
|
19
|
-
default: number;
|
|
20
|
-
};
|
|
21
|
-
}>> & Readonly<{}>, {
|
|
22
|
-
driveIndex: number;
|
|
23
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|