feat: show settings as modal dialog

This commit is contained in:
aits2026
2026-03-10 13:32:19 +08:00
parent 5b2e48badd
commit 37796c98c9
4 changed files with 248 additions and 77 deletions

View File

@@ -284,7 +284,11 @@ function Sidebar({ collapsed }: SidebarProps) {
const openSettingsFromAccountMenu = () => {
setIsAccountMenuOpen(false)
navigate('/settings')
navigate('/settings', {
state: {
backgroundLocation: location
}
})
}
const handleConfirmClearAccountData = async () => {
@@ -432,7 +436,12 @@ function Sidebar({ collapsed }: SidebarProps) {
setLocked(true)
return
}
navigate('/settings', { state: { initialTab: 'security' } })
navigate('/settings', {
state: {
initialTab: 'security',
backgroundLocation: location
}
})
}}
title={collapsed ? (authEnabled ? '锁定' : '未锁定') : undefined}
>