mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
first draft
This commit is contained in:
@@ -32,3 +32,16 @@ export const documents = writable([
|
||||
|
||||
export const settings = writable({});
|
||||
export const showSettings = writable(false);
|
||||
function createLocalStorageStore(key, startValue) {
|
||||
const storedValue = localStorage.getItem(key);
|
||||
const initialValue = storedValue ? JSON.parse(storedValue) : startValue;
|
||||
|
||||
const store = writable(initialValue);
|
||||
|
||||
store.subscribe((value) => {
|
||||
localStorage.setItem(key, JSON.stringify(value));
|
||||
});
|
||||
|
||||
return store;
|
||||
}
|
||||
export const showWhatsChanged = createLocalStorageStore('showWhatsChanged', true);
|
||||
|
||||
Reference in New Issue
Block a user