sprintify-ui 0.10.45 → 0.10.46

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.
@@ -8,9 +8,9 @@ import { RouteLocationRaw } from 'vue-router';
8
8
  */
9
9
  declare const systemAlertStore: import("pinia").Store<"systemAlerts", {
10
10
  count: number;
11
- systemAlerts: import("..").SystemAlert[];
11
+ systemAlerts: import("@/index").SystemAlert[];
12
12
  }, {}, {
13
- push(systemAlert: import("..").SystemAlertOptions): string | number;
13
+ push(systemAlert: import("@/index").SystemAlertOptions): string | number;
14
14
  remove(alertId: number | string): void;
15
15
  clear(): void;
16
16
  }>;
@@ -43,9 +43,6 @@ declare const systemAlerts: import("vue").ComputedRef<{
43
43
  */
44
44
  declare const showMobileMenu: import("vue").Ref<boolean, boolean>;
45
45
  declare function closeMenu(): void;
46
- /**
47
- * Collapse
48
- */
49
46
  declare const collapsed: import("vue").Ref<boolean, boolean>;
50
47
  declare function toggleCollapse(): void;
51
48
  declare const navbarHeight: import("vue").ComputedRef<number>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.10.45",
3
+ "version": "0.10.46",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -204,7 +204,7 @@ import {
204
204
  TransitionChild,
205
205
  TransitionRoot,
206
206
  } from '@headlessui/vue';
207
-
207
+ import { config } from '@/index';
208
208
  import { useSystemAlertStore } from '../stores/systemAlerts';
209
209
  import { Icon as BaseIcon } from '@iconify/vue';
210
210
  import BaseSystemAlert from './BaseSystemAlert.vue';
@@ -265,10 +265,19 @@ function closeMenu() {
265
265
  * Collapse
266
266
  */
267
267
 
268
- const collapsed = ref(false);
268
+ const componentStorageKey = 'base_layout_sidebar.';
269
+ const settingsStorage = config.settingsStorage;
270
+
271
+ const collapsedKey = `${componentStorageKey}.collapsed`;
272
+
273
+ const value = await settingsStorage.get(collapsedKey);
274
+
275
+ const collapsed = ref(!!value);
269
276
 
270
277
  function toggleCollapse() {
271
278
  collapsed.value = !collapsed.value;
279
+
280
+ settingsStorage.set(collapsedKey, collapsed.value ? "1" : "0");
272
281
  }
273
282
 
274
283
  const navbarHeight = computed<number>(() => {