@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.
Files changed (49) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/L/Revision.vue +4 -6
  3. package/dist/runtime/components/L/System/Setting/modules.vue +1 -1
  4. package/dist/runtime/components/L/System/Setting/security.vue +1 -1
  5. package/dist/runtime/components/L/User/overview.vue +1 -1
  6. package/dist/runtime/components/L/ValidationInput.vue +3 -3
  7. package/dist/runtime/components/l-app-main.vue +7 -5
  8. package/dist/runtime/components/l-btn.d.vue.ts +1 -0
  9. package/dist/runtime/components/l-btn.vue +1 -1
  10. package/dist/runtime/components/l-btn.vue.d.ts +1 -0
  11. package/dist/runtime/components/l-checkbox.vue +1 -1
  12. package/dist/runtime/components/l-customizer.vue +12 -20
  13. package/dist/runtime/components/l-date-picker.vue +2 -2
  14. package/dist/runtime/components/l-file-manager-labels.vue +1 -1
  15. package/dist/runtime/components/l-file-manager-move.vue +2 -2
  16. package/dist/runtime/components/l-file-manager.vue +8 -11
  17. package/dist/runtime/components/l-form-dialog.vue +1 -1
  18. package/dist/runtime/components/l-group-select.vue +4 -3
  19. package/dist/runtime/components/l-icon-picker.vue +2 -2
  20. package/dist/runtime/components/l-link.vue +1 -4
  21. package/dist/runtime/components/l-page.d.vue.ts +4 -3
  22. package/dist/runtime/components/l-page.vue +26 -1
  23. package/dist/runtime/components/l-page.vue.d.ts +4 -3
  24. package/dist/runtime/components/l-save-btn.vue +1 -1
  25. package/dist/runtime/components/l-table.vue +25 -24
  26. package/dist/runtime/components/l-tabs.vue +1 -1
  27. package/dist/runtime/components/l-time-picker.vue +3 -4
  28. package/dist/runtime/composables/useLight.js +5 -2
  29. package/dist/runtime/formkit/File.vue +1 -1
  30. package/dist/runtime/formkit/OptionGroup.vue +1 -2
  31. package/dist/runtime/formkit/Repeater.vue +8 -8
  32. package/dist/runtime/formkit/Toggle.vue +1 -2
  33. package/dist/runtime/pages/CustomField/[custom_field_id]/edit.vue +1 -1
  34. package/dist/runtime/pages/Permission/add.vue +1 -1
  35. package/dist/runtime/pages/Permission/all.vue +4 -5
  36. package/dist/runtime/pages/Permission/export.vue +1 -1
  37. package/dist/runtime/pages/Role/index.vue +2 -3
  38. package/dist/runtime/pages/System/database/check.vue +1 -1
  39. package/dist/runtime/pages/System/database/process.vue +3 -3
  40. package/dist/runtime/pages/System/database/table.vue +2 -2
  41. package/dist/runtime/pages/System/fs.vue +1 -1
  42. package/dist/runtime/pages/System/menu/index.vue +9 -8
  43. package/dist/runtime/pages/System/setting.vue +3 -3
  44. package/dist/runtime/pages/User/_user_id/view.vue +1 -1
  45. package/dist/runtime/pages/User/profile.vue +1 -1
  46. package/dist/runtime/pages/User/setting/menu.vue +10 -12
  47. package/dist/runtime/pages/User/setting/style.vue +25 -25
  48. package/dist/runtime/pages/User/setting.vue +2 -3
  49. package/package.json +1 -1
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.51.1",
4
+ "version": "1.52.0",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -106,9 +106,9 @@ const getDiffHtml = (diffs) => {
106
106
  <l-btn label="Restore" icon="sym_o_restore" permission="revision.restore" @click="onRestore"
107
107
  :disabled="!isAllowRestore" />
108
108
 
109
- <q-checkbox label="Show changed only" v-model="showOnlyDelta" :color="$light.color"></q-checkbox>
109
+ <q-checkbox label="Show changed only" v-model="showOnlyDelta"></q-checkbox>
110
110
 
111
- <q-btn-toggle class="q-mx-md" v-model="outputFormat" :toggle-color="$light.color" :options="[
111
+ <q-btn-toggle class="q-mx-md" v-model="outputFormat" toggle-color="primary" :options="[
112
112
  { label: 'side-by-side', value: 'side-by-side' }, { label: 'line-by-line', value: 'line-by-line' }
113
113
  ]" />
114
114
  <q-space />
