@hostlink/nuxt-light 1.53.0 → 1.53.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
CHANGED
|
@@ -241,12 +241,12 @@ const onLogout = async () => {
|
|
|
241
241
|
<q-layout :view="layoutView">
|
|
242
242
|
<q-header bordered class="text-white" :class="`bg-${light.color}`">
|
|
243
243
|
<q-toolbar>
|
|
244
|
-
<q-btn dense flat round icon="
|
|
244
|
+
<q-btn dense flat round icon="sym_o_menu" class="q-mr-sm" @click="toggleLeftDrawer" />
|
|
245
245
|
|
|
246
246
|
<q-toolbar-title>
|
|
247
247
|
{{ light.company }}
|
|
248
248
|
<template v-if="tt.system.devMode">
|
|
249
|
-
-
|
|
249
|
+
<span style="font-size: 0.8em;">[Dev mode]</span>
|
|
250
250
|
</template>
|
|
251
251
|
</q-toolbar-title>
|
|
252
252
|
|
|
@@ -347,7 +347,7 @@ const onLogout = async () => {
|
|
|
347
347
|
</q-menu>
|
|
348
348
|
</q-btn>
|
|
349
349
|
|
|
350
|
-
<q-btn dense flat round icon="
|
|
350
|
+
<q-btn dense flat round icon="sym_o_menu" @click="toggleRightDrawer" />
|
|
351
351
|
</q-toolbar>
|
|
352
352
|
</q-header>
|
|
353
353
|
|
|
@@ -561,6 +561,7 @@ selectedNodePath.value = drives[0].index.toString();
|
|
|
561
561
|
</q-drawer>
|
|
562
562
|
|
|
563
563
|
<q-page-container :style="{ height }">
|
|
564
|
+
|
|
564
565
|
|
|
565
566
|
<q-dialog v-model="showPreviewImgDialog" full-width full-height auto-close>
|
|
566
567
|
<q-card>
|
|
@@ -603,7 +604,7 @@ selectedNodePath.value = drives[0].index.toString();
|
|
|
603
604
|
{{ $t('Delete') }}
|
|
604
605
|
</q-tooltip>
|
|
605
606
|
</q-btn>
|
|
606
|
-
<q-btn flat round :icon="grid ? '
|
|
607
|
+
<q-btn flat round :icon="grid ? 'sym_o_view_list' : 'sym_o_grid_view'" @click="grid = !grid">
|
|
607
608
|
<q-tooltip>
|
|
608
609
|
{{ grid ? $t('List view') : $t('Grid view') }}
|
|
609
610
|
</q-tooltip>
|
|
@@ -664,7 +665,7 @@ selectedNodePath.value = drives[0].index.toString();
|
|
|
664
665
|
<q-table flat :columns="columns" :rows="items" @row-dblclick="onDblclickRow" @row-click="onClickRow"
|
|
665
666
|
:pagination="pagination" row-key="path" selection="multiple" v-model:selected="selected" dense
|
|
666
667
|
:loading="loading" :loading-label="$t('Loading...')" :no-data-label="$t('No data available')"
|
|
667
|
-
separator="horizontal" :rows-per-page-options="[0]">
|
|
668
|
+
separator="horizontal" :rows-per-page-options="[0]" color="primary">
|
|
668
669
|
<template #body-cell-icon="props">
|
|
669
670
|
<q-td auto-width>
|
|
670
671
|
<q-icon name="sym_o_folder" v-if="props.value == 'folder'" size="sm" />
|
|
@@ -1,36 +1,62 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { computed, ref } from "vue";
|
|
2
|
+
import { computed, ref, watch } from "vue";
|
|
3
3
|
import { useDragAndDrop } from "@formkit/drag-and-drop/vue";
|
|
4
4
|
import { animations } from "@formkit/drag-and-drop";
|
|
5
5
|
const props = defineProps({
|
|
6
6
|
context: Object
|
|
7
7
|
});
|
|
8
8
|
const node = props.context.node;
|
|
9
|
-
const min = props.context.node.props.min ??
|
|
10
|
-
const max = props.context.node.props.max ?? Infinity;
|
|
11
|
-
const sortable = props.context.node.props.sortable
|
|
12
|
-
const addLabel = props.context.node.props.addLabel ?? "Add";
|
|
9
|
+
const min = ref(props.context.node.props.min ?? 0);
|
|
10
|
+
const max = ref(props.context.node.props.max ?? Infinity);
|
|
11
|
+
const sortable = ref(props.context.node.props.sortable ?? true);
|
|
12
|
+
const addLabel = ref(props.context.node.props.addLabel ?? "Add");
|
|
13
|
+
node.on("prop", ({ payload }) => {
|
|
14
|
+
if (payload.prop == "max") {
|
|
15
|
+
max.value = payload.value;
|
|
16
|
+
}
|
|
17
|
+
if (payload.prop == "min") {
|
|
18
|
+
min.value = payload.value;
|
|
19
|
+
}
|
|
20
|
+
if (payload.prop == "sortable") {
|
|
21
|
+
sortable.value = payload.value;
|
|
22
|
+
}
|
|
23
|
+
if (payload.prop == "addLabel") {
|
|
24
|
+
addLabel.value = payload.value;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
13
27
|
if (!props.context.value) {
|
|
14
28
|
await node.input([]);
|
|
15
29
|
}
|
|
30
|
+
watch(() => max.value, (newVal) => {
|
|
31
|
+
if (localValue.value.length > newVal) {
|
|
32
|
+
localValue.value = localValue.value.slice(0, newVal);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
watch(() => min.value, (newVal) => {
|
|
36
|
+
if (localValue.value.length < newVal) {
|
|
37
|
+
for (let i = localValue.value.length; i < newVal; i++) {
|
|
38
|
+
localValue.value.push({});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
});
|
|
16
42
|
const [parent, localValue] = useDragAndDrop(props.context.value, {
|
|
17
43
|
dragHandle: ".l-repeater-handle",
|
|
18
44
|
plugins: [animations()]
|
|
19
45
|
});
|
|
20
|
-
if (localValue.value.length < min) {
|
|
21
|
-
for (let i = localValue.value.length; i < min; i++) {
|
|
46
|
+
if (localValue.value.length < min.value) {
|
|
47
|
+
for (let i = localValue.value.length; i < min.value; i++) {
|
|
22
48
|
localValue.value.push({});
|
|
23
49
|
}
|
|
24
50
|
}
|
|
25
|
-
if (localValue.value.length > max) {
|
|
26
|
-
localValue.value = localValue.value.slice(0, max);
|
|
51
|
+
if (localValue.value.length > max.value) {
|
|
52
|
+
localValue.value = localValue.value.slice(0, max.value);
|
|
27
53
|
}
|
|
28
54
|
const onAdd = () => {
|
|
29
|
-
if (localValue.value.length >= max) return;
|
|
55
|
+
if (localValue.value.length >= max.value) return;
|
|
30
56
|
localValue.value.push({});
|
|
31
57
|
};
|
|
32
58
|
const onRemove = (index) => {
|
|
33
|
-
if (localValue.value.length <= min) return;
|
|
59
|
+
if (localValue.value.length <= min.value) return;
|
|
34
60
|
localValue.value.splice(index, 1);
|
|
35
61
|
};
|
|
36
62
|
const onMoveUp = (index) => {
|
|
@@ -48,7 +74,7 @@ const onMoveDown = (index) => {
|
|
|
48
74
|
}
|
|
49
75
|
};
|
|
50
76
|
const isAllowRemove = computed(() => {
|
|
51
|
-
return localValue.value.length > min;
|
|
77
|
+
return localValue.value.length > min.value;
|
|
52
78
|
});
|
|
53
79
|
const isAllowMoveUp = (index) => {
|
|
54
80
|
return index > 0;
|
|
@@ -66,6 +92,7 @@ const cursor = ref("cursor-grab");
|
|
|
66
92
|
<template>
|
|
67
93
|
<FormKit type="list" v-model="localValue" dynamic #default="{ items, node }" :name="node.name">
|
|
68
94
|
<div class="col col-12">
|
|
95
|
+
|
|
69
96
|
<q-list bordered separator ref="parent">
|
|
70
97
|
<FormKit type="group" v-for="(item, index) in items" :index="index" :key="item" #default="{ node }">
|
|
71
98
|
<q-item class="q-pa-xs">
|