1
0
Fork 0

fix(gui): do not persist loading flag

This commit is contained in:
Sean Sube 2023-01-11 21:45:47 -06:00
parent 25b64cc3b0
commit dcfce81fed
1 changed files with 8 additions and 1 deletions

View File

@ -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),
})); }));