@hostlink/nuxt-light 1.51.2 → 1.52.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.
Files changed (64) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +5 -2
  3. package/dist/runtime/components/L/Revision.vue +4 -6
  4. package/dist/runtime/components/L/System/Setting/modules.vue +1 -1
  5. package/dist/runtime/components/L/System/Setting/security.vue +1 -1
  6. package/dist/runtime/components/L/User/overview.vue +1 -1
  7. package/dist/runtime/components/L/ValidationInput.vue +3 -3
  8. package/dist/runtime/components/l-add-btn.d.vue.ts +2 -2
  9. package/dist/runtime/components/l-add-btn.vue.d.ts +2 -2
  10. package/dist/runtime/components/l-app-main.vue +4 -2
  11. package/dist/runtime/components/l-btn.d.vue.ts +1 -0
  12. package/dist/runtime/components/l-btn.vue +1 -1
  13. package/dist/runtime/components/l-btn.vue.d.ts +1 -0
  14. package/dist/runtime/components/l-checkbox.vue +1 -1
  15. package/dist/runtime/components/l-customizer.d.vue.ts +4 -4
  16. package/dist/runtime/components/l-customizer.vue +12 -20
  17. package/dist/runtime/components/l-customizer.vue.d.ts +4 -4
  18. package/dist/runtime/components/l-date-picker.d.vue.ts +1 -1
  19. package/dist/runtime/components/l-date-picker.vue +2 -2
  20. package/dist/runtime/components/l-date-picker.vue.d.ts +1 -1
  21. package/dist/runtime/components/l-editor.d.vue.ts +1 -1
  22. package/dist/runtime/components/l-editor.vue.d.ts +1 -1
  23. package/dist/runtime/components/l-file-manager-labels.vue +1 -1
  24. package/dist/runtime/components/l-file-manager-move.vue +2 -2
  25. package/dist/runtime/components/l-file-manager.vue +8 -11
  26. package/dist/runtime/components/l-form-dialog.d.vue.ts +2 -2
  27. package/dist/runtime/components/l-form-dialog.vue +1 -1
  28. package/dist/runtime/components/l-form-dialog.vue.d.ts +2 -2
  29. package/dist/runtime/components/l-group-select.vue +4 -3
  30. package/dist/runtime/components/l-icon-picker.vue +2 -2
  31. package/dist/runtime/components/l-link.vue +1 -4
  32. package/dist/runtime/components/l-page.d.vue.ts +4 -3
  33. package/dist/runtime/components/l-page.vue +26 -1
  34. package/dist/runtime/components/l-page.vue.d.ts +4 -3
  35. package/dist/runtime/components/l-save-btn.vue +1 -1
  36. package/dist/runtime/components/l-table.vue +25 -24
  37. package/dist/runtime/components/l-tabs.vue +1 -1
  38. package/dist/runtime/components/l-time-picker.d.vue.ts +1 -1
  39. package/dist/runtime/components/l-time-picker.vue +3 -4
  40. package/dist/runtime/components/l-time-picker.vue.d.ts +1 -1
  41. package/dist/runtime/composables/useLight.d.ts +8 -8
  42. package/dist/runtime/composables/useLight.js +5 -2
  43. package/dist/runtime/formkit/File.vue +1 -1
  44. package/dist/runtime/formkit/OptionGroup.vue +1 -2
  45. package/dist/runtime/formkit/Repeater.vue +8 -8
  46. package/dist/runtime/formkit/Toggle.vue +1 -2
  47. package/dist/runtime/pages/CustomField/[custom_field_id]/edit.vue +1 -1
  48. package/dist/runtime/pages/Permission/add.vue +1 -1
  49. package/dist/runtime/pages/Permission/all.vue +4 -5
  50. package/dist/runtime/pages/Permission/export.vue +1 -1
  51. package/dist/runtime/pages/Role/index.vue +2 -3
  52. package/dist/runtime/pages/System/database/check.vue +1 -1
  53. package/dist/runtime/pages/System/database/process.vue +3 -3
  54. package/dist/runtime/pages/System/database/table.vue +2 -2
  55. package/dist/runtime/pages/System/fs.vue +1 -1
  56. package/dist/runtime/pages/System/menu/index.vue +9 -8
  57. package/dist/runtime/pages/System/setting.vue +3 -3
  58. package/dist/runtime/pages/User/_user_id/view.vue +1 -1
  59. package/dist/runtime/pages/User/profile.vue +1 -1
  60. package/dist/runtime/pages/User/setting/menu.vue +10 -12
  61. package/dist/runtime/pages/User/setting/style.vue +25 -25
  62. package/dist/runtime/pages/User/setting.vue +2 -3
  63. package/dist/runtime/plugin.js +3 -0
  64. package/package.json +1 -1