@@ -128,8 +128,7 @@ const getDiffHtml = (diffs) => {
128
128
  <thead>
129
129
  <tr>
130
130
  <th width="48px">
131
- <q-checkbox @click="onToggleAll" v-model="isCheckedAll"
132
- :color="$light.color"></q-checkbox>
131
+ <q-checkbox @click="onToggleAll" v-model="isCheckedAll" :></q-checkbox>
133
132
  </th>
134
133
  <th>Field</th>
135
134
  <th>Value</th>
@@ -141,8 +140,7 @@ const getDiffHtml = (diffs) => {
141
140
 
142
141
  <tr>
143
142
 
144
- <td><q-checkbox v-model="restore_fields" :val="key"
145
- :color="$light.color"></q-checkbox>
143
+ <td><q-checkbox v-model="restore_fields" :val="key"></q-checkbox>
146
144
  </td>
147
145
  <td :class="{ 'bg-yellow-3': selectedRevision.delta[key] != undefined }">{{ key }}
148
146
  </td>
@@ -7,7 +7,7 @@ defineProps({
7
7
 
8
8
  <template>
9
9
  <form-kit type="l-form" :bordered="false" :value="$props" @submit="$emit('submit', $event)">
10
- <l-field :label="$t('File Manager')" stack-label :color="$light.color" hide-bottom-space class="col-6">
10
+ <l-field :label="$t('File Manager')" stack-label hide-bottom-space class="col-6">
11
11
  <form-kit type="l-checkbox" label="Show" name="file_manager" true-value="1" false-value="0" />
12
12
  </l-field>
13
13
 
@@ -18,7 +18,7 @@ defineProps({
18
18
 
19
19
  <template>
20
20
  <FormKit type="l-form" :bordered="false" :value="$props" @submit="$emit('submit', $event)">
21
- <l-field label="Password policy" stack-label :color="$light.color">
21
+ <l-field label="Password policy" stack-label>
22
22
  <FormKit type="l-checkbox" label="Upper Case" name="password_contains_uppercase" true-value="1"
23
23
  false-value="0" />
24
24
  <FormKit type="l-checkbox" label="Lower Case" name="password_contains_lowercase" true-value="1"
@@ -30,7 +30,7 @@ const obj = await collect("User", {
30
30
  <l-item label="Phone">{{ obj.phone }}</l-item>
31
31
  <l-item label="Roles">
32
32
  <div class="q-gutter-xs float-left">
33
- <q-badge v-for="role in obj.roles" :key="role" :color="$light.color">{{ role
33
+ <q-badge v-for="role in obj.roles" :key="role">{{ role
34
34
  }}</q-badge>
35
35
  </div>
36
36
  </l-item>
@@ -65,11 +65,11 @@ watch(form, () => {
65
65
  </script>
66
66
 
67
67
  <template>
68
- <q-checkbox left-label v-model="form.required" label="Required" :color="$light.color" />
68
+ <q-checkbox left-label v-model="form.required" label="Required" />
69
69
 
70
- <q-checkbox left-label v-model="form.email" label="Email" :color="$light.color" v-if="type == 'text'" />
70
+ <q-checkbox left-label v-model="form.email" label="Email" v-if="type == 'text'" />
71
71
 
72
- <q-checkbox left-label v-model="form.number" label="Number" :color="$light.color" v-if="type == 'text'" />
72
+ <q-checkbox left-label v-model="form.number" label="Number" v-if="type == 'text'" />
73
73
 
74
74
  <l-row v-if="type = 'text'">
75
75
  <l-col :md="6">
@@ -1,9 +1,9 @@
1
1
  <script setup>
2
2
  import { useRoute, useRouter } from "vue-router";
3
3
  import { useLight, q, m } from "#imports";
4
- import { useQuasar } from "quasar";
4
+ import { useQuasar, setCssVar, getCssVar } from "quasar";
5
5
  import { useI18n } from "vue-i18n";
6
- import { ref, computed, reactive, provide, watch, toRaw } from "vue";
6
+ import { ref, computed, reactive, provide, watch, toRaw, onMounted } from "vue";
7
7
  import { useRuntimeConfig } from "nuxt/app";
8
8
  import { api } from "#imports";
9
9
  const emits = defineEmits(["logout"]);
@@ -56,6 +56,8 @@ let my = reactive(tt.my);
56
56
  const light = useLight();
57
57
  light.devMode = tt.system.devMode;
58
58
  light.init(my.styles);
59
+ const color = light.getColorValue();
60
+ setCssVar("primary", color);
59
61
  light.setMyRoles(my.roles);
60
62
  light.setPermissions(my.permissions);
61
63
  light.setMyFavorites(toRaw(my.myFavorites));
@@ -67,13 +69,13 @@ const myFavoritesCount = computed(() => {
67
69
  });
68
70
  $q.dark.set(light.isDarkMode());
69
71
  const i18n = useI18n();
70
- i18n.locale = my.language || "en";
72
+ i18n.locale.value = my.language || "en";
71
73
  let system = tt.system;
72
- let messages = i18n.messages.value[i18n.locale];
74
+ let messages = i18n.messages.value[i18n.locale.value] || {};
73
75
  for (let t of app.i18nMessages) {
74
76
  messages[t.name] = t.value;
75
77
  }
76
- i18n.setLocaleMessage(i18n.locale, messages);
78
+ i18n.setLocaleMessage(i18n.locale.value, messages);
77
79
  const menus = ref(app.menus);
78
80
  const my_menus = ref(my.menu);
79
81
  const leftDrawerOpen = ref(false);
@@ -9,6 +9,7 @@ type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_10) => any;
10
10
  };
11
11
  declare const __VLS_component: import("vue").DefineComponent<LBtnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LBtnProps> & Readonly<{}>, {
12
+ color: import("quasar").NamedColor;
12
13
  permission: string;
13
14
  confirmMessage: string;
14
15
  confirmTitle: string;
@@ -21,7 +21,7 @@ const props = defineProps({
21
21
  fab: { type: Boolean, required: false, skipCheck: true },
22
22
  fabMini: { type: Boolean, required: false, skipCheck: true },
23
23
  padding: { type: null, required: false },
24
- color: { type: null, required: false },
24
+ color: { type: null, required: false, default: "primary" },
25
25
  textColor: { type: null, required: false },
26
26
  noCaps: { type: Boolean, required: false, skipCheck: true },
27
27
  noWrap: { type: Boolean, required: false, skipCheck: true },
@@ -9,6 +9,7 @@ type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_10) => any;
10
10
  };
11
11
  declare const __VLS_component: import("vue").DefineComponent<LBtnProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LBtnProps> & Readonly<{}>, {
12
+ color: import("quasar").NamedColor;
12
13
  permission: string;
13
14
  confirmMessage: string;
14
15
  confirmTitle: string;
@@ -26,7 +26,7 @@ defineProps({
26
26
  </script>
27
27
 
28
28
  <template>
29
- <q-checkbox v-bind="$props" :color="color || $light.color" :label="label ? $t(label) : void 0">
29
+ <q-checkbox v-bind="$props" :label="label ? $t(label) : void 0">
30
30
  <slot></slot>
31
31
  </q-checkbox>
32
32
  </template>
@@ -5,13 +5,6 @@ const menuWidth = defineModel("menuWidth", {
5
5
  default: 280
6
6
  });
7
7
  const COLORS = [
8
- "primary",
9
- "secondary",
10
- "positive",
11
- "negative",
12
- "info",
13
- "warning",
14
- "dark",
15
8
  "red",
16
9
  "pink",
17
10
  "purple",
@@ -94,11 +87,11 @@ requestAnimationFrame(refreshServerTime);
94
87
  <q-item-label>Skin</q-item-label>
95
88
  <div class="q-gutter-sm">
96
89
  <q-radio :model-value="theme" val="light" label="Light"
97
- @update:model-value="$emit('update:theme', $event)" :color="$light.color" />
90
+ @update:model-value="$emit('update:theme', $event)" />
98
91
  <q-radio :model-value="theme" val="dark" label="Dark"
99
- @update:model-value="$emit('update:theme', $event)" :color="$light.color" />
92
+ @update:model-value="$emit('update:theme', $event)" />
100
93
  <q-radio :model-value="theme" val="semi-dark" label="Semi dark"
101
- @update:model-value="$emit('update:theme', $event)" :color="$light.color" />
94
+ @update:model-value="$emit('update:theme', $event)" />
102
95
  </div>
103
96
  </q-item-section>
104
97
  </q-item>
@@ -107,6 +100,9 @@ requestAnimationFrame(refreshServerTime);
107
100
  <q-item-section>
108
101
  <q-item-label>{{ $t('Color') }}</q-item-label>
109
102
  <div class="row">
103
+ <div style="background-color: #7367f0; width: 1.5rem; height: 1.5rem;"
104
+ class="q-ma-xs cursor-pointer rounded-borders" @click="$emit('update:color', '')" />
105
+
110
106
  <div v-for="c in COLORS" :key="c" :class="`bg-${c}`" style="width: 1.5rem; height: 1.5rem;"
111
107
  class="q-ma-xs cursor-pointer rounded-borders" @click="$emit('update:color', c)" />
112
108
  </div>
@@ -118,8 +114,7 @@ requestAnimationFrame(refreshServerTime);
118
114
  <q-item-label>{{ $t('Mini mode') }}</q-item-label>
119
115
  </q-item-section>
120
116
  <q-item-section side>
121
- <q-toggle :model-value="miniState" @update:model-value="$emit('update:miniState', $event)"
122
- :color="$light.color" />
117
+ <q-toggle :model-value="miniState" @update:model-value="$emit('update:miniState', $event)" />
123
118
  </q-item-section>
124
119
  </q-item>
125
120
  <q-separator />
@@ -129,8 +124,7 @@ requestAnimationFrame(refreshServerTime);
129
124
  <q-item-label>Menu dense mode</q-item-label>
130
125
  </q-item-section>
131
126
  <q-item-section side>
132
- <q-toggle :model-value="dense" @update:model-value="$emit('update:dense', $event)"
133
- :color="$light.color" />
127
+ <q-toggle :model-value="dense" @update:model-value="$emit('update:dense', $event)" />
134
128
  </q-item-section>
135
129
  </q-item>
136
130
 
@@ -142,7 +136,7 @@ requestAnimationFrame(refreshServerTime);
142
136
  </q-item-section>
143
137
  <q-item-section side>
144
138
  <q-toggle :model-value="menuOverlayHeader"
145
- @update:model-value="$emit('update:menuOverlayHeader', $event)" :color="$light.color" />
139
+ @update:model-value="$emit('update:menuOverlayHeader', $event)" />
146
140
  </q-item-section>
147
141
  </q-item>
148
142
 
@@ -153,16 +147,14 @@ requestAnimationFrame(refreshServerTime);
153
147
  <q-item-label>{{ $t('Show footer') }}</q-item-label>
154
148
  </q-item-section>
155
149
  <q-item-section side>
156
- <q-toggle :model-value="footer" @update:model-value="$emit('update:footer', $event)"
157
- :color="$light.color" />
150
+ <q-toggle :model-value="footer" @update:model-value="$emit('update:footer', $event)" />
158
151
  </q-item-section>
159
152
  </q-item>
160
153
  <q-separator />
161
154
  <q-item>
162
155
  <q-item-section>
163
156
  <q-item-label>{{ $t('Menu width') }}</q-item-label>
164
- <q-item-label><q-slider v-model="menuWidth" :min="200" :max="360" label
165
- :color="$light.color" /></q-item-label>
157
+ <q-item-label><q-slider v-model="menuWidth" :min="200" :max="360" label /></q-item-label>
166
158
  </q-item-section>
167
159
  </q-item>
168
160
  <q-separator />
@@ -175,7 +167,7 @@ requestAnimationFrame(refreshServerTime);
175
167
  <q-item-label>{{ server_date }} {{ server_time }} </q-item-label>
176
168
  </q-item-section>
177
169
  </q-item>
178
-
170
+
179
171
 
180
172
  </q-list>
181
173
  </template>
@@ -190,9 +190,9 @@ const dateProps = computed(() => {
190
190
  <template v-slot:prepend>
191
191
  <q-icon name="sym_o_event" class="cursor-pointer">
192
192
  <q-popup-proxy cover transition-show="scale" transition-hide="scale" ref="popup">
193
- <q-date :color="color ?? $light.color" mask="YYYY-MM-DD" v-model="modelValue" v-bind="dateProps">
193
+ <q-date mask="YYYY-MM-DD" v-model="modelValue" v-bind="dateProps">
194
194
  <div class="row items-center justify-end">
195
- <q-btn v-close-popup :label="$t('Close')" :color="color ?? $light.color" flat />
195
+ <q-btn v-close-popup :label="$t('Close')" flat />
196
196
  </div>
197
197
  </q-date>
198
198
  </q-popup-proxy>
@@ -46,7 +46,7 @@ const LABLES = [
46
46
  </q-item-label>
47
47
 
48
48
  <q-item v-for="label in LABLES" :key="label.type" clickable :active="modelValue == label.type"
49
- :active-class="`text-${$light.color}`" @click="toggleLabel(label.type)">
49
+ :active-class="`text-primary`" @click="toggleLabel(label.type)">
50
50
  <q-item-section avatar>
51
51
  <q-icon :name="label.icon" />
52
52
  </q-item-section>
@@ -111,9 +111,9 @@ const onClickMove = async () => {
111
111
  <q-tooltip> Create new folder</q-tooltip>
112
112
  </q-btn>
113
113
  <q-space></q-space>
114
- <q-btn dense label="Move to here" :color="$light.color" v-if="mode == 'empty folder'">
114
+ <q-btn dense label="Move to here" color="primary" v-if="mode == 'empty folder'">
115
115
  </q-btn>
116
- <q-btn dense label="Move" outline :color="$light.color" v-if="mode == 'move'" @click="onClickMove"></q-btn>
116
+ <q-btn dense label="Move" outline color="primary" v-if="mode == 'move'" @click="onClickMove"></q-btn>
117
117
  </q-card-actions>
118
118
  </q-card>
119
119
  </q-menu>
@@ -256,7 +256,6 @@ const onDeleteSelected = () => {
256
256
  };
257
257
  const onNewFolder = () => {
258
258
  $q.dialog({
259
- color: $light.color,
260
259
  title: "New Folder",
261
260
  prompt: {
262
261
  model: "",
@@ -505,7 +504,7 @@ selectedNodePath.value = drives[0].index.toString();
505
504
 
506
505
  <div>
507
506
  <q-input outlined :placeholder="$t('Search for file name')" dense @keyup.enter.native="submitSearch"
508
- v-model="search" :color="$light.color">
507
+ v-model="search">
509
508
  <template v-slot:append>
510
509
  <q-btn flat dense round icon="sym_o_search"></q-btn>
511
510
  </template>
@@ -522,7 +521,7 @@ selectedNodePath.value = drives[0].index.toString();
522
521
  <q-list padding class="text-grey-8">
523
522
  <q-item>
524
523
  <q-item-section>
525
- <l-btn icon="add" label="New" :disable="!selectedNodePath" :color="$light.color">
524
+ <l-btn icon="add" label="New" :disable="!selectedNodePath">
526
525
  <q-menu>
527
526
  <q-list>
528
527
  <q-item clickable v-close-popup @click="onNewFolder" v-if="permission.includes('fs.folder.create')">
@@ -585,7 +584,7 @@ selectedNodePath.value = drives[0].index.toString();
585
584
  </q-dialog>
586
585
 
587
586
  <q-toolbar>
588
- <q-breadcrumbs :active-color="$light.color">
587
+ <q-breadcrumbs>
589
588
  <q-breadcrumbs-el v-for="(b, index) in breadcrumbs" :label="b.label" :key="index"
590
589
  @click="selectedNodePath = b.path" href="javascript:void(0)"></q-breadcrumbs-el>
591
590
  </q-breadcrumbs>
@@ -613,7 +612,7 @@ selectedNodePath.value = drives[0].index.toString();
613
612
 
614
613
  <template v-if="grid">
615
614
  <q-table :title="$t('Folders')" flat grid :columns="columns" :rows="folders" hide-pagination
616
- :pagination="{ rowsPerPage: 0 }" color="$light.color">
615
+ :pagination="{ rowsPerPage: 0 }">
617
616
  <template v-slot:item="props">
618
617
  <div class="q-pa-xs col-xs-12 col-sm-6 col-md-4" @click="onDblclickRow(null, props.row, null)">
619
618
  <q-card flat bordered>
@@ -625,7 +624,7 @@ selectedNodePath.value = drives[0].index.toString();
625
624
  {{ props.row.name }}
626
625
  </q-item-section>
627
626
  <q-item-section avatar>
628
- <q-checkbox v-model="selected" :val="props.row" :color="$light.color" />
627
+ <q-checkbox v-model="selected" :val="props.row" />
629
628
  </q-item-section>
630
629
  </q-item>
631
630
  </q-card>
@@ -634,7 +633,7 @@ selectedNodePath.value = drives[0].index.toString();
634
633
  </q-table>
635
634
 
636
635
  <q-table :title="$t('Files')" flat grid :columns="columns" :rows="files" hide-pagination
637
- :pagination="{ rowsPerPage: 0 }" :color="$light.color">
636
+ :pagination="{ rowsPerPage: 0 }">
638
637
 
639
638
  <template v-slot:item="props">
640
639
  <div class="q-pa-xs col-xs-12 col-sm-6 col-md-4" @click="onClickRow(null, props.row, null)">
@@ -649,7 +648,7 @@ selectedNodePath.value = drives[0].index.toString();
649
648
  </q-item-label>
650
649
  </q-item-section>
651
650
  <q-item-section side>
652
- <q-checkbox v-model="selected" :val="props.row" :color="$light.color" />
651
+ <q-checkbox v-model="selected" :val="props.row" />
653
652
  </q-item-section>
654
653
  </q-item>
655
654
 
@@ -665,9 +664,7 @@ selectedNodePath.value = drives[0].index.toString();
665
664
  <q-table flat :columns="columns" :rows="items" @row-dblclick="onDblclickRow" @row-click="onClickRow"
666
665
  :pagination="pagination" row-key="path" selection="multiple" v-model:selected="selected" dense
667
666
  :loading="loading" :loading-label="$t('Loading...')" :no-data-label="$t('No data available')"
668
- :color="$light.color"
669
- separator="horizontal" :rows-per-page-options="[0]"
670
- >
667
+ separator="horizontal" :rows-per-page-options="[0]">
671
668
  <template #body-cell-icon="props">
672
669
  <q-td auto-width>
673
670
  <q-icon name="sym_o_folder" v-if="props.value == 'folder'" size="sm" />
@@ -87,7 +87,7 @@ const onCancel = async () => {
87
87
  </q-card-section>
88
88
  <q-card-actions align="right">
89
89
  <q-btn icon="sym_o_close" :label="$t('Cancel')" @click="onCancel" unelevated />
90
- <q-btn icon="sym_o_check" :label="$t('Save')" type="submit" :color="$light.color" unelevated
90
+ <q-btn icon="sym_o_check" :label="$t('Save')" type="submit" color="primary" unelevated
91
91
  :disabled="!context.state.valid" />
92
92
  </q-card-actions>
93
93
  </form-kit>
@@ -56,11 +56,12 @@ const filterFn = (val, update, abort) => {
56
56
  </script>
57
57
 
58
58
  <template>
59
- <q-select v-model="model" v-bind="$light.getInputProps($props)" :options="items" @update:model-value="handleItemUniqueByGroup"
60
- input-debounce="0" @filter="filterFn" :color="$light.color" :style="$light.styles.input"
59
+ <q-select v-model="model" v-bind="$light.getInputProps($props)" :options="items"
60
+ @update:model-value="handleItemUniqueByGroup" input-debounce="0" @filter="filterFn" :style="$light.styles.input"
61
61
  :emit-value="emitValue" :map-options="mapOptions">
62
62
  <template v-slot:option="scope">
63
- <q-item v-if="scope.opt.is_group" v-bind="{ ...scope.itemProps }" class="text-xs bg-grey-4" :key="scope.opt.label">
63
+ <q-item v-if="scope.opt.is_group" v-bind="{ ...scope.itemProps }" class="text-xs bg-grey-4"
64
+ :key="scope.opt.label">
64
65
  <q-item-section class="!cursor-default">
65
66
  {{ scope.opt.label || "Ungroup" }}
66
67
  </q-item-section>
@@ -3266,7 +3266,7 @@ const displayIcons = computed(() => {
3266
3266
  <q-menu :offset="[0, 8]">
3267
3267
 
3268
3268
  <q-item-label header>
3269
- <q-input v-model="search" label="Search" outlined dense :color="$light.color">
3269
+ <q-input v-model="search" label="Search" outlined dense>
3270
3270
  <template v-slot:prepend>
3271
3271
  <q-icon name="sym_o_search" dense />
3272
3272
  </template>
@@ -3289,7 +3289,7 @@ const displayIcons = computed(() => {
3289
3289
  <template v-slot:loading>
3290
3290
  <div class="text-center q-my-md">
3291
3291
 
3292
- <q-spinner-dots :color="$light.color" size="40px" />
3292
+ <q-spinner-dots size="40px" />
3293
3293
  </div>
3294
3294
  </template>
3295
3295
  </q-infinite-scroll>
@@ -13,13 +13,10 @@ const props = defineProps({
13
13
  default: "primary"
14
14
  }
15
15
  });
16
- const classData = computed(() => {
17
- return "text-" + $light.color;
18
- });
19
16
  </script>
20
17
 
21
18
  <template>
22
- <router-link :to="props.to" style="text-decoration: underline;" :class="classData">
19
+ <router-link :to="props.to" style="text-decoration: underline;" class="text-primary">
23
20
  <slot />
24
21
  </router-link>
25
22
  </template>
@@ -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>