@hostlink/nuxt-light 1.60.6 → 1.62.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.
Files changed (176) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/L/CustomField/Add.d.vue.ts +17 -9
  3. package/dist/runtime/components/L/CustomField/Add.vue.d.ts +17 -9
  4. package/dist/runtime/components/L/CustomField/List.d.vue.ts +5 -1
  5. package/dist/runtime/components/L/CustomField/List.vue.d.ts +5 -1
  6. package/dist/runtime/components/L/Database/create-table-dialog.d.vue.ts +7 -6
  7. package/dist/runtime/components/L/Database/create-table-dialog.vue.d.ts +7 -6
  8. package/dist/runtime/components/L/Fieldset.d.vue.ts +20 -7
  9. package/dist/runtime/components/L/Fieldset.vue.d.ts +20 -7
  10. package/dist/runtime/components/L/Revision.d.vue.ts +19 -9
  11. package/dist/runtime/components/L/Revision.vue.d.ts +19 -9
  12. package/dist/runtime/components/L/Storage.d.vue.ts +11 -7
  13. package/dist/runtime/components/L/Storage.vue.d.ts +11 -7
  14. package/dist/runtime/components/L/System/Setting/authentication.d.vue.ts +11 -1
  15. package/dist/runtime/components/L/System/Setting/authentication.vue.d.ts +11 -1
  16. package/dist/runtime/components/L/System/Setting/developer.d.vue.ts +4 -1
  17. package/dist/runtime/components/L/System/Setting/developer.vue.d.ts +4 -1
  18. package/dist/runtime/components/L/System/Setting/forget-password.d.vue.ts +5 -1
  19. package/dist/runtime/components/L/System/Setting/forget-password.vue.d.ts +5 -1
  20. package/dist/runtime/components/L/System/Setting/general.d.vue.ts +6 -1
  21. package/dist/runtime/components/L/System/Setting/general.vue.d.ts +6 -1
  22. package/dist/runtime/components/L/System/Setting/mail.d.vue.ts +7 -1
  23. package/dist/runtime/components/L/System/Setting/mail.vue.d.ts +7 -1
  24. package/dist/runtime/components/L/System/Setting/modules.d.vue.ts +5 -1
  25. package/dist/runtime/components/L/System/Setting/modules.vue.d.ts +5 -1
  26. package/dist/runtime/components/L/System/Setting/security.d.vue.ts +20 -1
  27. package/dist/runtime/components/L/System/Setting/security.vue +5 -2
  28. package/dist/runtime/components/L/System/Setting/security.vue.d.ts +20 -1
  29. package/dist/runtime/components/L/ValidationInput.d.vue.ts +22 -6
  30. package/dist/runtime/components/L/ValidationInput.vue.d.ts +22 -6
  31. package/dist/runtime/components/MyTest.d.vue.ts +5 -7
  32. package/dist/runtime/components/MyTest.vue.d.ts +5 -7
  33. package/dist/runtime/components/l-add-btn.d.vue.ts +16 -10
  34. package/dist/runtime/components/l-add-btn.vue.d.ts +16 -10
  35. package/dist/runtime/components/l-alert.d.vue.ts +12 -6
  36. package/dist/runtime/components/l-alert.vue.d.ts +12 -6
  37. package/dist/runtime/components/l-app-main.d.vue.ts +10 -6
  38. package/dist/runtime/components/l-app-main.vue.d.ts +10 -6
  39. package/dist/runtime/components/l-banner.d.vue.ts +6 -3
  40. package/dist/runtime/components/l-banner.vue.d.ts +6 -3
  41. package/dist/runtime/components/l-bar.d.vue.ts +4 -1
  42. package/dist/runtime/components/l-bar.vue.d.ts +4 -1
  43. package/dist/runtime/components/l-btn.d.vue.ts +6 -1
  44. package/dist/runtime/components/l-btn.vue.d.ts +6 -1
  45. package/dist/runtime/components/l-card.d.vue.ts +16 -4
  46. package/dist/runtime/components/l-card.vue.d.ts +16 -4
  47. package/dist/runtime/components/l-checkbox.d.vue.ts +3 -1
  48. package/dist/runtime/components/l-checkbox.vue.d.ts +3 -1
  49. package/dist/runtime/components/l-col.d.vue.ts +6 -1
  50. package/dist/runtime/components/l-col.vue.d.ts +6 -1
  51. package/dist/runtime/components/l-customizer.d.vue.ts +68 -16
  52. package/dist/runtime/components/l-customizer.vue.d.ts +68 -16
  53. package/dist/runtime/components/l-date-picker.d.vue.ts +16 -3
  54. package/dist/runtime/components/l-date-picker.vue.d.ts +16 -3
  55. package/dist/runtime/components/l-delete-btn.d.vue.ts +8 -8
  56. package/dist/runtime/components/l-delete-btn.vue.d.ts +8 -8
  57. package/dist/runtime/components/l-dialog-database-field-add.d.vue.ts +7 -6
  58. package/dist/runtime/components/l-dialog-database-field-add.vue.d.ts +7 -6
  59. package/dist/runtime/components/l-dialog-upload-files.d.vue.ts +29 -0
  60. package/dist/runtime/components/l-dialog-upload-files.vue +178 -0
  61. package/dist/runtime/components/l-dialog-upload-files.vue.d.ts +29 -0
  62. package/dist/runtime/components/l-drag-drop-container.d.vue.ts +15 -7
  63. package/dist/runtime/components/l-drag-drop-container.vue.d.ts +15 -7
  64. package/dist/runtime/components/l-drag-drop-group.d.vue.ts +9 -2
  65. package/dist/runtime/components/l-drag-drop-group.vue.d.ts +9 -2
  66. package/dist/runtime/components/l-editor.d.vue.ts +11 -1
  67. package/dist/runtime/components/l-editor.vue.d.ts +11 -1
  68. package/dist/runtime/components/l-facebook-button.d.vue.ts +5 -4
  69. package/dist/runtime/components/l-facebook-button.vue.d.ts +5 -4
  70. package/dist/runtime/components/l-fav-menu.d.vue.ts +5 -7
  71. package/dist/runtime/components/l-fav-menu.vue.d.ts +5 -7
  72. package/dist/runtime/components/l-field.d.vue.ts +11 -1
  73. package/dist/runtime/components/l-field.vue.d.ts +11 -1
  74. package/dist/runtime/components/l-file-manager-breadcrumbs.d.vue.ts +10 -0
  75. package/dist/runtime/components/l-file-manager-breadcrumbs.vue +37 -0
  76. package/dist/runtime/components/l-file-manager-breadcrumbs.vue.d.ts +10 -0
  77. package/dist/runtime/components/l-file-manager-labels.d.vue.ts +4 -4
  78. package/dist/runtime/components/l-file-manager-labels.vue.d.ts +4 -4
  79. package/dist/runtime/components/l-file-manager-move.d.vue.ts +13 -9
  80. package/dist/runtime/components/l-file-manager-move.vue +68 -29
  81. package/dist/runtime/components/l-file-manager-move.vue.d.ts +13 -9
  82. package/dist/runtime/components/l-file-manager-preview.d.vue.ts +11 -9
  83. package/dist/runtime/components/l-file-manager-preview.vue +33 -23
  84. package/dist/runtime/components/l-file-manager-preview.vue.d.ts +11 -9
  85. package/dist/runtime/components/l-file-manager.d.vue.ts +45 -13
  86. package/dist/runtime/components/l-file-manager.vue +173 -256
  87. package/dist/runtime/components/l-file-manager.vue.d.ts +45 -13
  88. package/dist/runtime/components/l-file-upload.d.vue.ts +14 -3
  89. package/dist/runtime/components/l-file-upload.vue.d.ts +14 -3
  90. package/dist/runtime/components/l-file.d.vue.ts +13 -1
  91. package/dist/runtime/components/l-file.vue.d.ts +13 -1
  92. package/dist/runtime/components/l-form-dialog.d.vue.ts +57 -14
  93. package/dist/runtime/components/l-form-dialog.vue.d.ts +57 -14
  94. package/dist/runtime/components/l-form.d.vue.ts +33 -1
  95. package/dist/runtime/components/l-form.vue.d.ts +33 -1
  96. package/dist/runtime/components/l-group-select.d.vue.ts +38 -9
  97. package/dist/runtime/components/l-group-select.vue.d.ts +38 -9
  98. package/dist/runtime/components/l-icon-picker.d.vue.ts +6 -0
  99. package/dist/runtime/components/l-icon-picker.vue.d.ts +6 -0
  100. package/dist/runtime/components/l-input-select.d.vue.ts +13 -1
  101. package/dist/runtime/components/l-input-select.vue.d.ts +13 -1
  102. package/dist/runtime/components/l-input.d.vue.ts +12 -2
  103. package/dist/runtime/components/l-input.vue.d.ts +12 -2
  104. package/dist/runtime/components/l-item.d.vue.ts +5 -1
  105. package/dist/runtime/components/l-item.vue.d.ts +5 -1
  106. package/dist/runtime/components/l-link.d.vue.ts +19 -9
  107. package/dist/runtime/components/l-link.vue.d.ts +19 -9
  108. package/dist/runtime/components/l-list.d.vue.ts +5 -1
  109. package/dist/runtime/components/l-list.vue.d.ts +5 -1
  110. package/dist/runtime/components/l-login.d.vue.ts +5 -1
  111. package/dist/runtime/components/l-login.vue.d.ts +5 -1
  112. package/dist/runtime/components/l-menu.d.vue.ts +5 -7
  113. package/dist/runtime/components/l-menu.vue.d.ts +5 -7
  114. package/dist/runtime/components/l-microsoft-button.d.vue.ts +11 -1
  115. package/dist/runtime/components/l-microsoft-button.vue.d.ts +11 -1
  116. package/dist/runtime/components/l-page.d.vue.ts +9 -4
  117. package/dist/runtime/components/l-page.vue.d.ts +9 -4
  118. package/dist/runtime/components/l-repeater.d.vue.ts +75 -18
  119. package/dist/runtime/components/l-repeater.vue.d.ts +75 -18
  120. package/dist/runtime/components/l-row.d.vue.ts +3 -1
  121. package/dist/runtime/components/l-row.vue.d.ts +3 -1
  122. package/dist/runtime/components/l-select.d.vue.ts +17 -1
  123. package/dist/runtime/components/l-select.vue.d.ts +17 -1
  124. package/dist/runtime/components/l-setup-2fa-dialog.d.vue.ts +25 -11
  125. package/dist/runtime/components/l-setup-2fa-dialog.vue.d.ts +25 -11
  126. package/dist/runtime/components/l-small-box.d.vue.ts +6 -1
  127. package/dist/runtime/components/l-small-box.vue.d.ts +6 -1
  128. package/dist/runtime/components/l-statistic.d.vue.ts +14 -8
  129. package/dist/runtime/components/l-statistic.vue.d.ts +14 -8
  130. package/dist/runtime/components/l-table.d.vue.ts +29 -7
  131. package/dist/runtime/components/l-table.vue.d.ts +29 -7
  132. package/dist/runtime/components/l-tabs.d.vue.ts +4 -1
  133. package/dist/runtime/components/l-tabs.vue.d.ts +4 -1
  134. package/dist/runtime/components/l-time-picker.d.vue.ts +8 -3
  135. package/dist/runtime/components/l-time-picker.vue.d.ts +8 -3
  136. package/dist/runtime/components/user-list.d.vue.ts +5 -7
  137. package/dist/runtime/components/user-list.vue.d.ts +5 -7
  138. package/dist/runtime/composables/showUploadFilesDialog.d.ts +1 -0
  139. package/dist/runtime/composables/showUploadFilesDialog.js +11 -0
  140. package/dist/runtime/composables/useLight.d.ts +22 -22
  141. package/dist/runtime/formkit/Checkbox.d.vue.ts +5 -7
  142. package/dist/runtime/formkit/Checkbox.vue.d.ts +5 -7
  143. package/dist/runtime/formkit/DatePicker.d.vue.ts +5 -7
  144. package/dist/runtime/formkit/DatePicker.vue.d.ts +5 -7
  145. package/dist/runtime/formkit/Editor.d.vue.ts +5 -7
  146. package/dist/runtime/formkit/Editor.vue.d.ts +5 -7
  147. package/dist/runtime/formkit/File.d.vue.ts +5 -7
  148. package/dist/runtime/formkit/File.vue.d.ts +5 -7
  149. package/dist/runtime/formkit/FilePicker.d.vue.ts +5 -7
  150. package/dist/runtime/formkit/FilePicker.vue.d.ts +5 -7
  151. package/dist/runtime/formkit/FileUpload.d.vue.ts +5 -7
  152. package/dist/runtime/formkit/FileUpload.vue.d.ts +5 -7
  153. package/dist/runtime/formkit/Form.d.vue.ts +3 -1
  154. package/dist/runtime/formkit/Form.vue.d.ts +3 -1
  155. package/dist/runtime/formkit/GroupSelect.d.vue.ts +5 -7
  156. package/dist/runtime/formkit/GroupSelect.vue.d.ts +5 -7
  157. package/dist/runtime/formkit/Input.d.vue.ts +1 -1
  158. package/dist/runtime/formkit/Input.vue.d.ts +1 -1
  159. package/dist/runtime/formkit/InputSelect.d.vue.ts +1 -1
  160. package/dist/runtime/formkit/InputSelect.vue.d.ts +1 -1
  161. package/dist/runtime/formkit/InputXlsx.d.vue.ts +5 -7
  162. package/dist/runtime/formkit/InputXlsx.vue.d.ts +5 -7
  163. package/dist/runtime/formkit/OptionGroup.d.vue.ts +5 -7
  164. package/dist/runtime/formkit/OptionGroup.vue.d.ts +5 -7
  165. package/dist/runtime/formkit/Radio.d.vue.ts +5 -7
  166. package/dist/runtime/formkit/Radio.vue.d.ts +5 -7
  167. package/dist/runtime/formkit/Repeater.d.vue.ts +5 -7
  168. package/dist/runtime/formkit/Repeater.vue.d.ts +5 -7
  169. package/dist/runtime/formkit/Select.d.vue.ts +5 -7
  170. package/dist/runtime/formkit/Select.vue.d.ts +5 -7
  171. package/dist/runtime/formkit/Textarea.d.vue.ts +1 -1
  172. package/dist/runtime/formkit/Textarea.vue.d.ts +1 -1
  173. package/dist/runtime/formkit/TimePicker.d.vue.ts +5 -7
  174. package/dist/runtime/formkit/TimePicker.vue.d.ts +5 -7
  175. package/dist/runtime/pages/System/fs.vue +26 -51
  176. package/package.json +3 -3
