mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 14:06:00 +00:00
perspectives: added data provider layer
This commit is contained in:
@@ -19,7 +19,14 @@ function doLoadPerspectiveConfigFunc(tabid) {
|
||||
|
||||
export default function usePerspectiveConfig(tabid) {
|
||||
const config = writable(doLoadPerspectiveConfigFunc(tabid));
|
||||
const unsubscribe = config.subscribe(value => localStorage.setItem(`tabdata_perspective_${tabid}`, JSON.stringify(value)));
|
||||
const unsubscribe = config.subscribe(value =>
|
||||
localStorage.setItem(`tabdata_perspective_${tabid}`, JSON.stringify(value))
|
||||
);
|
||||
onDestroy(unsubscribe);
|
||||
return config;
|
||||
}
|
||||
|
||||
export function usePerspectiveCache() {
|
||||
const cache = writable({});
|
||||
return cache;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user