@data-fair/lib-vuetify 1.7.1 → 1.8.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/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { type Session } from '@data-fair/lib-vue/session.js';
2
2
  import { VuetifyOptions } from 'vuetify';
3
3
  export declare function vuetifySessionOptions(session: Session): VuetifyOptions;
4
- export declare function vuetifySessionStyle(session: Session): string;
5
4
  export declare function defaultOptions(searchParams: Record<string, string>, darkCookie?: boolean, locale?: string): VuetifyOptions;
package/index.js CHANGED
@@ -23,9 +23,9 @@ export function vuetifySessionOptions (session) {
23
23
  messages: { fr, en }
24
24
  },
25
25
  theme: {
26
- defaultTheme: 'site',
26
+ defaultTheme: session.theme.value ?? 'default',
27
27
  themes: {
28
- site: {
28
+ [session.theme.value ?? 'default']: {
29
29
  dark: session.site.value?.dark,
30
30
  colors,
31
31
  variables: {
@@ -46,17 +46,6 @@ export function vuetifySessionOptions (session) {
46
46
  }
47
47
  }
48
48
  }
49
- export function vuetifySessionStyle (session) {
50
- if (!session.site.value) { throw new Error('vuetifySectionStyle requires fething site info in session util') }
51
- return `
52
- .v-application .text-primary!important {
53
- color: ${session.site.value.colors['text-primary']};
54
- }
55
- .v-application .text-secondary!important {
56
- color: ${session.site.value.colors['text-secondary']};
57
- }
58
- `
59
- }
60
49
  // TODO: deprecate this in favor of sessionVuetifyOptions
61
50
  export function defaultOptions (searchParams, darkCookie = false, locale = 'fr') {
62
51
  // console.warn('vuetify.defaultOptions is deprecated, use vuetifySessionOptions')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vuetify",
3
- "version": "1.7.1",
3
+ "version": "1.8.1",
4
4
  "description": "Components based on the Vuetify 3 UI lib for the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -16,9 +16,9 @@
16
16
  "build": "cd .. && npm run build"
17
17
  },
18
18
  "peerDependencies": {
19
- "@data-fair/lib-vue": "^1.13.0",
19
+ "@data-fair/lib-vue": "^1.15.0",
20
20
  "ofetch": "1",
21
- "vue-i18n": "10",
21
+ "vue-i18n": "10 || 11",
22
22
  "vuetify": "3"
23
23
  },
24
24
  "type": "module",
package/personal-menu.vue CHANGED
@@ -56,6 +56,7 @@
56
56
  </v-list-item>
57
57
 
58
58
  <!-- cancel a planned deletion ? -->
59
+ <!-- not really necessary as it is handled by SD directly after login
59
60
  <template v-if="user.pd">
60
61
  <v-alert
61
62
  :value="true"
@@ -76,6 +77,7 @@
76
77
  </v-btn>
77
78
  </v-row>
78
79
  </template>
80
+ -->
79
81
 
80
82
  <!-- account switching (personal account and organizations) -->
81
83
  <template v-if="user.organizations.length > 1 || (user.organizations.length === 1 && (!user.ipa || account.type === 'user'))">
@@ -125,52 +125,21 @@ function __VLS_template() {
125
125
  __VLS_nonNullable(__VLS_69.slots).default;
126
126
  const __VLS_69 = __VLS_pickFunctionalComponentCtx(__VLS_64, __VLS_66);
127
127
  const __VLS_46 = __VLS_pickFunctionalComponentCtx(__VLS_41, __VLS_43);
128
- if (__VLS_ctx.user.pd) {
129
- const __VLS_70 = __VLS_resolvedLocalAndGlobalComponents.VAlert;
130
- /** @type { [typeof __VLS_components.VAlert, typeof __VLS_components.vAlert, typeof __VLS_components.VAlert, typeof __VLS_components.vAlert, ] } */
131
- // @ts-ignore
132
- const __VLS_71 = __VLS_asFunctionalComponent(__VLS_70, new __VLS_70({ value: ((true)), type: ("warning"), tile: (true), outlined: ((__VLS_ctx.theme.current.value.dark)), ...{ style: ({}) }, }));
133
- const __VLS_72 = __VLS_71({ value: ((true)), type: ("warning"), tile: (true), outlined: ((__VLS_ctx.theme.current.value.dark)), ...{ style: ({}) }, }, ...__VLS_functionalComponentArgsRest(__VLS_71));
134
- (__VLS_ctx.t('plannedDeletion', { name: __VLS_ctx.user.name, plannedDeletion: __VLS_ctx.$d(new Date(__VLS_ctx.user.pd)) }));
135
- __VLS_nonNullable(__VLS_75.slots).default;
136
- const __VLS_75 = __VLS_pickFunctionalComponentCtx(__VLS_70, __VLS_72);
137
- const __VLS_76 = __VLS_resolvedLocalAndGlobalComponents.VRow;
138
- /** @type { [typeof __VLS_components.VRow, typeof __VLS_components.vRow, typeof __VLS_components.VRow, typeof __VLS_components.vRow, ] } */
139
- // @ts-ignore
140
- const __VLS_77 = __VLS_asFunctionalComponent(__VLS_76, new __VLS_76({ ...{ class: ("justify-center ma-0 mb-2") }, }));
141
- const __VLS_78 = __VLS_77({ ...{ class: ("justify-center ma-0 mb-2") }, }, ...__VLS_functionalComponentArgsRest(__VLS_77));
142
- const __VLS_82 = __VLS_resolvedLocalAndGlobalComponents.VBtn;
143
- /** @type { [typeof __VLS_components.VBtn, typeof __VLS_components.vBtn, typeof __VLS_components.VBtn, typeof __VLS_components.vBtn, ] } */
144
- // @ts-ignore
145
- const __VLS_83 = __VLS_asFunctionalComponent(__VLS_82, new __VLS_82({ ...{ 'onClick': {} }, color: ("warning"), }));
146
- const __VLS_84 = __VLS_83({ ...{ 'onClick': {} }, color: ("warning"), }, ...__VLS_functionalComponentArgsRest(__VLS_83));
147
- let __VLS_88;
148
- const __VLS_89 = {
149
- onClick: (__VLS_ctx.session.cancelDeletion)
150
- };
151
- let __VLS_85;
152
- let __VLS_86;
153
- (__VLS_ctx.t('cancelDeletion'));
154
- __VLS_nonNullable(__VLS_87.slots).default;
155
- const __VLS_87 = __VLS_pickFunctionalComponentCtx(__VLS_82, __VLS_84);
156
- __VLS_nonNullable(__VLS_81.slots).default;
157
- const __VLS_81 = __VLS_pickFunctionalComponentCtx(__VLS_76, __VLS_78);
158
- }
159
128
  if (__VLS_ctx.user.organizations.length > 1 || (__VLS_ctx.user.organizations.length === 1 && (!__VLS_ctx.user.ipa || __VLS_ctx.account.type === 'user'))) {
160
- const __VLS_90 = __VLS_resolvedLocalAndGlobalComponents.VListSubheader;
129
+ const __VLS_70 = __VLS_resolvedLocalAndGlobalComponents.VListSubheader;
161
130
  /** @type { [typeof __VLS_components.VListSubheader, typeof __VLS_components.vListSubheader, ] } */
162
131
  // @ts-ignore
163
- const __VLS_91 = __VLS_asFunctionalComponent(__VLS_90, new __VLS_90({ ...{ style: ({}) }, }));
164
- const __VLS_92 = __VLS_91({ ...{ style: ({}) }, }, ...__VLS_functionalComponentArgsRest(__VLS_91));
132
+ const __VLS_71 = __VLS_asFunctionalComponent(__VLS_70, new __VLS_70({ ...{ style: ({}) }, }));
133
+ const __VLS_72 = __VLS_71({ ...{ style: ({}) }, }, ...__VLS_functionalComponentArgsRest(__VLS_71));
165
134
  __VLS_directiveAsFunction(__VLS_directives.vT)(null, { ...__VLS_directiveBindingRestFields, value: ('switchAccount') }, null, null);
166
135
  if (__VLS_ctx.account.type !== 'user' && !__VLS_ctx.user.ipa) {
167
- const __VLS_96 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
136
+ const __VLS_76 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
168
137
  /** @type { [typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, ] } */
169
138
  // @ts-ignore
170
- const __VLS_97 = __VLS_asFunctionalComponent(__VLS_96, new __VLS_96({ ...{ 'onClick': {} }, id: ("toolbar-menu-switch-user"), }));
171
- const __VLS_98 = __VLS_97({ ...{ 'onClick': {} }, id: ("toolbar-menu-switch-user"), }, ...__VLS_functionalComponentArgsRest(__VLS_97));
172
- let __VLS_102;
173
- const __VLS_103 = {
139
+ const __VLS_77 = __VLS_asFunctionalComponent(__VLS_76, new __VLS_76({ ...{ 'onClick': {} }, id: ("toolbar-menu-switch-user"), }));
140
+ const __VLS_78 = __VLS_77({ ...{ 'onClick': {} }, id: ("toolbar-menu-switch-user"), }, ...__VLS_functionalComponentArgsRest(__VLS_77));
141
+ let __VLS_82;
142
+ const __VLS_83 = {
174
143
  onClick: (...[$event]) => {
175
144
  if (!(!((!__VLS_ctx.user || !__VLS_ctx.account))))
176
145
  return;
@@ -181,33 +150,33 @@ function __VLS_template() {
181
150
  __VLS_ctx.session.switchOrganization(null);
182
151
  }
183
152
  };
184
- let __VLS_99;
185
- let __VLS_100;
153
+ let __VLS_79;
154
+ let __VLS_80;
186
155
  __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
187
156
  {
188
- const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_101.slots);
189
- const __VLS_104 = __VLS_resolvedLocalAndGlobalComponents.VAvatar;
157
+ const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_81.slots);
158
+ const __VLS_84 = __VLS_resolvedLocalAndGlobalComponents.VAvatar;
190
159
  /** @type { [typeof __VLS_components.VAvatar, typeof __VLS_components.vAvatar, ] } */
191
160
  // @ts-ignore
192
- const __VLS_105 = __VLS_asFunctionalComponent(__VLS_104, new __VLS_104({ size: ((28)), image: ((`${__VLS_ctx.session.options.directoryUrl}/api/avatars/user/${__VLS_ctx.user.id}/avatar.png`)), }));
193
- const __VLS_106 = __VLS_105({ size: ((28)), image: ((`${__VLS_ctx.session.options.directoryUrl}/api/avatars/user/${__VLS_ctx.user.id}/avatar.png`)), }, ...__VLS_functionalComponentArgsRest(__VLS_105));
161
+ const __VLS_85 = __VLS_asFunctionalComponent(__VLS_84, new __VLS_84({ size: ((28)), image: ((`${__VLS_ctx.session.options.directoryUrl}/api/avatars/user/${__VLS_ctx.user.id}/avatar.png`)), }));
162
+ const __VLS_86 = __VLS_85({ size: ((28)), image: ((`${__VLS_ctx.session.options.directoryUrl}/api/avatars/user/${__VLS_ctx.user.id}/avatar.png`)), }, ...__VLS_functionalComponentArgsRest(__VLS_85));
194
163
  }
195
- const __VLS_110 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
164
+ const __VLS_90 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
196
165
  /** @type { [typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, ] } */
197
166
  // @ts-ignore
198
- const __VLS_111 = __VLS_asFunctionalComponent(__VLS_110, new __VLS_110({}));
199
- const __VLS_112 = __VLS_111({}, ...__VLS_functionalComponentArgsRest(__VLS_111));
167
+ const __VLS_91 = __VLS_asFunctionalComponent(__VLS_90, new __VLS_90({}));
168
+ const __VLS_92 = __VLS_91({}, ...__VLS_functionalComponentArgsRest(__VLS_91));
200
169
  __VLS_directiveAsFunction(__VLS_directives.vT)(null, { ...__VLS_directiveBindingRestFields, value: ('personalAccount') }, null, null);
201
- const __VLS_101 = __VLS_pickFunctionalComponentCtx(__VLS_96, __VLS_98);
170
+ const __VLS_81 = __VLS_pickFunctionalComponentCtx(__VLS_76, __VLS_78);
202
171
  }
203
172
  for (const [organization] of __VLS_getVForSourceType((__VLS_ctx.switchableOrganizations))) {
204
- const __VLS_116 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
173
+ const __VLS_96 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
205
174
  /** @type { [typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, ] } */
206
175
  // @ts-ignore
207
- const __VLS_117 = __VLS_asFunctionalComponent(__VLS_116, new __VLS_116({ ...{ 'onClick': {} }, id: (('toolbar-menu-switch-orga-' + organization.id)), key: ((organization.id)), }));
208
- const __VLS_118 = __VLS_117({ ...{ 'onClick': {} }, id: (('toolbar-menu-switch-orga-' + organization.id)), key: ((organization.id)), }, ...__VLS_functionalComponentArgsRest(__VLS_117));
209
- let __VLS_122;
210
- const __VLS_123 = {
176
+ const __VLS_97 = __VLS_asFunctionalComponent(__VLS_96, new __VLS_96({ ...{ 'onClick': {} }, id: (('toolbar-menu-switch-orga-' + organization.id)), key: ((organization.id)), }));
177
+ const __VLS_98 = __VLS_97({ ...{ 'onClick': {} }, id: (('toolbar-menu-switch-orga-' + organization.id)), key: ((organization.id)), }, ...__VLS_functionalComponentArgsRest(__VLS_97));
178
+ let __VLS_102;
179
+ const __VLS_103 = {
211
180
  onClick: (...[$event]) => {
212
181
  if (!(!((!__VLS_ctx.user || !__VLS_ctx.account))))
213
182
  return;
@@ -216,71 +185,71 @@ function __VLS_template() {
216
185
  __VLS_ctx.session.switchOrganization(organization.id, organization.department);
217
186
  }
218
187
  };
219
- let __VLS_119;
220
- let __VLS_120;
188
+ let __VLS_99;
189
+ let __VLS_100;
221
190
  __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
222
191
  {
223
- const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_121.slots);
224
- const __VLS_124 = __VLS_resolvedLocalAndGlobalComponents.VAvatar;
192
+ const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_101.slots);
193
+ const __VLS_104 = __VLS_resolvedLocalAndGlobalComponents.VAvatar;
225
194
  /** @type { [typeof __VLS_components.VAvatar, typeof __VLS_components.vAvatar, ] } */
226
195
  // @ts-ignore
227
- const __VLS_125 = __VLS_asFunctionalComponent(__VLS_124, new __VLS_124({ size: ((28)), image: ((organization.department ? `${__VLS_ctx.session.options.directoryUrl}/api/avatars/organization/${organization.id}/${organization.department}/avatar.png` : `${__VLS_ctx.session.options.directoryUrl}/api/avatars/organization/${organization.id}/avatar.png`)), }));
228
- const __VLS_126 = __VLS_125({ size: ((28)), image: ((organization.department ? `${__VLS_ctx.session.options.directoryUrl}/api/avatars/organization/${organization.id}/${organization.department}/avatar.png` : `${__VLS_ctx.session.options.directoryUrl}/api/avatars/organization/${organization.id}/avatar.png`)), }, ...__VLS_functionalComponentArgsRest(__VLS_125));
196
+ const __VLS_105 = __VLS_asFunctionalComponent(__VLS_104, new __VLS_104({ size: ((28)), image: ((organization.department ? `${__VLS_ctx.session.options.directoryUrl}/api/avatars/organization/${organization.id}/${organization.department}/avatar.png` : `${__VLS_ctx.session.options.directoryUrl}/api/avatars/organization/${organization.id}/avatar.png`)), }));
197
+ const __VLS_106 = __VLS_105({ size: ((28)), image: ((organization.department ? `${__VLS_ctx.session.options.directoryUrl}/api/avatars/organization/${organization.id}/${organization.department}/avatar.png` : `${__VLS_ctx.session.options.directoryUrl}/api/avatars/organization/${organization.id}/avatar.png`)), }, ...__VLS_functionalComponentArgsRest(__VLS_105));
229
198
  }
230
- const __VLS_130 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
199
+ const __VLS_110 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
231
200
  /** @type { [typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, ] } */
232
201
  // @ts-ignore
233
- const __VLS_131 = __VLS_asFunctionalComponent(__VLS_130, new __VLS_130({}));
234
- const __VLS_132 = __VLS_131({}, ...__VLS_functionalComponentArgsRest(__VLS_131));
202
+ const __VLS_111 = __VLS_asFunctionalComponent(__VLS_110, new __VLS_110({}));
203
+ const __VLS_112 = __VLS_111({}, ...__VLS_functionalComponentArgsRest(__VLS_111));
235
204
  (organization.name);
236
- __VLS_nonNullable(__VLS_135.slots).default;
237
- const __VLS_135 = __VLS_pickFunctionalComponentCtx(__VLS_130, __VLS_132);
205
+ __VLS_nonNullable(__VLS_115.slots).default;
206
+ const __VLS_115 = __VLS_pickFunctionalComponentCtx(__VLS_110, __VLS_112);
238
207
  if (organization.department) {
239
- const __VLS_136 = __VLS_resolvedLocalAndGlobalComponents.VListItemSubtitle;
208
+ const __VLS_116 = __VLS_resolvedLocalAndGlobalComponents.VListItemSubtitle;
240
209
  /** @type { [typeof __VLS_components.VListItemSubtitle, typeof __VLS_components.vListItemSubtitle, typeof __VLS_components.VListItemSubtitle, typeof __VLS_components.vListItemSubtitle, ] } */
241
210
  // @ts-ignore
242
- const __VLS_137 = __VLS_asFunctionalComponent(__VLS_136, new __VLS_136({}));
243
- const __VLS_138 = __VLS_137({}, ...__VLS_functionalComponentArgsRest(__VLS_137));
211
+ const __VLS_117 = __VLS_asFunctionalComponent(__VLS_116, new __VLS_116({}));
212
+ const __VLS_118 = __VLS_117({}, ...__VLS_functionalComponentArgsRest(__VLS_117));
244
213
  (organization.departmentName || organization.department);
245
- __VLS_nonNullable(__VLS_141.slots).default;
246
- const __VLS_141 = __VLS_pickFunctionalComponentCtx(__VLS_136, __VLS_138);
214
+ __VLS_nonNullable(__VLS_121.slots).default;
215
+ const __VLS_121 = __VLS_pickFunctionalComponentCtx(__VLS_116, __VLS_118);
247
216
  }
248
- const __VLS_121 = __VLS_pickFunctionalComponentCtx(__VLS_116, __VLS_118);
217
+ const __VLS_101 = __VLS_pickFunctionalComponentCtx(__VLS_96, __VLS_98);
249
218
  }
250
219
  }
251
- const __VLS_142 = __VLS_resolvedLocalAndGlobalComponents.VDivider;
220
+ const __VLS_122 = __VLS_resolvedLocalAndGlobalComponents.VDivider;
252
221
  /** @type { [typeof __VLS_components.VDivider, typeof __VLS_components.vDivider, ] } */
253
222
  // @ts-ignore
254
- const __VLS_143 = __VLS_asFunctionalComponent(__VLS_142, new __VLS_142({}));
255
- const __VLS_144 = __VLS_143({}, ...__VLS_functionalComponentArgsRest(__VLS_143));
256
- var __VLS_148 = {};
223
+ const __VLS_123 = __VLS_asFunctionalComponent(__VLS_122, new __VLS_122({}));
224
+ const __VLS_124 = __VLS_123({}, ...__VLS_functionalComponentArgsRest(__VLS_123));
225
+ var __VLS_128 = {};
257
226
  if (__VLS_ctx.user.isAdmin) {
258
- const __VLS_149 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
227
+ const __VLS_129 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
259
228
  /** @type { [typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, ] } */
260
229
  // @ts-ignore
261
- const __VLS_150 = __VLS_asFunctionalComponent(__VLS_149, new __VLS_149({ density: ("compact"), ...{ class: ("personal-menu-switch-list-item") }, }));
262
- const __VLS_151 = __VLS_150({ density: ("compact"), ...{ class: ("personal-menu-switch-list-item") }, }, ...__VLS_functionalComponentArgsRest(__VLS_150));
230
+ const __VLS_130 = __VLS_asFunctionalComponent(__VLS_129, new __VLS_129({ density: ("compact"), ...{ class: ("personal-menu-switch-list-item") }, }));
231
+ const __VLS_131 = __VLS_130({ density: ("compact"), ...{ class: ("personal-menu-switch-list-item") }, }, ...__VLS_functionalComponentArgsRest(__VLS_130));
263
232
  __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
264
233
  {
265
- const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_154.slots);
266
- const __VLS_155 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
234
+ const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_134.slots);
235
+ const __VLS_135 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
267
236
  /** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon, ] } */
268
237
  // @ts-ignore
269
- const __VLS_156 = __VLS_asFunctionalComponent(__VLS_155, new __VLS_155({ icon: ((__VLS_ctx.mdiShieldAlert)), color: ("admin"), }));
270
- const __VLS_157 = __VLS_156({ icon: ((__VLS_ctx.mdiShieldAlert)), color: ("admin"), }, ...__VLS_functionalComponentArgsRest(__VLS_156));
238
+ const __VLS_136 = __VLS_asFunctionalComponent(__VLS_135, new __VLS_135({ icon: ((__VLS_ctx.mdiShieldAlert)), color: ("admin"), }));
239
+ const __VLS_137 = __VLS_136({ icon: ((__VLS_ctx.mdiShieldAlert)), color: ("admin"), }, ...__VLS_functionalComponentArgsRest(__VLS_136));
271
240
  }
272
- const __VLS_161 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
241
+ const __VLS_141 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
273
242
  /** @type { [typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, ] } */
274
243
  // @ts-ignore
275
- const __VLS_162 = __VLS_asFunctionalComponent(__VLS_161, new __VLS_161({}));
276
- const __VLS_163 = __VLS_162({}, ...__VLS_functionalComponentArgsRest(__VLS_162));
277
- const __VLS_167 = __VLS_resolvedLocalAndGlobalComponents.VSwitch;
244
+ const __VLS_142 = __VLS_asFunctionalComponent(__VLS_141, new __VLS_141({}));
245
+ const __VLS_143 = __VLS_142({}, ...__VLS_functionalComponentArgsRest(__VLS_142));
246
+ const __VLS_147 = __VLS_resolvedLocalAndGlobalComponents.VSwitch;
278
247
  /** @type { [typeof __VLS_components.VSwitch, typeof __VLS_components.vSwitch, ] } */
279
248
  // @ts-ignore
280
- const __VLS_168 = __VLS_asFunctionalComponent(__VLS_167, new __VLS_167({ ...{ 'onChange': {} }, modelValue: ((!!__VLS_ctx.user.adminMode)), color: ("admin"), hideDetails: (true), ...{ class: ("mt-0") }, density: ("compact"), label: ((__VLS_ctx.t('adminMode'))), }));
281
- const __VLS_169 = __VLS_168({ ...{ 'onChange': {} }, modelValue: ((!!__VLS_ctx.user.adminMode)), color: ("admin"), hideDetails: (true), ...{ class: ("mt-0") }, density: ("compact"), label: ((__VLS_ctx.t('adminMode'))), }, ...__VLS_functionalComponentArgsRest(__VLS_168));
282
- let __VLS_173;
283
- const __VLS_174 = {
249
+ const __VLS_148 = __VLS_asFunctionalComponent(__VLS_147, new __VLS_147({ ...{ 'onChange': {} }, modelValue: ((!!__VLS_ctx.user.adminMode)), color: ("admin"), hideDetails: (true), ...{ class: ("mt-0") }, density: ("compact"), label: ((__VLS_ctx.t('adminMode'))), }));
250
+ const __VLS_149 = __VLS_148({ ...{ 'onChange': {} }, modelValue: ((!!__VLS_ctx.user.adminMode)), color: ("admin"), hideDetails: (true), ...{ class: ("mt-0") }, density: ("compact"), label: ((__VLS_ctx.t('adminMode'))), }, ...__VLS_functionalComponentArgsRest(__VLS_148));
251
+ let __VLS_153;
252
+ const __VLS_154 = {
284
253
  onChange: (...[$event]) => {
285
254
  if (!(!((!__VLS_ctx.user || !__VLS_ctx.account))))
286
255
  return;
@@ -289,21 +258,21 @@ function __VLS_template() {
289
258
  __VLS_ctx.session.setAdminMode(!__VLS_ctx.user.adminMode);
290
259
  }
291
260
  };
292
- let __VLS_170;
293
- let __VLS_171;
294
- const __VLS_172 = __VLS_pickFunctionalComponentCtx(__VLS_167, __VLS_169);
295
- __VLS_nonNullable(__VLS_166.slots).default;
296
- const __VLS_166 = __VLS_pickFunctionalComponentCtx(__VLS_161, __VLS_163);
297
- const __VLS_154 = __VLS_pickFunctionalComponentCtx(__VLS_149, __VLS_151);
261
+ let __VLS_150;
262
+ let __VLS_151;
263
+ const __VLS_152 = __VLS_pickFunctionalComponentCtx(__VLS_147, __VLS_149);
264
+ __VLS_nonNullable(__VLS_146.slots).default;
265
+ const __VLS_146 = __VLS_pickFunctionalComponentCtx(__VLS_141, __VLS_143);
266
+ const __VLS_134 = __VLS_pickFunctionalComponentCtx(__VLS_129, __VLS_131);
298
267
  }
299
268
  if (__VLS_ctx.user.asAdmin) {
300
- const __VLS_175 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
269
+ const __VLS_155 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
301
270
  /** @type { [typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, ] } */
302
271
  // @ts-ignore
303
- const __VLS_176 = __VLS_asFunctionalComponent(__VLS_175, new __VLS_175({ ...{ 'onClick': {} }, color: ("admin"), density: ("compact"), }));
304
- const __VLS_177 = __VLS_176({ ...{ 'onClick': {} }, color: ("admin"), density: ("compact"), }, ...__VLS_functionalComponentArgsRest(__VLS_176));
305
- let __VLS_181;
306
- const __VLS_182 = {
272
+ const __VLS_156 = __VLS_asFunctionalComponent(__VLS_155, new __VLS_155({ ...{ 'onClick': {} }, color: ("admin"), density: ("compact"), }));
273
+ const __VLS_157 = __VLS_156({ ...{ 'onClick': {} }, color: ("admin"), density: ("compact"), }, ...__VLS_functionalComponentArgsRest(__VLS_156));
274
+ let __VLS_161;
275
+ const __VLS_162 = {
307
276
  onClick: (...[$event]) => {
308
277
  if (!(!((!__VLS_ctx.user || !__VLS_ctx.account))))
309
278
  return;
@@ -312,59 +281,59 @@ function __VLS_template() {
312
281
  __VLS_ctx.session.asAdmin(null);
313
282
  }
314
283
  };
315
- let __VLS_178;
316
- let __VLS_179;
284
+ let __VLS_158;
285
+ let __VLS_159;
317
286
  __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
318
287
  {
319
- const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_180.slots);
320
- const __VLS_183 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
288
+ const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_160.slots);
289
+ const __VLS_163 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
321
290
  /** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon, ] } */
322
291
  // @ts-ignore
323
- const __VLS_184 = __VLS_asFunctionalComponent(__VLS_183, new __VLS_183({ icon: ((__VLS_ctx.mdiAccountSwitchOutline)), }));
324
- const __VLS_185 = __VLS_184({ icon: ((__VLS_ctx.mdiAccountSwitchOutline)), }, ...__VLS_functionalComponentArgsRest(__VLS_184));
292
+ const __VLS_164 = __VLS_asFunctionalComponent(__VLS_163, new __VLS_163({ icon: ((__VLS_ctx.mdiAccountSwitchOutline)), }));
293
+ const __VLS_165 = __VLS_164({ icon: ((__VLS_ctx.mdiAccountSwitchOutline)), }, ...__VLS_functionalComponentArgsRest(__VLS_164));
325
294
  }
326
- const __VLS_189 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
295
+ const __VLS_169 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
327
296
  /** @type { [typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, ] } */
328
297
  // @ts-ignore
329
- const __VLS_190 = __VLS_asFunctionalComponent(__VLS_189, new __VLS_189({}));
330
- const __VLS_191 = __VLS_190({}, ...__VLS_functionalComponentArgsRest(__VLS_190));
298
+ const __VLS_170 = __VLS_asFunctionalComponent(__VLS_169, new __VLS_169({}));
299
+ const __VLS_171 = __VLS_170({}, ...__VLS_functionalComponentArgsRest(__VLS_170));
331
300
  (__VLS_ctx.t('backToAdmin'));
332
- __VLS_nonNullable(__VLS_194.slots).default;
333
- const __VLS_194 = __VLS_pickFunctionalComponentCtx(__VLS_189, __VLS_191);
334
- const __VLS_180 = __VLS_pickFunctionalComponentCtx(__VLS_175, __VLS_177);
301
+ __VLS_nonNullable(__VLS_174.slots).default;
302
+ const __VLS_174 = __VLS_pickFunctionalComponentCtx(__VLS_169, __VLS_171);
303
+ const __VLS_160 = __VLS_pickFunctionalComponentCtx(__VLS_155, __VLS_157);
335
304
  }
336
- const __VLS_195 = __VLS_resolvedLocalAndGlobalComponents.VDivider;
305
+ const __VLS_175 = __VLS_resolvedLocalAndGlobalComponents.VDivider;
337
306
  /** @type { [typeof __VLS_components.VDivider, typeof __VLS_components.vDivider, ] } */
338
307
  // @ts-ignore
339
- const __VLS_196 = __VLS_asFunctionalComponent(__VLS_195, new __VLS_195({}));
340
- const __VLS_197 = __VLS_196({}, ...__VLS_functionalComponentArgsRest(__VLS_196));
341
- const __VLS_201 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
308
+ const __VLS_176 = __VLS_asFunctionalComponent(__VLS_175, new __VLS_175({}));
309
+ const __VLS_177 = __VLS_176({}, ...__VLS_functionalComponentArgsRest(__VLS_176));
310
+ const __VLS_181 = __VLS_resolvedLocalAndGlobalComponents.VListItem;
342
311
  /** @type { [typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, typeof __VLS_components.VListItem, typeof __VLS_components.vListItem, ] } */
343
312
  // @ts-ignore
344
- const __VLS_202 = __VLS_asFunctionalComponent(__VLS_201, new __VLS_201({ ...{ 'onClick': {} }, }));
345
- const __VLS_203 = __VLS_202({ ...{ 'onClick': {} }, }, ...__VLS_functionalComponentArgsRest(__VLS_202));
346
- let __VLS_207;
347
- const __VLS_208 = {
313
+ const __VLS_182 = __VLS_asFunctionalComponent(__VLS_181, new __VLS_181({ ...{ 'onClick': {} }, }));
314
+ const __VLS_183 = __VLS_182({ ...{ 'onClick': {} }, }, ...__VLS_functionalComponentArgsRest(__VLS_182));
315
+ let __VLS_187;
316
+ const __VLS_188 = {
348
317
  onClick: (() => __VLS_ctx.session.logout())
349
318
  };
350
- let __VLS_204;
351
- let __VLS_205;
319
+ let __VLS_184;
320
+ let __VLS_185;
352
321
  __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
353
322
  {
354
- const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_206.slots);
355
- const __VLS_209 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
323
+ const { prepend: __VLS_thisSlot } = __VLS_nonNullable(__VLS_186.slots);
324
+ const __VLS_189 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
356
325
  /** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon, ] } */
357
326
  // @ts-ignore
358
- const __VLS_210 = __VLS_asFunctionalComponent(__VLS_209, new __VLS_209({ icon: ((__VLS_ctx.mdiLogout)), }));
359
- const __VLS_211 = __VLS_210({ icon: ((__VLS_ctx.mdiLogout)), }, ...__VLS_functionalComponentArgsRest(__VLS_210));
327
+ const __VLS_190 = __VLS_asFunctionalComponent(__VLS_189, new __VLS_189({ icon: ((__VLS_ctx.mdiLogout)), }));
328
+ const __VLS_191 = __VLS_190({ icon: ((__VLS_ctx.mdiLogout)), }, ...__VLS_functionalComponentArgsRest(__VLS_190));
360
329
  }
361
- const __VLS_215 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
330
+ const __VLS_195 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
362
331
  /** @type { [typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, ] } */
363
332
  // @ts-ignore
364
- const __VLS_216 = __VLS_asFunctionalComponent(__VLS_215, new __VLS_215({}));
365
- const __VLS_217 = __VLS_216({}, ...__VLS_functionalComponentArgsRest(__VLS_216));
333
+ const __VLS_196 = __VLS_asFunctionalComponent(__VLS_195, new __VLS_195({}));
334
+ const __VLS_197 = __VLS_196({}, ...__VLS_functionalComponentArgsRest(__VLS_196));
366
335
  __VLS_directiveAsFunction(__VLS_directives.vT)(null, { ...__VLS_directiveBindingRestFields, value: ('logout') }, null, null);
367
- const __VLS_206 = __VLS_pickFunctionalComponentCtx(__VLS_201, __VLS_203);
336
+ const __VLS_186 = __VLS_pickFunctionalComponentCtx(__VLS_181, __VLS_183);
368
337
  __VLS_nonNullable(__VLS_40.slots).default;
369
338
  const __VLS_40 = __VLS_pickFunctionalComponentCtx(__VLS_35, __VLS_37);
370
339
  const __VLS_17 = __VLS_pickFunctionalComponentCtx(__VLS_12, __VLS_14);
@@ -376,9 +345,6 @@ function __VLS_template() {
376
345
  __VLS_styleScopedClasses['py-0'];
377
346
  __VLS_styleScopedClasses['border-sm'];
378
347
  __VLS_styleScopedClasses['text--secondary'];
379
- __VLS_styleScopedClasses['justify-center'];
380
- __VLS_styleScopedClasses['ma-0'];
381
- __VLS_styleScopedClasses['mb-2'];
382
348
  __VLS_styleScopedClasses['personal-menu-switch-list-item'];
383
349
  __VLS_styleScopedClasses['mt-0'];
384
350
  var __VLS_slots;
@@ -400,7 +366,6 @@ const __VLS_self = (await import('vue')).defineComponent({
400
366
  mdiShieldAlert: mdiShieldAlert,
401
367
  mdiLogout: mdiLogout,
402
368
  mdiAccountSwitchOutline: mdiAccountSwitchOutline,
403
- theme: theme,
404
369
  session: session,
405
370
  t: t,
406
371
  user: user,
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <v-toolbar-items class="theme-switcher" v-if="session.fullSite.value?.theme.dark || session.fullSite.value?.theme.hc">
2
+ <v-toolbar-items class="theme-switcher" v-if="session.fullSite.value?.theme.dark || session.fullSite.value?.theme.hc || session.fullSite.value?.theme.hcDark">
3
3
  <v-menu
4
4
  offset-y
5
5
  nudge-left
@@ -21,11 +21,12 @@
21
21
  color="primary"
22
22
  hide-details
23
23
  :label="t('themeSwitch')"
24
- @update:modelValue="value => session.switchTheme(value as 'default' | 'dark' | 'hc')"
24
+ @update:modelValue="value => session.switchTheme(value as 'default' | 'dark' | 'hc' | 'hc-dark')"
25
25
  >
26
26
  <v-radio :label="t('theme.default')" value="default"></v-radio>
27
- <v-radio :label="t('theme.dark')" value="dark"></v-radio>
28
- <v-radio :label="t('theme.hc')" value="hc"></v-radio>
27
+ <v-radio v-if="session.fullSite.value?.theme.dark" :label="t('theme.dark')" value="dark"></v-radio>
28
+ <v-radio v-if="session.fullSite.value?.theme.hc":label="t('theme.hc')" value="hc"></v-radio>
29
+ <v-radio v-if="session.fullSite.value?.theme.hcDark" :label="t('theme.hcDark')" value="hc-dark"></v-radio>
29
30
  </v-radio-group>
30
31
  </v-list-item>
31
32
  </v-list>
@@ -40,12 +41,14 @@ fr:
40
41
  default: par défaut
41
42
  dark: sombre
42
43
  hc: contraste élevé
44
+ hcDark: sombre et contraste élevé
43
45
  en:
44
46
  themeSwitch: Change theme
45
47
  theme:
46
48
  default: default
47
49
  dark: dark
48
50
  hc: high contrast
51
+ hcDark: dark and high contrast
49
52
  </i18n>
50
53
 
51
54
  <script setup lang="ts">
@@ -25,7 +25,7 @@ function __VLS_template() {
25
25
  // CSS variable injection
26
26
  // CSS variable injection end
27
27
  let __VLS_resolvedLocalAndGlobalComponents;
28
- if (__VLS_ctx.session.fullSite.value?.theme.dark || __VLS_ctx.session.fullSite.value?.theme.hc) {
28
+ if (__VLS_ctx.session.fullSite.value?.theme.dark || __VLS_ctx.session.fullSite.value?.theme.hc || __VLS_ctx.session.fullSite.value?.theme.hcDark) {
29
29
  const __VLS_0 = __VLS_resolvedLocalAndGlobalComponents.VToolbarItems;
30
30
  /** @type { [typeof __VLS_components.VToolbarItems, typeof __VLS_components.vToolbarItems, typeof __VLS_components.VToolbarItems, typeof __VLS_components.vToolbarItems, ] } */
31
31
  // @ts-ignore
@@ -72,16 +72,27 @@ function __VLS_template() {
72
72
  // @ts-ignore
73
73
  const __VLS_39 = __VLS_asFunctionalComponent(__VLS_38, new __VLS_38({ label: ((__VLS_ctx.t('theme.default'))), value: ("default"), }));
74
74
  const __VLS_40 = __VLS_39({ label: ((__VLS_ctx.t('theme.default'))), value: ("default"), }, ...__VLS_functionalComponentArgsRest(__VLS_39));
75
- const __VLS_44 = __VLS_resolvedLocalAndGlobalComponents.VRadio;
76
- /** @type { [typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, ] } */
77
- // @ts-ignore
78
- const __VLS_45 = __VLS_asFunctionalComponent(__VLS_44, new __VLS_44({ label: ((__VLS_ctx.t('theme.dark'))), value: ("dark"), }));
79
- const __VLS_46 = __VLS_45({ label: ((__VLS_ctx.t('theme.dark'))), value: ("dark"), }, ...__VLS_functionalComponentArgsRest(__VLS_45));
80
- const __VLS_50 = __VLS_resolvedLocalAndGlobalComponents.VRadio;
81
- /** @type { [typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, ] } */
82
- // @ts-ignore
83
- const __VLS_51 = __VLS_asFunctionalComponent(__VLS_50, new __VLS_50({ label: ((__VLS_ctx.t('theme.hc'))), value: ("hc"), }));
84
- const __VLS_52 = __VLS_51({ label: ((__VLS_ctx.t('theme.hc'))), value: ("hc"), }, ...__VLS_functionalComponentArgsRest(__VLS_51));
75
+ if (__VLS_ctx.session.fullSite.value?.theme.dark) {
76
+ const __VLS_44 = __VLS_resolvedLocalAndGlobalComponents.VRadio;
77
+ /** @type { [typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, ] } */
78
+ // @ts-ignore
79
+ const __VLS_45 = __VLS_asFunctionalComponent(__VLS_44, new __VLS_44({ label: ((__VLS_ctx.t('theme.dark'))), value: ("dark"), }));
80
+ const __VLS_46 = __VLS_45({ label: ((__VLS_ctx.t('theme.dark'))), value: ("dark"), }, ...__VLS_functionalComponentArgsRest(__VLS_45));
81
+ }
82
+ if (__VLS_ctx.session.fullSite.value?.theme.hc) {
83
+ const __VLS_50 = __VLS_resolvedLocalAndGlobalComponents.VRadio;
84
+ /** @type { [typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, ] } */
85
+ // @ts-ignore
86
+ const __VLS_51 = __VLS_asFunctionalComponent(__VLS_50, new __VLS_50({ label: ((__VLS_ctx.t('theme.hc'))), value: ("hc"), }));
87
+ const __VLS_52 = __VLS_51({ label: ((__VLS_ctx.t('theme.hc'))), value: ("hc"), }, ...__VLS_functionalComponentArgsRest(__VLS_51));
88
+ }
89
+ if (__VLS_ctx.session.fullSite.value?.theme.hcDark) {
90
+ const __VLS_56 = __VLS_resolvedLocalAndGlobalComponents.VRadio;
91
+ /** @type { [typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, typeof __VLS_components.VRadio, typeof __VLS_components.vRadio, ] } */
92
+ // @ts-ignore
93
+ const __VLS_57 = __VLS_asFunctionalComponent(__VLS_56, new __VLS_56({ label: ((__VLS_ctx.t('theme.hcDark'))), value: ("hc-dark"), }));
94
+ const __VLS_58 = __VLS_57({ label: ((__VLS_ctx.t('theme.hcDark'))), value: ("hc-dark"), }, ...__VLS_functionalComponentArgsRest(__VLS_57));
95
+ }
85
96
  __VLS_nonNullable(__VLS_35.slots).default;
86
97
  const __VLS_35 = __VLS_pickFunctionalComponentCtx(__VLS_30, __VLS_32);
87
98
  __VLS_nonNullable(__VLS_29.slots).default;