chore: updates

This commit is contained in:
zerosoul
2022-05-16 23:14:55 +08:00
parent 4f6aad0406
commit 7c98d18215
4 changed files with 1826 additions and 1883 deletions
+9
View File
@@ -14,6 +14,10 @@ const initialState = {
selectMessages: {},
draftMarkdown: {},
draftMixedText: {},
remeberedNavs: {
chat: null,
contact: null,
},
};
const uiSlice = createSlice({
name: "ui",
@@ -37,6 +41,10 @@ const uiSlice = createSlice({
updateFileListView(state, action) {
state.fileListView = action.payload;
},
updateRemeberedNavs(state, action) {
const { key = "chat", path = null } = action.payload || {};
state.remeberedNavs[key] = path;
},
updateDraftMarkdown(state, action) {
const { key, value } = action.payload;
state.draftMarkdown[key] = value;
@@ -158,5 +166,6 @@ export const {
updateUserGuide,
updateDraftMarkdown,
updateDraftMixedText,
updateRemeberedNavs,
} = uiSlice.actions;
export default uiSlice.reducer;