分离设置页面

This commit is contained in:
IndieKKY
2024-10-04 19:31:09 +08:00
parent e238d83f78
commit cf737b9976
4 changed files with 19 additions and 22 deletions

View File

@@ -22,7 +22,8 @@ function App() {
const eventBus = useContext(EventBusContext)
const totalHeight = useAppSelector(state => state.env.totalHeight)
const {sendInject} = useMessage()
const envData = useAppSelector(state => state.env.envData)
const foldCallback = useCallback(() => {
dispatch(setFold(!fold))
sendInject(MESSAGE_TO_INJECT_FOLD, {fold: !fold})
@@ -37,6 +38,11 @@ function App() {
}
})
// theme改变时设置主题
useEffect(() => {
setTheme(envData.theme)
}, [envData.theme])
useSubtitleService()
useTranslateService()
useSearchService()