@hostlink/nuxt-light 1.67.5 → 1.67.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.67.5",
4
+ "version": "1.67.6",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import { useI18n } from "vue-i18n";
3
- import { ref, watch, computed } from "vue";
3
+ import { ref, watch, computed, onMounted, nextTick } from "vue";
4
4
  import { useQuasar, format, date } from "quasar";
5
5
  import { q, useLight, showUploadFilesDialog, showDocumentDialog } from "#imports";
6
6
  import { getGrantedRights } from "@hostlink/light";
@@ -30,6 +30,17 @@ const nodes = fss.map((drive) => {
30
30
  type: "drive"
31
31
  };
32
32
  });
33
+ const expandedKeys = ref(nodes.map((n) => n.location));
34
+ onMounted(async () => {
35
+ await nextTick();
36
+ if (!folderTree.value) return;
37
+ for (const key of expandedKeys.value) {
38
+ folderTree.value.setExpanded(key, true);
39
+ }
40
+ if (nodes.length > 0) {
41
+ selectedLocation.value = nodes[0].location;
42
+ }
43
+ });
33
44
  const onLazyLoad = async ({ node, key, done, fail }) => {
34
45
  const folder = await fs.list(node.location);
35
46
  const folders2 = folder.children.filter((item) => item.__typename === "Folder").map((item) => {
@@ -523,7 +534,7 @@ const getFileIcon = (file) => {
523
534
  </q-item>
524
535
 
525
536
  <q-tree ref="folderTree" :nodes="nodes" node-key="location" label-key="name" @lazy-load="onLazyLoad"
526
- v-model:selected="selectedLocation" no-selection-unset>
537
+ v-model:selected="selectedLocation" v-model:expanded="expandedKeys" no-selection-unset>
527
538
  </q-tree>
528
539
 
529
540
  <q-separator inset class="q-my-sm" />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.67.5",
3
+ "version": "1.67.6",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",