From c1b24ef0252722bfd1fb90aec5385b2b89cda0ec Mon Sep 17 00:00:00 2001 From: Germey Date: Sat, 30 Dec 2023 18:53:24 +0800 Subject: [PATCH] update perist key --- src/store/chat/persist.ts | 1 + src/store/common/persist.ts | 1 + src/store/index.ts | 16 +++++----------- src/store/midjourney/persist.ts | 1 + 4 files changed, 8 insertions(+), 11 deletions(-) create mode 100644 src/store/chat/persist.ts create mode 100644 src/store/common/persist.ts create mode 100644 src/store/midjourney/persist.ts diff --git a/src/store/chat/persist.ts b/src/store/chat/persist.ts new file mode 100644 index 0000000..8684893 --- /dev/null +++ b/src/store/chat/persist.ts @@ -0,0 +1 @@ +export default ['chat.applications', 'chat.conversations']; diff --git a/src/store/common/persist.ts b/src/store/common/persist.ts new file mode 100644 index 0000000..780c607 --- /dev/null +++ b/src/store/common/persist.ts @@ -0,0 +1 @@ +export default ['user', 'token', 'setting']; diff --git a/src/store/index.ts b/src/store/index.ts index f05e9e2..3a41d69 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -1,8 +1,11 @@ -import { createStore, ActionContext } from 'vuex'; +import { createStore } from 'vuex'; import createPersistedState from 'vuex-persistedstate'; import midjourney from './midjourney'; import chat from './chat'; import root from './common'; +import persistChat from './chat/persist'; +import persistMidjourney from './midjourney/persist'; +import persistRoot from './common/persist'; const store = createStore({ ...root, @@ -12,16 +15,7 @@ const store = createStore({ }, plugins: [ createPersistedState({ - paths: [ - 'token', - 'user', - 'chat.applications', - 'chat.conversations', - 'midjourney.preset', - 'midjourney.channel', - 'midjourney.applications', - 'midjourney.imagineTasks' - ] + paths: [...persistRoot, ...persistChat, ...persistMidjourney] }) ] }); diff --git a/src/store/midjourney/persist.ts b/src/store/midjourney/persist.ts new file mode 100644 index 0000000..cc81185 --- /dev/null +++ b/src/store/midjourney/persist.ts @@ -0,0 +1 @@ +export default ['midjourney.preset', 'midjourney.channel', 'midjourney.applications', 'midjourney.imagineTasks'];