Merge pull request #817 from xunchahaha:dev

修复双人年度报告[Bug]: 双人年度报告坏了
This commit is contained in:
xuncha
2026-04-21 20:21:01 +08:00
committed by GitHub
3 changed files with 775 additions and 1853 deletions

View File

@@ -81,6 +81,7 @@ function App() {
const isStandaloneChatWindow = location.pathname === '/chat-window'
const isNotificationWindow = location.pathname === '/notification-window'
const isAnnualReportWindow = location.pathname === '/annual-report/view'
const isDualReportWindow = location.pathname === '/dual-report/view'
const isSettingsRoute = location.pathname === '/settings'
const settingsRouteState = location.state as { backgroundLocation?: Location; initialTab?: unknown } | null
const routeLocation = isSettingsRoute
@@ -128,7 +129,7 @@ function App() {
const body = document.body
const appRoot = document.getElementById('app')
if (isOnboardingWindow || isNotificationWindow || isAnnualReportWindow) {
if (isOnboardingWindow || isNotificationWindow || isAnnualReportWindow || isDualReportWindow) {
root.style.background = 'transparent'
body.style.background = 'transparent'
body.style.overflow = 'hidden'
@@ -145,7 +146,7 @@ function App() {
appRoot.style.overflow = ''
}
}
}, [isOnboardingWindow, isNotificationWindow, isAnnualReportWindow])
}, [isOnboardingWindow, isNotificationWindow, isAnnualReportWindow, isDualReportWindow])
// 应用主题
useEffect(() => {
@@ -166,7 +167,7 @@ function App() {
}
mq.addEventListener('change', handler)
return () => mq.removeEventListener('change', handler)
}, [currentTheme, themeMode, isOnboardingWindow, isNotificationWindow, isAnnualReportWindow])
}, [currentTheme, themeMode, isOnboardingWindow, isNotificationWindow, isAnnualReportWindow, isDualReportWindow])
// 读取已保存的主题设置
useEffect(() => {
@@ -517,6 +518,11 @@ function App() {
return <AnnualReportWindow />
}
// 独立双人报告全屏窗口
if (isDualReportWindow) {
return <DualReportWindow />
}
// 主窗口 - 完整布局
const handleCloseSettings = () => {
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