@@ -7,12 +7,13 @@ export type LPageProps = QPageProps & {
7
7
  addBtn?: boolean;
8
8
  gutter?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
9
9
  padding?: boolean;
10
+ breadcrumbs?: boolean;
10
11
  };
11
- declare var __VLS_34: {}, __VLS_36: {};
12
+ declare var __VLS_50: {}, __VLS_52: {};
12
13
  type __VLS_Slots = {} & {
13
- header?: (props: typeof __VLS_34) => any;
14
+ header?: (props: typeof __VLS_50) => any;
14
15
  } & {
15
- default?: (props: typeof __VLS_36) => any;
16
+ default?: (props: typeof __VLS_52) => any;
16
17
  };
17
18
  declare const __VLS_component: import("vue").DefineComponent<LPageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LPageProps> & Readonly<{}>, {
18
19
  padding: boolean;
@@ -15,7 +15,8 @@ const props = defineProps({
15
15
  editBtn: { type: Boolean, required: false },
16
16
  deleteBtn: { type: Boolean, required: false },
17
17
  addBtn: { type: Boolean, required: false },
18
- gutter: { type: String, required: false, default: "sm" }
18
+ gutter: { type: String, required: false, default: "sm" },
19
+ breadcrumbs: { type: Boolean, required: false }
19
20
  });
20
21
  const showToolbar = computed(() => {
21
22
  if (props.backBtn || props.editBtn || props.deleteBtn || props.addBtn) {
@@ -43,16 +44,40 @@ useHead({
43
44
  const localClass = computed(() => {
44
45
  return "q-gutter-" + props.gutter;
45
46
  });
47
+ const lastPart = computed(() => {
48
+ const parts = route.path.split("/").filter((part2) => isNaN(Number(part2)));
49
+ if (parts.length < 2) {
50
+ return false;
51
+ }
52
+ let part = parts[parts.length - 1];
53
+ if (!part) {
54
+ return false;
55
+ }
56
+ part = part.replace(/_/g, " ").replace(/([a-z])(?=[A-Z])/g, "$1 ").replace(/([A-Z]*)(?=[A-Z][a-z])/g, "$1 ");
57
+ part = part.replace(/\b\w/g, (char) => char.toUpperCase());
58
+ part = part.replace(/\s\s+/g, " ").trim();
59
+ return part;
60
+ });
46
61
  </script>
47
62
 
48
63
  <template>
49
64
  <q-page :padding="padding" class="q-pt-sm">
65
+
66
+
67
+
50
68
  <q-toolbar v-if="showToolbar">
51
69
  <l-back-btn v-if="backBtn" dense />
52
70
  <l-add-btn v-if="addBtn" dense />
53
71
  <l-edit-btn v-if="editBtn" dense />
54
72
  <l-delete-btn v-if="deleteBtn" @submit="onDelete" dense />
55
73
  <q-toolbar-title>{{ $t(title) }}</q-toolbar-title>
74
+
75
+ <q-breadcrumbs v-if="breadcrumbs">
76
+ <q-breadcrumbs-el :label="$t('Home')" to="/" icon="home" />
77
+ <q-breadcrumbs-el :label="$t(title)" :to="'/' + route.path.split('/')[1]"
78
+ v-if="route.path.split('/')[1]" />
79
+ <q-breadcrumbs-el v-if="lastPart" :label="lastPart" :to="route.fullPath" />
80
+ </q-breadcrumbs>
56
81
  </q-toolbar>
57
82
 
58
83
  <div :class="localClass">
@@ -7,12 +7,13 @@ export type LPageProps = QPageProps & {
7
7
  addBtn?: boolean;
8
8
  gutter?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
9
9
  padding?: boolean;
10
+ breadcrumbs?: boolean;
10
11
  };
11
- declare var __VLS_34: {}, __VLS_36: {};
12
+ declare var __VLS_50: {}, __VLS_52: {};
12
13
  type __VLS_Slots = {} & {
13
- header?: (props: typeof __VLS_34) => any;
14
+ header?: (props: typeof __VLS_50) => any;
14
15
  } & {
15
- default?: (props: typeof __VLS_36) => any;
16
+ default?: (props: typeof __VLS_52) => any;
16
17
  };
17
18
  declare const __VLS_component: import("vue").DefineComponent<LPageProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LPageProps> & Readonly<{}>, {
18
19
  padding: boolean;
@@ -1,3 +1,3 @@
1
1
  <template>
2
- <l-btn :color="$light.color" icon="sym_o_save" label="Save" />
2
+ <l-btn icon="sym_o_save" label="Save" />
3
3
  </template>
@@ -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
- const data = await l.fetchWithMeta();
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" :color="$light.color"
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" :color="$light.color" />
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')" :color="$light.color" @click="onAdd" outline />
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" :color="$light.color" />
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
- :color="$light.color" @click="filters = {};
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')" :color="$light.color"
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 :color="$light.color" v-if="$props.name">
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" :color="$light.color" />
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 :color="$light.color" v-if="$props.name">
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 :color="$light.color" type="checkbox" v-model="visibleColumns"
621
- :options="hidableColumns" option-value="name">
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 :color="$light.color" @click="requestServerInteraction()">
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" :color="$light.color" use-input input-debounce="0"
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
- ]" :color="$light.color" :style="col.searchStyle" emit-value map-options options-dense />
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')" :color="$light.color"
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" :active-color="$light.color" :indicator-color="$light.color"
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>
@@ -23,8 +23,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
23
23
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
24
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
25
25
  }>, {
26
- required: boolean;
27
26
  format24h: boolean;
27
+ required: boolean;
28
28
  mask: string;
29
29
  hideBottomSpace: boolean;
30
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -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" :color="$light.color"
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" :color="color ?? $light.color" :now-btn="nowBtn"
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" :color="color ?? $light.color" flat />
60
+ <q-btn v-close-popup label="Close" flat />
62
61
  </div>
63
62
  </q-time>
64
63
  </q-popup-proxy>
@@ -23,8 +23,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
23
23
  }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
24
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
25
25
  }>, {
26
- required: boolean;
27
26
  format24h: boolean;
27
+ required: boolean;
28
28
  mask: string;
29
29
  hideBottomSpace: boolean;
30
30
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -224,8 +224,6 @@ declare const light: {
224
224
  isoName: string;
225
225
  nativeName: string;
226
226
  label: {
227
- create: string;
228
- set: string;
229
227
  cancel: string;
230
228
  close: string;
231
229
  reset: string;
@@ -233,9 +231,11 @@ declare const light: {
233
231
  filter: string;
234
232
  update: string;
235
233
  remove: string;
234
+ set: string;
236
235
  clear: string;
237
236
  ok: string;
238
237
  search: string;
238
+ create: string;
239
239
  refresh: string;
240
240
  expand: (label?: string | undefined) => string;
241
241
  collapse: (label?: string | undefined) => string;
@@ -319,9 +319,9 @@ declare const light: {
319
319
  name: string;
320
320
  type: {
321
321
  info: string;
322
- positive: string;
323
- negative: string;
324
322
  warning: string;
323
+ negative: string;
324
+ positive: string;
325
325
  };
326
326
  arrow: {
327
327
  left: string;
@@ -821,8 +821,6 @@ declare const _default: () => {
821
821
  isoName: string;
822
822
  nativeName: string;
823
823
  label: {
824
- create: string;
825
- set: string;
826
824
  cancel: string;
827
825
  close: string;
828
826
  reset: string;
@@ -830,9 +828,11 @@ declare const _default: () => {
830
828
  filter: string;
831
829
  update: string;
832
830
  remove: string;
831
+ set: string;
833
832
  clear: string;
834
833
  ok: string;
835
834
  search: string;
835
+ create: string;
836
836
  refresh: string;
837
837
  expand: (label?: string | undefined) => string;
838
838
  collapse: (label?: string | undefined) => string;
@@ -916,9 +916,9 @@ declare const _default: () => {
916
916
  name: string;
917
917
  type: {
918
918
  info: string;
919
- positive: string;
920
- negative: string;
921
919
  warning: string;
920
+ negative: string;
921
+ positive: string;
922
922
  };
923
923
  arrow: {
924
924
  left: string;
@@ -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 :color="$light.color">
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" :color="$light.color" size="sm" />
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
- :color="$light.color" dense flat :disable="!isAllowMoveUp(index)" />
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" :color="$light.color"
87
- dense :disable="!isAllowRemove" flat />
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
- :color="$light.color" dense flat :disable="!isAllowMoveDown(index)" />
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" :color="$light.color" outline class="q-mt-sm"
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" :color="$light.color"
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" :color="$light.color" />
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 :color="$light.color">
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" :color="$light.color" />
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 :color="$light.color" v-model="filter" :placeholder="$t('Filter permissions')" dense clearable
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 :color="$light.color" v-model="selectedRole"
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)" :color="$light.color"
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 :color="$light.color">
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)" :color="$light.color">
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" :color="$light.color"
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 :color="$light.color" icon="sym_o_refresh" @click="refresh"></q-btn>
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 :color="$light.color" dense style="min-width: 200px"
52
- map-options emit-value></q-select>
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" :color="$light.color">
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]" :color="$light.color">
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" :color="$light.color">
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: {