feat: 新版webui

This commit is contained in:
bietiaop committed 2025-01-24 21:13:44 +08:00
1 parent afc9c7ed8d
commit 31c0c1f4bc
201 files changed
+18454 -3422

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
import { PayloadAction, createSlice } from '@reduxjs/toolkit'
import type { RootState } from '@/store'
interface ConfigState {
value: OneBotConfig
}
const initialState: ConfigState = {
value: {
network: {
httpServers: [],
httpClients: [],
websocketServers: [],
websocketClients: []
},
musicSignUrl: '',
enableLocalFile2Url: false,
parseMultMsg: true
}
}
export const configSlice = createSlice({
name: 'config',
initialState,
reducers: {
updateConfig: (state, action: PayloadAction<OneBotConfig>) => {
state.value = action.payload
}
}
})
export const { updateConfig } = configSlice.actions
export const selectCount = (state: RootState) => state.config.value
export default configSlice.reducer