@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 +0 -1
- package/index.js +2 -13
- package/package.json +3 -3
- package/personal-menu.vue +2 -0
- package/personal-menu.vue.js +100 -135
- package/theme-switcher.vue +7 -4
- package/theme-switcher.vue.js +22 -11
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: '
|
|
26
|
+
defaultTheme: session.theme.value ?? 'default',
|
|
27
27
|
themes: {
|
|
28
|
-
|
|
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.
|
|
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.
|
|
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'))">
|
package/personal-menu.vue.js
CHANGED
|
@@ -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
|
|
129
|
+
const __VLS_70 = __VLS_resolvedLocalAndGlobalComponents.VListSubheader;
|
|
161
130
|
/** @type { [typeof __VLS_components.VListSubheader, typeof __VLS_components.vListSubheader, ] } */
|
|
162
131
|
// @ts-ignore
|
|
163
|
-
const
|
|
164
|
-
const
|
|
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
|
|
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
|
|
171
|
-
const
|
|
172
|
-
let
|
|
173
|
-
const
|
|
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
|
|
185
|
-
let
|
|
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(
|
|
189
|
-
const
|
|
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
|
|
193
|
-
const
|
|
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
|
|
164
|
+
const __VLS_90 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
|
|
196
165
|
/** @type { [typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, ] } */
|
|
197
166
|
// @ts-ignore
|
|
198
|
-
const
|
|
199
|
-
const
|
|
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
|
|
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
|
|
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
|
|
208
|
-
const
|
|
209
|
-
let
|
|
210
|
-
const
|
|
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
|
|
220
|
-
let
|
|
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(
|
|
224
|
-
const
|
|
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
|
|
228
|
-
const
|
|
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
|
|
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
|
|
234
|
-
const
|
|
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(
|
|
237
|
-
const
|
|
205
|
+
__VLS_nonNullable(__VLS_115.slots).default;
|
|
206
|
+
const __VLS_115 = __VLS_pickFunctionalComponentCtx(__VLS_110, __VLS_112);
|
|
238
207
|
if (organization.department) {
|
|
239
|
-
const
|
|
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
|
|
243
|
-
const
|
|
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(
|
|
246
|
-
const
|
|
214
|
+
__VLS_nonNullable(__VLS_121.slots).default;
|
|
215
|
+
const __VLS_121 = __VLS_pickFunctionalComponentCtx(__VLS_116, __VLS_118);
|
|
247
216
|
}
|
|
248
|
-
const
|
|
217
|
+
const __VLS_101 = __VLS_pickFunctionalComponentCtx(__VLS_96, __VLS_98);
|
|
249
218
|
}
|
|
250
219
|
}
|
|
251
|
-
const
|
|
220
|
+
const __VLS_122 = __VLS_resolvedLocalAndGlobalComponents.VDivider;
|
|
252
221
|
/** @type { [typeof __VLS_components.VDivider, typeof __VLS_components.vDivider, ] } */
|
|
253
222
|
// @ts-ignore
|
|
254
|
-
const
|
|
255
|
-
const
|
|
256
|
-
var
|
|
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
|
|
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
|
|
262
|
-
const
|
|
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(
|
|
266
|
-
const
|
|
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
|
|
270
|
-
const
|
|
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
|
|
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
|
|
276
|
-
const
|
|
277
|
-
const
|
|
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
|
|
281
|
-
const
|
|
282
|
-
let
|
|
283
|
-
const
|
|
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
|
|
293
|
-
let
|
|
294
|
-
const
|
|
295
|
-
__VLS_nonNullable(
|
|
296
|
-
const
|
|
297
|
-
const
|
|
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
|
|
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
|
|
304
|
-
const
|
|
305
|
-
let
|
|
306
|
-
const
|
|
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
|
|
316
|
-
let
|
|
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(
|
|
320
|
-
const
|
|
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
|
|
324
|
-
const
|
|
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
|
|
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
|
|
330
|
-
const
|
|
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(
|
|
333
|
-
const
|
|
334
|
-
const
|
|
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
|
|
305
|
+
const __VLS_175 = __VLS_resolvedLocalAndGlobalComponents.VDivider;
|
|
337
306
|
/** @type { [typeof __VLS_components.VDivider, typeof __VLS_components.vDivider, ] } */
|
|
338
307
|
// @ts-ignore
|
|
339
|
-
const
|
|
340
|
-
const
|
|
341
|
-
const
|
|
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
|
|
345
|
-
const
|
|
346
|
-
let
|
|
347
|
-
const
|
|
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
|
|
351
|
-
let
|
|
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(
|
|
355
|
-
const
|
|
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
|
|
359
|
-
const
|
|
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
|
|
330
|
+
const __VLS_195 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
|
|
362
331
|
/** @type { [typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, ] } */
|
|
363
332
|
// @ts-ignore
|
|
364
|
-
const
|
|
365
|
-
const
|
|
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
|
|
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,
|
package/theme-switcher.vue
CHANGED
|
@@ -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">
|
package/theme-switcher.vue.js
CHANGED
|
@@ -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
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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;
|