2021-07-29 18:02:36 +02:00
|
|
|
import { writable } from "svelte/store";
|
|
|
|
import Timeout = NodeJS.Timeout;
|
2021-05-12 18:32:55 +02:00
|
|
|
|
|
|
|
export const menuIconVisible = writable(false);
|
2021-07-12 17:39:16 +02:00
|
|
|
export const menuVisible = writable(false);
|
2021-07-29 18:02:36 +02:00
|
|
|
|
|
|
|
let warningContainerTimeout: Timeout | null = null;
|
|
|
|
function createWarningContainerStore() {
|
|
|
|
const { subscribe, set } = writable<boolean>(false);
|
|
|
|
|
|
|
|
return {
|
|
|
|
subscribe,
|
|
|
|
activateWarningContainer() {
|
|
|
|
set(true);
|
|
|
|
if (warningContainerTimeout) clearTimeout(warningContainerTimeout);
|
|
|
|
warningContainerTimeout = setTimeout(() => {
|
|
|
|
set(false);
|
|
|
|
warningContainerTimeout = null;
|
|
|
|
}, 120000);
|
|
|
|
},
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
export const warningContainerStore = createWarningContainerStore();
|