fix(gui): do not persist loading flag
This commit is contained in:
parent
25b64cc3b0
commit
dcfce81fed
|
@ -47,7 +47,7 @@ export async function main() {
|
||||||
merge(params, config.params);
|
merge(params, config.params);
|
||||||
|
|
||||||
const defaults = paramsFromConfig(params);
|
const defaults = paramsFromConfig(params);
|
||||||
const state = createStore<OnnxState, [['zustand/persist', never]]>(persist((set) => ({
|
const state = createStore<OnnxState, [['zustand/persist', OnnxState]]>(persist((set) => ({
|
||||||
defaults,
|
defaults,
|
||||||
history: {
|
history: {
|
||||||
images: [],
|
images: [],
|
||||||
|
@ -170,6 +170,13 @@ export async function main() {
|
||||||
},
|
},
|
||||||
}), {
|
}), {
|
||||||
name: 'onnx-web',
|
name: 'onnx-web',
|
||||||
|
partialize: (oldState) => ({
|
||||||
|
...oldState,
|
||||||
|
history: {
|
||||||
|
...oldState.history,
|
||||||
|
loading: false,
|
||||||
|
},
|
||||||
|
}),
|
||||||
storage: createJSONStorage(() => localStorage),
|
storage: createJSONStorage(() => localStorage),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue