@onsvisual/svelte-components 0.1.99-component.toolbar → 0.1.100-component.toolbar
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.
|
@@ -12,18 +12,19 @@ setContext("buttonIds", {
|
|
|
12
12
|
buttonIds,
|
|
13
13
|
});
|
|
14
14
|
// Initial state: true unless explicitly set to 'false' in either localStorage or sessionStorage
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
: localStorage.getItem("showHelpModals") === "false"
|
|
15
|
+
$: showHelpState =
|
|
16
|
+
sessionStorage.getItem("showHelpModals") === "false"
|
|
18
17
|
? false
|
|
19
|
-
:
|
|
20
|
-
|
|
18
|
+
: localStorage.getItem("showHelpModals") === "false"
|
|
19
|
+
? false
|
|
20
|
+
: true;
|
|
21
|
+
const showHelpModals = writable(showHelpState ?? true);
|
|
21
22
|
// Subscribe to store changes to persist in localStorage
|
|
22
23
|
// showHelpModals.subscribe((value) => {
|
|
23
24
|
// localStorage.setItem("showHelpModals", value);
|
|
24
25
|
// });
|
|
25
26
|
// Reactively update the initial state
|
|
26
|
-
$: showHelpModals.set(
|
|
27
|
+
$: showHelpModals.set(showHelpState);
|
|
27
28
|
// Set context for showHelpModals
|
|
28
29
|
setContext("showHelpModals", showHelpModals);
|
|
29
30
|
const activeModalStore = writable(null); // Tracks the ID of the active modal
|