@hostlink/nuxt-light 1.51.1 → 1.52.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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/L/Revision.vue +4 -6
- package/dist/runtime/components/L/System/Setting/modules.vue +1 -1
- package/dist/runtime/components/L/System/Setting/security.vue +1 -1
- package/dist/runtime/components/L/User/overview.vue +1 -1
- package/dist/runtime/components/L/ValidationInput.vue +3 -3
- package/dist/runtime/components/l-app-main.vue +7 -5
- package/dist/runtime/components/l-btn.d.vue.ts +1 -0
- package/dist/runtime/components/l-btn.vue +1 -1
- package/dist/runtime/components/l-btn.vue.d.ts +1 -0
- package/dist/runtime/components/l-checkbox.vue +1 -1
- package/dist/runtime/components/l-customizer.vue +12 -20
- package/dist/runtime/components/l-date-picker.vue +2 -2
- package/dist/runtime/components/l-file-manager-labels.vue +1 -1
- package/dist/runtime/components/l-file-manager-move.vue +2 -2
- package/dist/runtime/components/l-file-manager.vue +8 -11
- package/dist/runtime/components/l-form-dialog.vue +1 -1
- package/dist/runtime/components/l-group-select.vue +4 -3
- package/dist/runtime/components/l-icon-picker.vue +2 -2
- package/dist/runtime/components/l-link.vue +1 -4
- package/dist/runtime/components/l-page.d.vue.ts +4 -3
- package/dist/runtime/components/l-page.vue +26 -1
- package/dist/runtime/components/l-page.vue.d.ts +4 -3
- package/dist/runtime/components/l-save-btn.vue +1 -1
- package/dist/runtime/components/l-table.vue +25 -24
- package/dist/runtime/components/l-tabs.vue +1 -1
- package/dist/runtime/components/l-time-picker.vue +3 -4
- package/dist/runtime/composables/useLight.js +5 -2
- package/dist/runtime/formkit/File.vue +1 -1
- package/dist/runtime/formkit/OptionGroup.vue +1 -2
- package/dist/runtime/formkit/Repeater.vue +8 -8
- package/dist/runtime/formkit/Toggle.vue +1 -2
- package/dist/runtime/pages/CustomField/[custom_field_id]/edit.vue +1 -1
- package/dist/runtime/pages/Permission/add.vue +1 -1
- package/dist/runtime/pages/Permission/all.vue +4 -5
- package/dist/runtime/pages/Permission/export.vue +1 -1
- package/dist/runtime/pages/Role/index.vue +2 -3
- package/dist/runtime/pages/System/database/check.vue +1 -1
- package/dist/runtime/pages/System/database/process.vue +3 -3
- package/dist/runtime/pages/System/database/table.vue +2 -2
- package/dist/runtime/pages/System/fs.vue +1 -1
- package/dist/runtime/pages/System/menu/index.vue +9 -8
- package/dist/runtime/pages/System/setting.vue +3 -3
- package/dist/runtime/pages/User/_user_id/view.vue +1 -1
- package/dist/runtime/pages/User/profile.vue +1 -1
- package/dist/runtime/pages/User/setting/menu.vue +10 -12
- package/dist/runtime/pages/User/setting/style.vue +25 -25
- package/dist/runtime/pages/User/setting.vue +2 -3
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { ref, computed, onMounted, useSlots, watch, reactive } from "vue";
|
|
|
5
5
|
import useLight from "../composables/useLight";
|
|
6
6
|
import model from "../composables/model";
|
|
7
7
|
import { toQuery } from "@hostlink/light";
|
|
8
|
-
import { list } from "#imports";
|
|
8
|
+
import { list, navigateTo } from "#imports";
|
|
9
9
|
import { useI18n } from "vue-i18n";
|
|
10
10
|
import { useStorage, useSessionStorage } from "@vueuse/core";
|
|
11
11
|
import { useRoute } from "#imports";
|
|
@@ -313,13 +313,18 @@ const onLocalRequest = async (p) => {
|
|
|
313
313
|
l = l.limit(p.pagination.rowsPerPage);
|
|
314
314
|
l = l.offset((p.pagination.page - 1) * p.pagination.rowsPerPage);
|
|
315
315
|
}
|
|
316
|
-
|
|
317
|
-
this.setData(data);
|
|
316
|
+
this.setData(await l.fetchWithMeta());
|
|
318
317
|
} catch (e) {
|
|
319
318
|
quasar.dialog({
|
|
320
319
|
message: e,
|
|
321
320
|
color: "negative"
|
|
322
321
|
});
|
|
322
|
+
if (e instanceof Error) {
|
|
323
|
+
if (e.message == "You need to be logged to access this field") {
|
|
324
|
+
navigateTo("/");
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
323
328
|
this.setData({ data: [], meta: { total: 0, key: "", name: "" } });
|
|
324
329
|
}
|
|
325
330
|
}
|
|
@@ -501,12 +506,12 @@ const hasFilters = computed(() => {
|
|
|
501
506
|
|
|
502
507
|
<template>
|
|
503
508
|
<q-table v-bind="attrs" :loading="loading" :rows="rows" ref="table" @request="onLocalRequest" :columns="columns"
|
|
504
|
-
v-model:pagination="pagination" :filter="filter" v-model:selected="localSelected"
|
|
509
|
+
v-model:pagination="pagination" :filter="filter" v-model:selected="localSelected"
|
|
505
510
|
:visible-columns="visibleColumns">
|
|
506
511
|
<template #header="props">
|
|
507
512
|
<q-tr :props="props">
|
|
508
513
|
<q-td v-if="selection != 'none'" auto-width>
|
|
509
|
-
<q-checkbox v-model="props.selected"
|
|
514
|
+
<q-checkbox v-model="props.selected" />
|
|
510
515
|
</q-td>
|
|
511
516
|
<q-th v-if="hasRowExpand" auto-width></q-th>
|
|
512
517
|
<q-th v-if="hasActions" auto-width></q-th>
|
|
@@ -525,14 +530,14 @@ const hasFilters = computed(() => {
|
|
|
525
530
|
|
|
526
531
|
|
|
527
532
|
<template #top-left v-if="addComponent">
|
|
528
|
-
<q-btn icon="sym_o_add" :label="$t('Add')"
|
|
533
|
+
<q-btn icon="sym_o_add" :label="$t('Add')" color="primary" @click="onAdd" outline />
|
|
529
534
|
</template>
|
|
530
535
|
|
|
531
536
|
|
|
532
537
|
<template #body="props">
|
|
533
538
|
<q-tr :props="props">
|
|
534
539
|
<q-td v-if="selection != 'none'" auto-width>
|
|
535
|
-
<q-checkbox v-model="props.selected"
|
|
540
|
+
<q-checkbox v-model="props.selected" />
|
|
536
541
|
</q-td>
|
|
537
542
|
<q-td v-if="hasRowExpand" auto-width>
|
|
538
543
|
<q-btn flat round size="sm" :icon="props.expand ? 'sym_o_expand_more' : 'sym_o_expand_less'"
|
|
@@ -563,8 +568,7 @@ const hasFilters = computed(() => {
|
|
|
563
568
|
</template>
|
|
564
569
|
<template v-else>
|
|
565
570
|
<q-td :key="col.name" :props="props" :auto-width="col.autoWidth ?? false"
|
|
566
|
-
:style="getCellStyle(col, props.row)"><template
|
|
567
|
-
v-if="col.to" class="bg-primary">
|
|
571
|
+
:style="getCellStyle(col, props.row)"><template v-if="col.to" class="bg-primary">
|
|
568
572
|
<l-link :to="col.to(props.row)" v-if="col.to(props.row)">{{ col.value }}</l-link>
|
|
569
573
|
</template>
|
|
570
574
|
<template v-else-if="col.component">
|
|
@@ -589,36 +593,35 @@ const hasFilters = computed(() => {
|
|
|
589
593
|
<template #top-right="props" v-if="showTopRight">
|
|
590
594
|
<slot name="top-right" v-bind="props"></slot>
|
|
591
595
|
|
|
592
|
-
<q-btn v-if="$props.name" :disable="!hasFilters" dense flat icon="sym_o_filter_alt_off"
|
|
593
|
-
|
|
596
|
+
<q-btn v-if="$props.name" :disable="!hasFilters" dense flat icon="sym_o_filter_alt_off" color="primary"
|
|
597
|
+
@click="filters = {};
|
|
594
598
|
tempFilters = {}">
|
|
595
599
|
<q-tooltip>{{ $t("Clear Filters") }}</q-tooltip>
|
|
596
600
|
</q-btn>
|
|
597
601
|
|
|
598
602
|
|
|
599
|
-
<q-input outlined dense debounce="300" v-model="filter" :placeholder="$t('Search')"
|
|
600
|
-
v-if="searchable">
|
|
603
|
+
<q-input outlined dense debounce="300" v-model="filter" :placeholder="$t('Search')" v-if="searchable">
|
|
601
604
|
<template v-slot:append>
|
|
602
605
|
<q-icon name="search" />
|
|
603
606
|
</template>
|
|
604
607
|
</q-input>
|
|
605
608
|
|
|
606
|
-
<q-btn icon="sym_o_settings" flat dense
|
|
609
|
+
<q-btn icon="sym_o_settings" flat dense color="primary" v-if="$props.name">
|
|
607
610
|
<q-popup-proxy>
|
|
608
611
|
<q-card>
|
|
609
612
|
<q-card-section>
|
|
610
|
-
<q-checkbox label="Save filters" v-model="saveFilters"
|
|
613
|
+
<q-checkbox label="Save filters" v-model="saveFilters" />
|
|
611
614
|
</q-card-section>
|
|
612
615
|
</q-card>
|
|
613
616
|
</q-popup-proxy>
|
|
614
617
|
</q-btn>
|
|
615
618
|
|
|
616
|
-
<q-btn icon="sym_o_view_column" flat dense
|
|
619
|
+
<q-btn icon="sym_o_view_column" flat dense color="primary" v-if="$props.name">
|
|
617
620
|
<q-popup-proxy>
|
|
618
621
|
<q-card>
|
|
619
622
|
<q-card-section>
|
|
620
|
-
<q-option-group
|
|
621
|
-
|
|
623
|
+
<q-option-group type="checkbox" v-model="visibleColumns" :options="hidableColumns"
|
|
624
|
+
option-value="name">
|
|
622
625
|
</q-option-group>
|
|
623
626
|
</q-card-section>
|
|
624
627
|
</q-card>
|
|
@@ -626,7 +629,7 @@ const hasFilters = computed(() => {
|
|
|
626
629
|
</q-btn>
|
|
627
630
|
|
|
628
631
|
|
|
629
|
-
<q-btn icon="sym_o_refresh" flat dense
|
|
632
|
+
<q-btn icon="sym_o_refresh" flat dense color="primary" @click="requestServerInteraction()">
|
|
630
633
|
<q-tooltip>{{ $t("Refresh") }}</q-tooltip>
|
|
631
634
|
</q-btn>
|
|
632
635
|
</template>
|
|
@@ -660,8 +663,7 @@ const hasFilters = computed(() => {
|
|
|
660
663
|
<template v-if="col.searchType == 'select'">
|
|
661
664
|
<q-select dense clearable filled square v-model="filters[col.name]" options-dense
|
|
662
665
|
:options="localSearchOptions[col.name]" emit-value map-options
|
|
663
|
-
:multiple="col.searchMultiple"
|
|
664
|
-
@filter="(val, update) => {
|
|
666
|
+
:multiple="col.searchMultiple" use-input input-debounce="0" @filter="(val, update) => {
|
|
665
667
|
searchSelectFilter(val, update, col.name);
|
|
666
668
|
}" :style="col.searchStyle" />
|
|
667
669
|
</template>
|
|
@@ -676,15 +678,14 @@ const hasFilters = computed(() => {
|
|
|
676
678
|
<q-select dense clearable filled square v-model="filters[col.name]" :options="[
|
|
677
679
|
{ label: $t('Yes'), value: true },
|
|
678
680
|
{ label: $t('No'), value: false }
|
|
679
|
-
]" :
|
|
681
|
+
]" :style="col.searchStyle" emit-value map-options options-dense />
|
|
680
682
|
|
|
681
683
|
|
|
682
684
|
</template>
|
|
683
685
|
|
|
684
686
|
<template v-if="!col.searchType || col.searchType == 'text'">
|
|
685
687
|
<q-input style="min-width: 80px;" dense clearable filled square
|
|
686
|
-
v-model="tempFilters[col.name]" @keydown.enter.prevent="filters[col.name] = tempFilters[col.name]" @clear="delete filters[col.name]" :enterkeyhint="$t('search')" :
|
|
687
|
-
:style="col.searchStyle"></q-input>
|
|
688
|
+
v-model="tempFilters[col.name]" @keydown.enter.prevent="filters[col.name] = tempFilters[col.name]" @clear="delete filters[col.name]" :enterkeyhint="$t('search')" :style="col.searchStyle"></q-input>
|
|
688
689
|
|
|
689
690
|
</template>
|
|
690
691
|
|
|
@@ -55,7 +55,7 @@ watch(() => props.name ? route.query[props.name] : null, (newTab) => {
|
|
|
55
55
|
|
|
56
56
|
<template>
|
|
57
57
|
<l-card>
|
|
58
|
-
<q-tabs v-bind="$props" class="text-grey"
|
|
58
|
+
<q-tabs v-bind="$props" class="text-grey" active-color="primary" indicator-color="primary"
|
|
59
59
|
v-model="modelValue">
|
|
60
60
|
<slot></slot>
|
|
61
61
|
</q-tabs>
|
|
@@ -50,15 +50,14 @@ rules.push((v) => {
|
|
|
50
50
|
</script>
|
|
51
51
|
|
|
52
52
|
<template>
|
|
53
|
-
<q-input v-bind="$light.getInputProps(props)" v-model="localValue" :rules="rules"
|
|
53
|
+
<q-input v-bind="$light.getInputProps(props)" v-model="localValue" :rules="rules"
|
|
54
54
|
:hide-bottom-space="hideBottomSpace">
|
|
55
55
|
<template v-slot:prepend>
|
|
56
56
|
<q-btn icon="sym_o_access_time" round dense flat>
|
|
57
57
|
<q-popup-proxy cover transition-show="scale" transition-hide="scale" ref="popup">
|
|
58
|
-
<q-time v-model="localValue" :format24h="format24h" :
|
|
59
|
-
:with-seconds="withSeconds">
|
|
58
|
+
<q-time v-model="localValue" :format24h="format24h" :now-btn="nowBtn" :with-seconds="withSeconds">
|
|
60
59
|
<div class="row items-center justify-end">
|
|
61
|
-
<q-btn v-close-popup label="Close"
|
|
60
|
+
<q-btn v-close-popup label="Close" flat />
|
|
62
61
|
</div>
|
|
63
62
|
</q-time>
|
|
64
63
|
</q-popup-proxy>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useQuasar } from "quasar";
|
|
1
|
+
import { useQuasar, setCssVar } from "quasar";
|
|
2
2
|
import packageJson from "../../../package.json";
|
|
3
3
|
import { watch, reactive, getCurrentInstance } from "vue";
|
|
4
4
|
import m from "./m.js";
|
|
@@ -154,6 +154,9 @@ const light = reactive({
|
|
|
154
154
|
}
|
|
155
155
|
},
|
|
156
156
|
getColorValue: () => {
|
|
157
|
+
if (!light.color) {
|
|
158
|
+
return "#7367f0";
|
|
159
|
+
}
|
|
157
160
|
return COLOR_CODE[light.color];
|
|
158
161
|
},
|
|
159
162
|
setMyFavorites: (favorites) => {
|
|
@@ -221,6 +224,7 @@ const light = reactive({
|
|
|
221
224
|
await light.setStyle("theme", light.theme);
|
|
222
225
|
});
|
|
223
226
|
watch(() => light.color, async () => {
|
|
227
|
+
setCssVar("primary", light.getColorValue());
|
|
224
228
|
await light.setStyle("color", light.color);
|
|
225
229
|
});
|
|
226
230
|
light.errors = [];
|
|
@@ -260,7 +264,6 @@ const light = reactive({
|
|
|
260
264
|
},
|
|
261
265
|
getButtonProps(props) {
|
|
262
266
|
const attr = {
|
|
263
|
-
color: light.color,
|
|
264
267
|
...light.styles.button,
|
|
265
268
|
...Object.fromEntries(Object.entries(props).filter(([key, value]) => value !== void 0))
|
|
266
269
|
};
|
|
@@ -28,7 +28,7 @@ const attrs = computed(() => {
|
|
|
28
28
|
|
|
29
29
|
<template>
|
|
30
30
|
<q-file v-model="value" :label="context.label" v-bind="attrs" :error="error" :error-message="errorMessage"
|
|
31
|
-
@blur="onBlur" hide-bottom-space
|
|
31
|
+
@blur="onBlur" hide-bottom-space>
|
|
32
32
|
<template v-for="(s, name) in $slots" v-slot:[name]="props" :key="name">
|
|
33
33
|
<slot :name="name" v-bind="props ?? {}"></slot>
|
|
34
34
|
</template>
|
|
@@ -19,8 +19,7 @@ const outlined = computed(() => {
|
|
|
19
19
|
<template>
|
|
20
20
|
<l-field stack-label :label="context.label" :error="error" :error-message="errorMessage" :outlined="outlined"
|
|
21
21
|
hide-bottom-space>
|
|
22
|
-
<q-option-group type="checkbox" :options="context.options" v-model="value" inline v-bind="context.attrs"
|
|
23
|
-
:color="$light.color">
|
|
22
|
+
<q-option-group type="checkbox" :options="context.options" v-model="value" inline v-bind="context.attrs">
|
|
24
23
|
</q-option-group>
|
|
25
24
|
</l-field>
|
|
26
25
|
</template>
|
|
@@ -70,7 +70,7 @@ const cursor = ref("cursor-grab");
|
|
|
70
70
|
<div class="l-repeater-handle" v-if="sortable" :class="cursor"
|
|
71
71
|
@mousedown="cursor = 'cursor-grabbing'" @mouseup="cursor = 'cursor-grab'"
|
|
72
72
|
@mouseleave="cursor = 'cursor-grab'">
|
|
73
|
-
<q-icon name="sym_o_drag_indicator"
|
|
73
|
+
<q-icon name="sym_o_drag_indicator" size="sm" />
|
|
74
74
|
</div>
|
|
75
75
|
</q-item-section>
|
|
76
76
|
|
|
@@ -80,20 +80,20 @@ const cursor = ref("cursor-grab");
|
|
|
80
80
|
|
|
81
81
|
<q-item-section side>
|
|
82
82
|
<!-- up -->
|
|
83
|
-
<q-btn type="button" @click="onMoveUp(index)" icon="sym_o_arrow_upward"
|
|
84
|
-
|
|
83
|
+
<q-btn type="button" @click="onMoveUp(index)" icon="sym_o_arrow_upward" color="primary"
|
|
84
|
+
dense flat :disable="!isAllowMoveUp(index)" />
|
|
85
85
|
|
|
86
|
-
<q-btn type="button" @click="onRemove(index)" icon="sym_o_delete"
|
|
87
|
-
|
|
86
|
+
<q-btn type="button" @click="onRemove(index)" icon="sym_o_delete" color="primary" dense
|
|
87
|
+
:disable="!isAllowRemove" flat />
|
|
88
88
|
<!-- down -->
|
|
89
|
-
<q-btn type="button" @click="onMoveDown(index)" icon="sym_o_arrow_downward"
|
|
90
|
-
|
|
89
|
+
<q-btn type="button" @click="onMoveDown(index)" icon="sym_o_arrow_downward" color="primary"
|
|
90
|
+
dense flat :disable="!isAllowMoveDown(index)" />
|
|
91
91
|
|
|
92
92
|
</q-item-section>
|
|
93
93
|
</q-item>
|
|
94
94
|
</FormKit>
|
|
95
95
|
</q-list>
|
|
96
|
-
<q-btn @click="onAdd" :label="addLabel" icon="sym_o_add"
|
|
96
|
+
<q-btn @click="onAdd" :label="addLabel" icon="sym_o_add" color="primary" outline class="q-mt-sm"
|
|
97
97
|
:disable="localValue.length >= max" />
|
|
98
98
|
</FormKit>
|
|
99
99
|
</div>
|
|
@@ -10,8 +10,7 @@ const value = computed({
|
|
|
10
10
|
</script>
|
|
11
11
|
|
|
12
12
|
<template>
|
|
13
|
-
<q-toggle v-model="value" :label="context.label" :disable="context.disabled"
|
|
14
|
-
v-bind="context.attrs">
|
|
13
|
+
<q-toggle v-model="value" :label="context.label" :disable="context.disabled" v-bind="context.attrs">
|
|
15
14
|
<slot></slot>
|
|
16
15
|
</q-toggle>
|
|
17
16
|
</template>
|
|
@@ -43,7 +43,7 @@ const v = ref("required");
|
|
|
43
43
|
|
|
44
44
|
<q-select label="Options" v-model="value.options" @update:model-value="node.at('options').input($event)"
|
|
45
45
|
use-input use-chips multiple hide-dropdown-icon input-debounce="0" new-value-mode="add-unique"
|
|
46
|
-
stack-label outlined placeholder="Press enter to add new option"
|
|
46
|
+
stack-label outlined placeholder="Press enter to add new option" />
|
|
47
47
|
</template>
|
|
48
48
|
|
|
49
49
|
<form-kit type="l-input" name="default_value" label="Default Value" />
|
|
@@ -29,7 +29,7 @@ const onSave = async () => {
|
|
|
29
29
|
<l-input label="Permission name" v-model="obj.value" required class="col-12"></l-input>
|
|
30
30
|
|
|
31
31
|
<l-field label="Roles" stack-label>
|
|
32
|
-
<q-option-group type="checkbox" :options="roles" v-model="obj.roles" inline
|
|
32
|
+
<q-option-group type="checkbox" :options="roles" v-model="obj.roles" inline>
|
|
33
33
|
</q-option-group>
|
|
34
34
|
</l-field>
|
|
35
35
|
|
|
@@ -138,7 +138,7 @@ const filteredRows = computed(() => {
|
|
|
138
138
|
|
|
139
139
|
<!-- 載入指示器 -->
|
|
140
140
|
<div v-if="loading" class="text-center q-pa-md">
|
|
141
|
-
<q-spinner-dots size="50px"
|
|
141
|
+
<q-spinner-dots size="50px" />
|
|
142
142
|
<div class="q-mt-sm">{{ $t('Loading permissions...') }}</div>
|
|
143
143
|
</div>
|
|
144
144
|
|
|
@@ -147,15 +147,14 @@ const filteredRows = computed(() => {
|
|
|
147
147
|
<!-- 篩選控制 -->
|
|
148
148
|
<div class="row q-gutter-md q-mb-md">
|
|
149
149
|
<div class="col-md-6 col-12">
|
|
150
|
-
<q-input
|
|
151
|
-
outlined>
|
|
150
|
+
<q-input v-model="filter" :placeholder="$t('Filter permissions')" dense clearable outlined>
|
|
152
151
|
<template v-slot:append>
|
|
153
152
|
<q-icon name="sym_o_search" />
|
|
154
153
|
</template>
|
|
155
154
|
</q-input>
|
|
156
155
|
</div>
|
|
157
156
|
<div class="col-md-6 col-12">
|
|
158
|
-
<q-select
|
|
157
|
+
<q-select v-model="selectedRole"
|
|
159
158
|
:options="[{ label: $t('All Roles'), value: '' }, ...roles.map(r => ({ label: r.name, value: r.name }))]"
|
|
160
159
|
:placeholder="$t('Filter by role')" dense clearable outlined emit-value map-options />
|
|
161
160
|
</div>
|
|
@@ -173,7 +172,7 @@ const filteredRows = computed(() => {
|
|
|
173
172
|
</q-td>
|
|
174
173
|
<q-td v-for="role in roles" :key="role.name" class="text-center">
|
|
175
174
|
<q-checkbox v-model="props.row[role.name]"
|
|
176
|
-
@update:model-value="onUpdate($event, role.name, props.row.permission)"
|
|
175
|
+
@update:model-value="onUpdate($event, role.name, props.row.permission)"
|
|
177
176
|
:loading="updating.has(`${role.name}-${props.row.permission}`)"
|
|
178
177
|
:disable="updating.has(`${role.name}-${props.row.permission}`)" />
|
|
179
178
|
</q-td>
|
|
@@ -49,7 +49,7 @@ const submit = () => {
|
|
|
49
49
|
<l-page>
|
|
50
50
|
<l-form submit-label="Export" submit-icon="sym_o_download" @submit="submit">
|
|
51
51
|
<l-field label="Roles" stack-label>
|
|
52
|
-
<q-option-group type="checkbox" :options="roles" v-model="obj.roles" inline
|
|
52
|
+
<q-option-group type="checkbox" :options="roles" v-model="obj.roles" inline>
|
|
53
53
|
</q-option-group>
|
|
54
54
|
</l-field>
|
|
55
55
|
</l-form>
|
|
@@ -109,8 +109,7 @@ const onRemoveUser = async (value, user) => {
|
|
|
109
109
|
<template #body-cell-children="props">
|
|
110
110
|
<q-td>
|
|
111
111
|
<q-select :options="role_options" v-model="props.row.children" multiple use-chips dense
|
|
112
|
-
@remove="onRemoveChild(props.row.name, $event)" @add="onAddChild(props.row.name, $event)"
|
|
113
|
-
:color="$light.color">
|
|
112
|
+
@remove="onRemoveChild(props.row.name, $event)" @add="onAddChild(props.row.name, $event)">
|
|
114
113
|
</q-select>
|
|
115
114
|
</q-td>
|
|
116
115
|
</template>
|
|
@@ -118,7 +117,7 @@ const onRemoveUser = async (value, user) => {
|
|
|
118
117
|
<q-td>
|
|
119
118
|
<q-select :options="users" v-model="props.row.user" multiple use-chips dense option-label="name"
|
|
120
119
|
option-value="user_id" @add="onAddUser(props.row.name, $event)"
|
|
121
|
-
@remove="onRemoveUser(props.row.name, $event)"
|
|
120
|
+
@remove="onRemoveUser(props.row.name, $event)">
|
|
122
121
|
|
|
123
122
|
</q-select>
|
|
124
123
|
</q-td>
|
|
@@ -103,7 +103,7 @@ const handleFix = async (tableName) => {
|
|
|
103
103
|
<span v-else class="text-positive">✓</span>
|
|
104
104
|
</q-td>
|
|
105
105
|
<q-td key="action" :props="props">
|
|
106
|
-
<q-btn v-if="props.row.status !== 'OK'" label="Fix" size="sm"
|
|
106
|
+
<q-btn v-if="props.row.status !== 'OK'" label="Fix" size="sm" color="primary"
|
|
107
107
|
@click="handleFix(props.row.table)" />
|
|
108
108
|
</q-td>
|
|
109
109
|
</q-tr>
|
|
@@ -35,7 +35,7 @@ onUnmounted(() => {
|
|
|
35
35
|
<l-page title="System Database Process">
|
|
36
36
|
<q-table :rows="data?.database?.processList || []" hide-bottom v-bind="$light.styles.table" :loading="loading">
|
|
37
37
|
<template #top-left>
|
|
38
|
-
<q-btn label="Reload" outline
|
|
38
|
+
<q-btn label="Reload" outline color="primary" icon="sym_o_refresh" @click="refresh"></q-btn>
|
|
39
39
|
</template>
|
|
40
40
|
<template #top-right>
|
|
41
41
|
<q-select label="Auto Refresh" v-model="autoRefresh" :options="[
|
|
@@ -48,8 +48,8 @@ onUnmounted(() => {
|
|
|
48
48
|
{ label: '10m', value: 600000 },
|
|
49
49
|
{ label: '30m', value: 1800000 },
|
|
50
50
|
{ label: '1h', value: 3600000 }
|
|
51
|
-
]" @update:model-value="autoRefresh && refresh()" outlined
|
|
52
|
-
|
|
51
|
+
]" @update:model-value="autoRefresh && refresh()" outlined dense style="min-width: 200px" map-options
|
|
52
|
+
emit-value></q-select>
|
|
53
53
|
</template>
|
|
54
54
|
</q-table>
|
|
55
55
|
</l-page>
|
|
@@ -183,7 +183,7 @@ const truncatTable = async () => {
|
|
|
183
183
|
|
|
184
184
|
<q-table :rows="custom_tables" hide-pagination flat bordered separator="cell" dense
|
|
185
185
|
:rows-per-page-options="[0]" v-model:selected="selectedTable" selection="multiple"
|
|
186
|
-
row-key="Name"
|
|
186
|
+
row-key="Name">
|
|
187
187
|
|
|
188
188
|
<template #top-left>
|
|
189
189
|
<q-btn icon="sym_o_add" @click="createTable()" round flat size="sm">
|
|
@@ -218,7 +218,7 @@ const truncatTable = async () => {
|
|
|
218
218
|
<q-expansion-item :label="table.name" v-for="table in data.table" dense>
|
|
219
219
|
<div class="q-ma-sm">
|
|
220
220
|
<q-table row-key="name" :rows="table.columns" :rows-per-page-options="[0]" hide-pagination flat
|
|
221
|
-
bordered selection="multiple" v-model:selected="selected[table.name]"
|
|
221
|
+
bordered selection="multiple" v-model:selected="selected[table.name]">
|
|
222
222
|
<template #top-left>
|
|
223
223
|
<q-btn icon="sym_o_add" @click="add(table.name)" round flat size="sm">
|
|
224
224
|
<q-tooltip>Add field</q-tooltip>
|
|
@@ -161,7 +161,7 @@ const loading = ref(false);
|
|
|
161
161
|
</q-dialog>
|
|
162
162
|
|
|
163
163
|
<q-table :rows="items" :columns="columns" selection="multiple" flat bordered dense separator="cell"
|
|
164
|
-
v-model:selected="selected" row-key="uuid" :loading="loading"
|
|
164
|
+
v-model:selected="selected" row-key="uuid" :loading="loading">
|
|
165
165
|
<template #top-left>
|
|
166
166
|
<q-btn icon="sym_o_add" @click="value = {
|
|
167
167
|
data: {
|
|
@@ -176,13 +176,13 @@ const menusOnly = computed(() => {
|
|
|
176
176
|
<q-dialog v-model="showMove">
|
|
177
177
|
<l-card>
|
|
178
178
|
<q-card-section>
|
|
179
|
-
<q-tree :nodes="menus" :selected
|
|
180
|
-
|
|
179
|
+
<q-tree :nodes="menus" default-expand-all v-model:selected="moveTarget" node-key="uuid"
|
|
180
|
+
ref="tree2" />
|
|
181
181
|
</q-card-section>
|
|
182
182
|
|
|
183
183
|
<q-card-actions align="right">
|
|
184
|
-
<q-btn flat label="Cancel"
|
|
185
|
-
<q-btn flat label="Move"
|
|
184
|
+
<q-btn flat label="Cancel" color="primary" v-close-popup />
|
|
185
|
+
<q-btn flat label="Move" color="primary" @click="onMoveConfirm" />
|
|
186
186
|
<!-- q-btn flat label="Move to root" color="primary" @click="onMoveToRoot" /-->
|
|
187
187
|
</q-card-actions>
|
|
188
188
|
</l-card>
|
|
@@ -201,7 +201,8 @@ const menusOnly = computed(() => {
|
|
|
201
201
|
<l-btn @click="onAddSeparator(selectedNode)" label="Add Separator" icon="sym_o_add" />
|
|
202
202
|
</template>
|
|
203
203
|
<template v-else>
|
|
204
|
-
<q-btn-dropdown v-bind="$light.getButtonProps({ label: 'Add' })" icon="sym_o_add"
|
|
204
|
+
<q-btn-dropdown v-bind="$light.getButtonProps({ label: 'Add' })" icon="sym_o_add"
|
|
205
|
+
color="primary">
|
|
205
206
|
<q-list>
|
|
206
207
|
<q-item clickable v-close-popup @click="onAddChild(selectedNode)">
|
|
207
208
|
<q-item-section>
|
|
@@ -232,7 +233,8 @@ const menusOnly = computed(() => {
|
|
|
232
233
|
<l-btn @click="onMoveDown(selectedNode)" label="Down" icon="sym_o_arrow_downward" />
|
|
233
234
|
|
|
234
235
|
|
|
235
|
-
<q-btn-dropdown v-bind="$light.getButtonProps({ label: 'Add menus' })" icon="sym_o_add"
|
|
236
|
+
<q-btn-dropdown v-bind="$light.getButtonProps({ label: 'Add menus' })" icon="sym_o_add"
|
|
237
|
+
color="primary">
|
|
236
238
|
<q-list>
|
|
237
239
|
<q-item clickable v-close-popup @click="onAddChildMenu(selectedNode, 'list')">
|
|
238
240
|
<q-item-section>
|
|
@@ -254,8 +256,7 @@ const menusOnly = computed(() => {
|
|
|
254
256
|
<q-splitter v-model="splitterModel" style="height:680px">
|
|
255
257
|
<template #before>
|
|
256
258
|
|
|
257
|
-
<q-tree :nodes="menus"
|
|
258
|
-
node-key="uuid" ref="tree1" />
|
|
259
|
+
<q-tree :nodes="menus" default-expand-all v-model:selected="selected" node-key="uuid" ref="tree1" />
|
|
259
260
|
</template>
|
|
260
261
|
|
|
261
262
|
<template #after v-if="selected">
|
|
@@ -44,7 +44,7 @@ const onSubmit = async (d) => {
|
|
|
44
44
|
<l-card>
|
|
45
45
|
<q-splitter unit="px" :model-value="145">
|
|
46
46
|
<template #before>
|
|
47
|
-
<q-tabs v-model="tab" vertical
|
|
47
|
+
<q-tabs v-model="tab" vertical>
|
|
48
48
|
<q-tab name="general" icon="sym_o_info" :label="$t('General')" />
|
|
49
49
|
<q-tab name="security" icon="sym_o_security" :label="$t('Security')" />
|
|
50
50
|
<q-tab name="Modules" icon="sym_o_apps" :label="$t('Modules')" />
|
|
@@ -63,8 +63,8 @@ const onSubmit = async (d) => {
|
|
|
63
63
|
<l-system-setting-forget-password v-if="tab == 'forget-password'" v-bind="obj" @submit="onSubmit" />
|
|
64
64
|
<l-system-setting-authentication v-if="tab == 'authentication'" v-bind="obj" @submit="onSubmit" />
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
66
|
+
|
|
67
|
+
|
|
68
68
|
</template>
|
|
69
69
|
</q-splitter>
|
|
70
70
|
</l-card>
|
|
@@ -49,7 +49,7 @@ const reset2fa = async () => {
|
|
|
49
49
|
</template>
|
|
50
50
|
|
|
51
51
|
<q-card flat bordered>
|
|
52
|
-
<l-tabs
|
|
52
|
+
<l-tabs inline-label align="justify">
|
|
53
53
|
<l-tab name="overview" icon="sym_o_person" :label="$t('Overview')">
|
|
54
54
|
<l-user-overview :id="id" />
|
|
55
55
|
</l-tab>
|
|
@@ -63,7 +63,7 @@ eventLogCols.forEach((col) => {
|
|
|
63
63
|
</q-card-section>
|
|
64
64
|
|
|
65
65
|
<q-card-section class="text-center text-center q-pt-none">
|
|
66
|
-
<q-chip v-for="role in my.roles" :key="role" :label="role"
|
|
66
|
+
<q-chip v-for="role in my.roles" :key="role" :label="role" color="primary"
|
|
67
67
|
text-color="white" class="q-ma-xs" />
|
|
68
68
|
</q-card-section>
|
|
69
69
|
|
|
@@ -258,12 +258,11 @@ const resetMenus = () => {
|
|
|
258
258
|
<l-card>
|
|
259
259
|
<q-card-section>
|
|
260
260
|
<div class="text-h6">Select Move Target</div>
|
|
261
|
-
<q-tree :nodes="userMenus" :selected-
|
|
262
|
-
v-model:selected="moveTarget" node-key="uuid" />
|
|
261
|
+
<q-tree :nodes="userMenus" default-expand-all v-model:selected="moveTarget" node-key="uuid" />
|
|
263
262
|
</q-card-section>
|
|
264
263
|
<q-card-actions align="right">
|
|
265
|
-
<q-btn flat label="Cancel"
|
|
266
|
-
<q-btn flat label="Move"
|
|
264
|
+
<q-btn flat label="Cancel" color="primary" v-close-popup />
|
|
265
|
+
<q-btn flat label="Move" color="primary" @click="confirmMove" />
|
|
267
266
|
</q-card-actions>
|
|
268
267
|
</l-card>
|
|
269
268
|
</q-dialog>
|
|
@@ -278,8 +277,7 @@ const resetMenus = () => {
|
|
|
278
277
|
<template #before>
|
|
279
278
|
<div class="q-pa-md">
|
|
280
279
|
<div class="text-h6 q-mb-md">Available Menu Items</div>
|
|
281
|
-
<q-tree :nodes="availableMenus"
|
|
282
|
-
node-key="uuid">
|
|
280
|
+
<q-tree :nodes="availableMenus" default-expand-all node-key="uuid">
|
|
283
281
|
<template v-slot:default-header="prop">
|
|
284
282
|
<div class="row items-center full-width">
|
|
285
283
|
<q-icon :name="prop.node.icon || 'sym_o_menu'" class="q-mr-sm" size="sm" />
|
|
@@ -304,7 +302,7 @@ const resetMenus = () => {
|
|
|
304
302
|
<q-card-actions class="q-mb-md q-gutter-xs" v-if="currentNodeDetail">
|
|
305
303
|
<template v-if="currentNodeDetail.type === 'root'">
|
|
306
304
|
<q-btn-dropdown v-bind="$light.getButtonProps({ label: 'Add' })" icon="sym_o_add"
|
|
307
|
-
size="sm">
|
|
305
|
+
size="sm" color="primary">
|
|
308
306
|
<q-list>
|
|
309
307
|
<q-item clickable v-close-popup @click="createNewFolder">
|
|
310
308
|
<q-item-section avatar>
|
|
@@ -335,7 +333,7 @@ const resetMenus = () => {
|
|
|
335
333
|
</template>
|
|
336
334
|
<template v-else>
|
|
337
335
|
<q-btn-dropdown v-bind="$light.getButtonProps({ label: 'Add' })" icon="sym_o_add"
|
|
338
|
-
size="sm">
|
|
336
|
+
size="sm" color="primary">
|
|
339
337
|
<q-list>
|
|
340
338
|
<q-item clickable v-close-popup @click="createNewFolder">
|
|
341
339
|
<q-item-section avatar>
|
|
@@ -368,15 +366,15 @@ const resetMenus = () => {
|
|
|
368
366
|
size="sm" color="negative" />
|
|
369
367
|
<l-btn @click="moveUp(currentNodeDetail)" label="Move Up" icon="sym_o_arrow_upward"
|
|
370
368
|
size="sm" />
|
|
371
|
-
<l-btn @click="moveDown(currentNodeDetail)" label="Move Down"
|
|
372
|
-
size="sm" />
|
|
369
|
+
<l-btn @click="moveDown(currentNodeDetail)" label="Move Down"
|
|
370
|
+
icon="sym_o_arrow_downward" size="sm" />
|
|
373
371
|
<l-btn @click="moveToGroup" label="Move to..." icon="sym_o_drive_file_move" size="sm" />
|
|
374
372
|
</template>
|
|
375
373
|
</q-card-actions>
|
|
376
374
|
|
|
377
375
|
<!-- Menu tree -->
|
|
378
|
-
<q-tree :nodes="userMenus" :selected
|
|
379
|
-
|
|
376
|
+
<q-tree :nodes="userMenus" default-expand-all v-model:selected="selectedNode" node-key="uuid"
|
|
377
|
+
ref="userMenuTree">
|
|
380
378
|
<template v-slot:default-header="prop">
|
|
381
379
|
<div class="row items-center full-width">
|
|
382
380
|
<q-icon :name="prop.node.type === 'separator' ? 'sym_o_more_horiz' :
|