mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-04-22 15:09:04 +00:00
年度报告初版
This commit is contained in:
12
src/App.tsx
12
src/App.tsx
@@ -80,6 +80,7 @@ function App() {
|
|||||||
const isChatHistoryWindow = location.pathname.startsWith('/chat-history/') || location.pathname.startsWith('/chat-history-inline/')
|
const isChatHistoryWindow = location.pathname.startsWith('/chat-history/') || location.pathname.startsWith('/chat-history-inline/')
|
||||||
const isStandaloneChatWindow = location.pathname === '/chat-window'
|
const isStandaloneChatWindow = location.pathname === '/chat-window'
|
||||||
const isNotificationWindow = location.pathname === '/notification-window'
|
const isNotificationWindow = location.pathname === '/notification-window'
|
||||||
|
const isAnnualReportWindow = location.pathname === '/annual-report/view'
|
||||||
const isSettingsRoute = location.pathname === '/settings'
|
const isSettingsRoute = location.pathname === '/settings'
|
||||||
const settingsRouteState = location.state as { backgroundLocation?: Location; initialTab?: unknown } | null
|
const settingsRouteState = location.state as { backgroundLocation?: Location; initialTab?: unknown } | null
|
||||||
const routeLocation = isSettingsRoute
|
const routeLocation = isSettingsRoute
|
||||||
@@ -127,7 +128,7 @@ function App() {
|
|||||||
const body = document.body
|
const body = document.body
|
||||||
const appRoot = document.getElementById('app')
|
const appRoot = document.getElementById('app')
|
||||||
|
|
||||||
if (isOnboardingWindow || isNotificationWindow) {
|
if (isOnboardingWindow || isNotificationWindow || isAnnualReportWindow) {
|
||||||
root.style.background = 'transparent'
|
root.style.background = 'transparent'
|
||||||
body.style.background = 'transparent'
|
body.style.background = 'transparent'
|
||||||
body.style.overflow = 'hidden'
|
body.style.overflow = 'hidden'
|
||||||
@@ -144,7 +145,7 @@ function App() {
|
|||||||
appRoot.style.overflow = ''
|
appRoot.style.overflow = ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [isOnboardingWindow])
|
}, [isOnboardingWindow, isNotificationWindow, isAnnualReportWindow])
|
||||||
|
|
||||||
// 应用主题
|
// 应用主题
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -165,7 +166,7 @@ function App() {
|
|||||||
}
|
}
|
||||||
mq.addEventListener('change', handler)
|
mq.addEventListener('change', handler)
|
||||||
return () => mq.removeEventListener('change', handler)
|
return () => mq.removeEventListener('change', handler)
|
||||||
}, [currentTheme, themeMode, isOnboardingWindow, isNotificationWindow])
|
}, [currentTheme, themeMode, isOnboardingWindow, isNotificationWindow, isAnnualReportWindow])
|
||||||
|
|
||||||
// 读取已保存的主题设置
|
// 读取已保存的主题设置
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -511,6 +512,11 @@ function App() {
|
|||||||
return <NotificationWindow />
|
return <NotificationWindow />
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 独立年度报告全屏窗口
|
||||||
|
if (isAnnualReportWindow) {
|
||||||
|
return <AnnualReportWindow />
|
||||||
|
}
|
||||||
|
|
||||||
// 主窗口 - 完整布局
|
// 主窗口 - 完整布局
|
||||||
const handleCloseSettings = () => {
|
const handleCloseSettings = () => {
|
||||||
const backgroundLocation = settingsRouteState?.backgroundLocation ?? settingsBackgroundRef.current
|
const backgroundLocation = settingsRouteState?.backgroundLocation ?? settingsBackgroundRef.current
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user