@data-fair/lib-vuetify 1.6.5 → 1.6.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vuetify",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "description": "Components based on the Vuetify 3 UI lib for the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
package/personal-menu.vue CHANGED
@@ -128,17 +128,17 @@
128
128
  class="personal-menu-switch-list-item"
129
129
  >
130
130
  <template #prepend>
131
- <v-icon :icon="mdiShieldAlert" />
131
+ <v-icon :icon="mdiShieldAlert" color="admin" />
132
132
  </template>
133
133
  <v-list-item-title>
134
134
  <v-switch
135
- v-model="user.adminMode"
135
+ :model-value="!!user.adminMode"
136
136
  color="admin"
137
137
  hide-details
138
138
  class="mt-0"
139
139
  density="compact"
140
140
  :label="t('adminMode')"
141
- @change="session.setAdminMode"
141
+ @change="session.setAdminMode(!user.adminMode)"
142
142
  />
143
143
  </v-list-item-title>
144
144
  </v-list-item>
@@ -279,8 +279,8 @@ function __VLS_template() {
279
279
  const __VLS_155 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
280
280
  /** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon, ] } */
281
281
  // @ts-ignore
282
- const __VLS_156 = __VLS_asFunctionalComponent(__VLS_155, new __VLS_155({ icon: ((__VLS_ctx.mdiShieldAlert)), }));
283
- const __VLS_157 = __VLS_156({ icon: ((__VLS_ctx.mdiShieldAlert)), }, ...__VLS_functionalComponentArgsRest(__VLS_156));
282
+ const __VLS_156 = __VLS_asFunctionalComponent(__VLS_155, new __VLS_155({ icon: ((__VLS_ctx.mdiShieldAlert)), color: ("admin"), }));
283
+ const __VLS_157 = __VLS_156({ icon: ((__VLS_ctx.mdiShieldAlert)), color: ("admin"), }, ...__VLS_functionalComponentArgsRest(__VLS_156));
284
284
  }
285
285
  const __VLS_161 = __VLS_resolvedLocalAndGlobalComponents.VListItemTitle;
286
286
  /** @type { [typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, typeof __VLS_components.VListItemTitle, typeof __VLS_components.vListItemTitle, ] } */
@@ -290,11 +290,17 @@ function __VLS_template() {
290
290
  const __VLS_167 = __VLS_resolvedLocalAndGlobalComponents.VSwitch;
291
291
  /** @type { [typeof __VLS_components.VSwitch, typeof __VLS_components.vSwitch, ] } */
292
292
  // @ts-ignore
293
- 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'))), }));
294
- 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));
293
+ 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'))), }));
294
+ 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));
295
295
  let __VLS_173;
296
296
  const __VLS_174 = {
297
- onChange: (__VLS_ctx.session.setAdminMode)
297
+ onChange: (...[$event]) => {
298
+ if (!(!((!__VLS_ctx.user || !__VLS_ctx.account))))
299
+ return;
300
+ if (!((__VLS_ctx.user.isAdmin)))
301
+ return;
302
+ __VLS_ctx.session.setAdminMode(!__VLS_ctx.user.adminMode);
303
+ }
298
304
  };
299
305
  let __VLS_170;
300
306
  let __VLS_171;