1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-16 05:04:04 +00:00

menu mess

This commit is contained in:
2023-05-27 21:18:47 +02:00
parent ab1891be27
commit f18eea7915
7 changed files with 110 additions and 52 deletions

View File

@ -0,0 +1,16 @@
import { ReportSharedStateVariable } from '$wails/go/app/App';
import { writable } from 'svelte/store';
function sharedStateStore(name) {
const { set, subscribe } = writable();
subscribe(newValue => ReportSharedStateVariable(name, newValue));
return { set, subscribe };
}
const sharedState = {
currentHost: sharedStateStore('currenthost'),
currentDb: sharedStateStore('currentdb'),
currentColl: sharedStateStore('currentcoll'),
};
export default sharedState;