Add bus and ferry to staffLDB

This commit is contained in:
Fred Boniface
2023-07-08 21:54:33 +01:00
parent b6dca2df78
commit 13d3bc4dbe
13 changed files with 404 additions and 128 deletions

View File

@@ -0,0 +1,3 @@
export const version = '2023.7.1';
export const versionTag = 'dev';
export const showWelcome = true;

23
src/lib/stores/welcome.js Normal file
View File

@@ -0,0 +1,23 @@
import { writable } from 'svelte/store';
import { browser } from '$app/environment';
export const welcome = writable(fromLocalStorage('welcome', '0'));
toLocalStorage(welcome, 'welcome');
function fromLocalStorage(storageKey, fallback) {
if (browser) {
const storedValue = localStorage.getItem(storageKey);
if (storedValue !== 'undefined') {
return storedValue;
}
}
return fallback;
}
function toLocalStorage(store, storageKey) {
if (browser) {
store.subscribe((value) => {
localStorage.setItem(storageKey, value);
});
}
}