@@ -0,0 +1,37 @@
1
+ <script setup>
2
+ import { computed } from "vue";
3
+ const modelValue = defineModel();
4
+ const breadcrumbs = computed(() => {
5
+ if (!modelValue.value) {
6
+ return [];
7
+ }
8
+ const path = modelValue.value;
9
+ const protocolMatch = path.match(/^([a-zA-Z0-9]+):\/\/(.*)$/);
10
+ if (!protocolMatch) {
11
+ return [];
12
+ }
13
+ const protocol = protocolMatch[1];
14
+ const pathParts = protocolMatch[2].split("/").filter((part) => part.length > 0);
15
+ let breadcrumbs2 = [{
16
+ label: protocol,
17
+ location: `${protocol}://`
18
+ }];
19
+ let currentPath = `${protocol}://`;
20
+ for (let part of pathParts) {
21
+ currentPath += part;
22
+ breadcrumbs2.push({
23
+ label: part,
24
+ location: currentPath
25
+ });
26
+ currentPath += "/";
27
+ }
28
+ return breadcrumbs2;
29
+ });
30
+ </script>
31
+
32
+ <template>
33
+ <q-breadcrumbs>
34
+ <q-breadcrumbs-el v-for="(b, index) in breadcrumbs" :label="b.label" :key="index"
35
+ @click="$emit('update:modelValue', b.location)" href="javascript:void(0)"></q-breadcrumbs-el>
36
+ </q-breadcrumbs>
37
+ </template>
@@ -0,0 +1,10 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ "update:modelValue": (value: any) => any;
5
+ }, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{
6
+ "onUpdate:modelValue"?: ((value: any) => any) | undefined;
7
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ type __VLS_ModelProps = {
9
+ modelValue?: any;
10
+ };
@@ -1,6 +1,6 @@
1
1
  declare const _default: typeof __VLS_export;
2
2
  export default _default;
3
- declare const __VLS_export: import("vue").DefineComponent<{}, {
4
- $emit: typeof emit;
5
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
- declare const emit: (event: "update:modelValue", ...args: any[]) => void;
3
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ type __VLS_ModelProps = {
5
+ modelValue?: string | undefined;
6
+ };
@@ -1,6 +1,6 @@
1
1
  declare const _default: typeof __VLS_export;
2
2
  export default _default;
3
- declare const __VLS_export: import("vue").DefineComponent<{}, {
4
- $emit: typeof emit;
5
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
- declare const emit: (event: "update:modelValue", ...args: any[]) => void;
3
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_ModelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_ModelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
4
+ type __VLS_ModelProps = {
5
+ modelValue?: string | undefined;
6
+ };
@@ -1,11 +1,15 @@
1
1
  declare const _default: typeof __VLS_export;
2
2
  export default _default;
3
- declare const __VLS_export: import("vue").DefineComponent<{}, {
4
- $emit: typeof emit;
5
- $props: Partial<typeof props>;
6
- driveIndex?: number | undefined;
7
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
- declare const emit: (event: "selected", ...args: any[]) => void;
9
- declare const props: {
10
- readonly driveIndex?: number | undefined;
11
- };
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ current_location: StringConstructor;
5
+ allow_cross_fs: BooleanConstructor;
6
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ selected: (...args: any[]) => void;
8
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
+ current_location: StringConstructor;
10
+ allow_cross_fs: BooleanConstructor;
11
+ }>> & Readonly<{
12
+ onSelected?: ((...args: any[]) => any) | undefined;
13
+ }>, {
14
+ allow_cross_fs: boolean;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,35 +1,79 @@
1
1
  <script setup>
2
- import { ref, computed, watch } from "vue";
2
+ import { ref, watch } from "vue";
3
3
  import { useQuasar } from "quasar";
4
- import { getApiClient } from "@hostlink/light";
4
+ import { fs, query } from "@hostlink/light";
5
5
  const props = defineProps({
6
- driveIndex: Number
6
+ current_location: String,
7
+ allow_cross_fs: Boolean
7
8
  });
8
- const api = getApiClient();
9
9
  const emit = defineEmits(["selected"]);
10
- const data = await api.drive(props.driveIndex).folders.list("/");
10
+ const protocolMatch = props.current_location.match(/^([a-zA-Z0-9]+):\/\/(.*)$/);
11
+ const filesystem = ref(protocolMatch ? protocolMatch[1] : "");
12
+ const fss = await query({
13
+ app: {
14
+ fs: {
15
+ list: true
16
+ }
17
+ }
18
+ }).then((res) => res.app.fs.list.map((f) => ({ label: f.name, value: f.name + "://" })));
19
+ const data = await query({
20
+ app: {
21
+ fs: {
22
+ node: {
23
+ __args: {
24
+ location: props.current_location
25
+ },
26
+ __on: {
27
+ __typeName: "Folder",
28
+ children: {
29
+ __typename: true,
30
+ __on: {
31
+ __typeName: "Folder",
32
+ name: true,
33
+ location: true
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }).then((res) => res.app.fs.node.children.filter((n) => n.__typename === "Folder"));
11
41
  const folders = ref(data);
12
42
  const mode = ref("move");
13
- const folder = ref("/");
14
- const parent = ref("/");
43
+ const folder = ref(props.current_location);
15
44
  const qua = useQuasar();
16
- const drive = api.drive(props.driveIndex);
17
- watch(folder, async () => {
18
- folders.value = await drive.folders.list(folder.value);
45
+ watch(filesystem, async () => {
46
+ console.log(filesystem.value);
47
+ folder.value = filesystem.value;
19
48
  });
20
- const clickBack = () => {
21
- folder.value = parent.value;
22
- };
23
- const title = computed(() => {
24
- if (folder.value) {
25
- return folder.value.split("/").pop();
26
- }
27
- return "";
49
+ watch(folder, async () => {
50
+ folders.value = await query({
51
+ app: {
52
+ fs: {
53
+ node: {
54
+ __args: {
55
+ location: folder.value
56
+ },
57
+ __on: {
58
+ __typeName: "Folder",
59
+ children: {
60
+ __typename: true,
61
+ __on: {
62
+ __typeName: "Folder",
63
+ name: true,
64
+ location: true
65
+ }
66
+ }
67
+ }
68
+ }
69
+ }
70
+ }
71
+ }).then((res) => res.app.fs.node.children.filter((n) => n.__typename === "Folder"));
28
72
  });
29
73
  const newFolder = ref(null);
30
74
  const onClickCreate = async () => {
31
75
  let f = folder.value + "/" + newFolder.value;
32
- await drive.folders.create(f);
76
+ fs.createFolder(f);
33
77
  folder.value = f;
34
78
  mode.value = "move";
35
79
  };
@@ -43,9 +87,6 @@ const onClickMove = async () => {
43
87
  }).onOk(async () => {
44
88
  menu.value.hide();
45
89
  emit("selected", folder.value);
46
- folder.value = "/";
47
- parent.value = null;
48
- folder.value = "/";
49
90
  });
50
91
  };
51
92
  </script>
@@ -53,6 +94,9 @@ const onClickMove = async () => {
53
94
  <template>
54
95
  <q-menu transition-show="jump-down" transition-hide="jump-up" ref="menu">
55
96
  <q-card>
97
+ <q-card-section v-if="allow_cross_fs">
98
+ <q-select label="Filesystem" :options="fss" v-model="filesystem" dense emit-value map-options />
99
+ </q-card-section>
56
100
  <q-toolbar>
57
101
  <template v-if="mode == 'create'">
58
102
  <q-btn flat dense round @click="mode = 'move'" icon="sym_o_arrow_back" class="q-mr-sm">
@@ -61,12 +105,7 @@ const onClickMove = async () => {
61
105
 
62
106
  </template>
63
107
  <template v-else>
64
- <q-btn flat dense round @click="clickBack()" v-if="folder !== '/'" icon="sym_o_arrow_back">
65
- <q-tooltip>Back</q-tooltip>
66
- </q-btn>
67
- <q-toolbar-title>
68
- {{ title }}
69
- </q-toolbar-title>
108
+ <l-file-manager-breadcrumbs v-model="folder" />
70
109
 
71
110
  </template>
72
111
 
@@ -91,7 +130,7 @@ const onClickMove = async () => {
91
130
 
92
131
  <template v-if="mode == 'move'">
93
132
  <q-list>
94
- <q-item v-for="(b, index) in folders" :key="index" clickable @click="parent = folder; folder = b.path;">
133
+ <q-item v-for="(b, index) in folders" :key="index" clickable @click="folder = b.location;">
95
134
 
96
135
  <q-item-section avatar>
97
136
  <q-icon name="sym_o_folder"></q-icon>
@@ -1,11 +1,15 @@
1
1
  declare const _default: typeof __VLS_export;
2
2
  export default _default;
3
- declare const __VLS_export: import("vue").DefineComponent<{}, {
4
- $emit: typeof emit;
5
- $props: Partial<typeof props>;
6
- driveIndex?: number | undefined;
7
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
- declare const emit: (event: "selected", ...args: any[]) => void;
9
- declare const props: {
10
- readonly driveIndex?: number | undefined;
11
- };
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ current_location: StringConstructor;
5
+ allow_cross_fs: BooleanConstructor;
6
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ selected: (...args: any[]) => void;
8
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
+ current_location: StringConstructor;
10
+ allow_cross_fs: BooleanConstructor;
11
+ }>> & Readonly<{
12
+ onSelected?: ((...args: any[]) => any) | undefined;
13
+ }>, {
14
+ allow_cross_fs: boolean;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,11 +1,13 @@
1
1
  declare const _default: typeof __VLS_export;
2
2
  export default _default;
3
- declare const __VLS_export: import("vue").DefineComponent<{}, {
4
- $props: Partial<typeof props>;
5
- path: string;
6
- driveIndex: number;
7
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
- declare const props: {
9
- readonly path: string;
10
- readonly driveIndex: number;
11
- };
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ location: {
5
+ type: StringConstructor;
6
+ required: true;
7
+ };
8
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
+ location: {
10
+ type: StringConstructor;
11
+ required: true;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -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
- path: {
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 api.drive(props.driveIndex).files.get(props.path, {
19
- name: true,
20
- size: true,
21
- mime: true,
22
- url: true,
23
- lastModified: true,
24
- lastModifiedHuman: true,
25
- path: true
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.mime.startsWith("image/");
55
+ return file.mimeType.startsWith("image/");
47
56
  });
48
57
  const isVideo = computed(() => {
49
- return file.mime.startsWith("video/");
58
+ return file.mimeType.startsWith("video/");
50
59
  });
51
60
  </script>
52
61
 
53
62
  <template>
54
- <q-img :src="file.url" v-if="isImage"></q-img>
55
- <q-video :src="file.url" v-else-if="isVideo"></q-video>
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">{{ file.lastModifiedHuman }}</l-item>
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.url }}</q-item-label>
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.url)"></q-btn>
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,11 +1,13 @@
1
1
  declare const _default: typeof __VLS_export;
2
2
  export default _default;
3
- declare const __VLS_export: import("vue").DefineComponent<{}, {
4
- $props: Partial<typeof props>;
5
- path: string;
6
- driveIndex: number;
7
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
8
- declare const props: {
9
- readonly path: string;
10
- readonly driveIndex: number;
11
- };
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ location: {
5
+ type: StringConstructor;
6
+ required: true;
7
+ };
8
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
9
+ location: {
10
+ type: StringConstructor;
11
+ required: true;
12
+ };
13
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,19 +1,51 @@
1
1
  declare const _default: typeof __VLS_export;
2
2
  export default _default;
3
- declare const __VLS_export: import("vue").DefineComponent<{}, {
4
- $emit: typeof emit;
5
- $props: Partial<typeof props>;
3
+ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
+ closeable: BooleanConstructor;
5
+ height: {
6
+ type: StringConstructor;
7
+ default: string;
8
+ };
9
+ defaultAction: {
10
+ default: string;
11
+ type: StringConstructor;
12
+ };
13
+ multiple: {
14
+ default: boolean;
15
+ type: BooleanConstructor;
16
+ };
17
+ base: {
18
+ default: string;
19
+ type: StringConstructor;
20
+ };
21
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ input: (...args: any[]) => void;
23
+ close: (...args: any[]) => void;
24
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
25
+ closeable: BooleanConstructor;
26
+ height: {
27
+ type: StringConstructor;
28
+ default: string;
29
+ };
30
+ defaultAction: {
31
+ default: string;
32
+ type: StringConstructor;
33
+ };
34
+ multiple: {
35
+ default: boolean;
36
+ type: BooleanConstructor;
37
+ };
38
+ base: {
39
+ default: string;
40
+ type: StringConstructor;
41
+ };
42
+ }>> & Readonly<{
43
+ onInput?: ((...args: any[]) => any) | undefined;
44
+ onClose?: ((...args: any[]) => any) | undefined;
45
+ }>, {
46
+ base: string;
6
47
  height: string;
7
48
  multiple: boolean;
8
- base: string;
9
49
  closeable: boolean;
10
50
  defaultAction: string;
11
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
- declare const emit: (event: "close" | "input", ...args: any[]) => void;
13
- declare const props: {
14
- readonly height: string;
15
- readonly multiple: boolean;
16
- readonly base: string;
17
- readonly closeable: boolean;
18
- readonly defaultAction: string;
19
- };
51
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;