mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-19 15:09:36 +00:00
微调lite模式
This commit is contained in:
@@ -86,10 +86,17 @@ export function GlobalContextProvider(props) {
|
||||
// 添加路由变化时的语言处理
|
||||
useEffect(() => {
|
||||
initLocale(router.locale, changeLang, updateLocale)
|
||||
}, [router])
|
||||
// 处理极简模式
|
||||
if (router.query.lite && router.query.lite==='true') {
|
||||
setLiteMode(true)
|
||||
}
|
||||
}, [router])
|
||||
|
||||
|
||||
// 首次加载成功
|
||||
useEffect(() => {
|
||||
initDarkMode(updateDarkMode, defaultDarkMode)
|
||||
// 处理多语言自动重定向
|
||||
if (
|
||||
NOTION_CONFIG?.REDIRECT_LANG &&
|
||||
JSON.parse(NOTION_CONFIG?.REDIRECT_LANG)
|
||||
@@ -108,9 +115,7 @@ export function GlobalContextProvider(props) {
|
||||
const newUrl = `${url}${url.includes('?') ? '&' : '?'}theme=${themeStr}`
|
||||
router.push(newUrl)
|
||||
}
|
||||
if (router.query.lite && router.query.lite==='true') {
|
||||
setLiteMode(true)
|
||||
}
|
||||
|
||||
if (!onLoading) {
|
||||
setOnLoading(true)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user