@hostlink/nuxt-light 1.60.3 → 1.60.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.60.3",
4
+ "version": "1.60.5",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -26,7 +26,12 @@ const file = await api.drive(props.driveIndex).files.get(props.path, {
26
26
  });
27
27
  const size = humanStorageSize(file.size);
28
28
  const copyToClipboard = (text) => {
29
- navigator.clipboard.writeText(text).then(() => {
29
+ let urlToCopy = text;
30
+ if (!text.startsWith("https://") && !text.startsWith("http://")) {
31
+ const baseUrl = window.location.origin;
32
+ urlToCopy = baseUrl + (text.startsWith("/") ? text : "/" + text);
33
+ }
34
+ navigator.clipboard.writeText(urlToCopy).then(() => {
30
35
  quasar.notify({
31
36
  message: "URL copied to clipboard",
32
37
  color: "positive",
@@ -357,22 +357,7 @@ const submitSearch = (e) => {
357
357
  loadItems();
358
358
  };
359
359
  const onDownloadRow = async (row) => {
360
- const app = await q({
361
- app: {
362
- drive: {
363
- __args: {
364
- index: row.driveIndex
365
- },
366
- file: {
367
- __args: {
368
- path: row.path
369
- },
370
- base64Content: true
371
- }
372
- }
373
- }
374
- });
375
- const base64Content = app.app.drive.file.base64Content;
360
+ const base64Content = await getDrive(row.driveIndex).files.readFileAsBase64(row.path);
376
361
  const downloadLink = document.createElement("a");
377
362
  downloadLink.href = `data:application/octet-stream;base64,${base64Content}`;
378
363
  downloadLink.download = row.name;
@@ -484,6 +469,25 @@ const onCheckTotalSize = async (folder) => {
484
469
  progress: false
485
470
  });
486
471
  };
472
+ const onDuplicateFile = async (file) => {
473
+ try {
474
+ const newPath = await m("lightDriveDuplicateFile", {
475
+ index: file.driveIndex,
476
+ path: file.path
477
+ });
478
+ $q.notify({
479
+ type: "positive",
480
+ message: "File duplicated to " + newPath
481
+ });
482
+ } catch (e) {
483
+ $q.dialog({
484
+ title: "Error",
485
+ message: e.message
486
+ });
487
+ return;
488
+ }
489
+ await loadItems();
490
+ };
487
491
  selectedNodePath.value = drives[0].index.toString();
488
492
  </script>
489
493
 
@@ -700,6 +704,13 @@ selectedNodePath.value = drives[0].index.toString();
700
704
  <q-item-section>{{ $t('Rename') }}</q-item-section>
701
705
  </q-item>
702
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
+
703
714
  <q-item clickable v-close-popup @click="onPreview(props.row)" v-if="props.row.canPreview">
704
715
  <q-item-section avatar>
705
716
  <q-icon name="sym_o_preview"></q-icon>
@@ -2,12 +2,12 @@ export interface LLoginProps {
2
2
  company: string;
3
3
  companyLogo: string;
4
4
  twoFactorAuthentication: boolean;
5
- forgetPasswordEnabled: boolean;
6
5
  passwordBasedEnabled: boolean;
7
6
  googleClientId?: string;
8
7
  microsoftClientId?: string;
9
8
  microsoftTenantId?: string;
10
9
  facebookAppId?: string;
10
+ forgetPasswordEnabled: boolean;
11
11
  }
12
12
  declare const __VLS_export: import("vue").DefineComponent<LLoginProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
13
  declare const _default: typeof __VLS_export;
@@ -11,12 +11,12 @@ const props = defineProps({
11
11
  company: { type: String, required: true },
12
12
  companyLogo: { type: String, required: true },
13
13
  twoFactorAuthentication: { type: Boolean, required: true },
14
- forgetPasswordEnabled: { type: Boolean, required: true },
15
14
  passwordBasedEnabled: { type: Boolean, required: true },
16
15
  googleClientId: { type: String, required: false },
17
16
  microsoftClientId: { type: String, required: false },
18
17
  microsoftTenantId: { type: String, required: false },
19
- facebookAppId: { type: String, required: false }
18
+ facebookAppId: { type: String, required: false },
19
+ forgetPasswordEnabled: { type: Boolean, required: true }
20
20
  });
21
21
  useHead({
22
22
  title: props.company
@@ -2,12 +2,12 @@ export interface LLoginProps {
2
2
  company: string;
3
3
  companyLogo: string;
4
4
  twoFactorAuthentication: boolean;
5
- forgetPasswordEnabled: boolean;
6
5
  passwordBasedEnabled: boolean;
7
6
  googleClientId?: string;
8
7
  microsoftClientId?: string;
9
8
  microsoftTenantId?: string;
10
9
  facebookAppId?: string;
10
+ forgetPasswordEnabled: boolean;
11
11
  }
12
12
  declare const __VLS_export: import("vue").DefineComponent<LLoginProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, any, string, import("vue").PublicProps, any, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
13
  declare const _default: typeof __VLS_export;
@@ -484,18 +484,25 @@ const showTopRight = computed(() => {
484
484
  const hidableColumns = computed(() => {
485
485
  return props.columns?.filter((c) => !c.required) || [];
486
486
  });
487
+ const hideColumnsStorageKey = computed(() => {
488
+ return "l-table-hide-columns-" + simpleRouteName.value + "-" + props.name;
489
+ });
487
490
  const visibleColumns = computed({
488
491
  get() {
489
492
  if (props.name) {
490
- return useStorage("l-table-visible-columns-" + simpleRouteName.value + "-" + props.name, hidableColumns.value.map((c) => c.name)).value;
493
+ const hiddenColumns = useStorage(hideColumnsStorageKey.value, []).value;
494
+ const allHidable = hidableColumns.value.map((c) => c.name);
495
+ return allHidable.filter((name) => !hiddenColumns.includes(name));
491
496
  } else {
492
497
  return null;
493
498
  }
494
499
  },
495
500
  set(value) {
496
- if (props.name) {
497
- const storage = useStorage("l-table-visible-columns-" + simpleRouteName.value + "-" + props.name, hidableColumns.value.map((c) => c.name));
498
- storage.value = value;
501
+ if (props.name && value) {
502
+ const allHidable = hidableColumns.value.map((c) => c.name);
503
+ const hiddenColumns = allHidable.filter((name) => !value.includes(name));
504
+ const storage = useStorage(hideColumnsStorageKey.value, []);
505
+ storage.value = hiddenColumns;
499
506
  }
500
507
  }
501
508
  });
@@ -1,5 +1,6 @@
1
1
  <script setup>
2
2
  import { useObject } from "#imports";
3
+ import { ref } from "vue";
3
4
  const { data: obj } = await useObject({
4
5
  eventlog_id: true,
5
6
  class: true,
@@ -11,7 +12,7 @@ const { data: obj } = await useObject({
11
12
  target: true,
12
13
  different: true
13
14
  });
14
- const splitterModel = 50;
15
+ const splitterModel = ref(50);
15
16
  </script>
16
17
 
17
18
  <template>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.60.3",
3
+ "version": "1.60.5",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",
@@ -53,6 +53,7 @@
53
53
  "@nuxt/kit": "^4.2.2",
54
54
  "@nuxt/schema": "^4.2.2",
55
55
  "@nuxt/test-utils": "^3.17.2",
56
+ "@types/google.accounts": "^0.0.18",
56
57
  "@types/node": "^24.10.1",
57
58
  "changelogen": "^0.5.7",
58
59
  "eslint": "^9.39.1",