refactor: setting modals to pages

This commit is contained in:
zerosoul
2022-04-12 18:21:59 +08:00
parent bcfadfb2d4
commit 20373c4376
28 changed files with 473 additions and 477 deletions
-12
View File
@@ -5,8 +5,6 @@ const initialState = {
ready: false,
inputMode: "text",
menuExpand: false,
setting: false,
channelSetting: null,
fileListView: Views.item,
};
const uiSlice = createSlice({
@@ -31,14 +29,6 @@ const uiSlice = createSlice({
updateFileListView(state, action) {
state.fileListView = action.payload;
},
toggleSetting(state) {
state.setting = !state.setting;
},
toggleChannelSetting(state, action) {
console.log("toggle channel setting payload", action);
const id = action.payload;
state.channelSetting = state.channelSetting ? null : id;
},
},
});
export const {
@@ -46,9 +36,7 @@ export const {
setReady,
updateOnline,
updateInputMode,
toggleSetting,
toggleMenuExpand,
toggleChannelSetting,
updateFileListView,
} = uiSlice.actions;
export default uiSlice.reducer;