feat(webui): deep-link settings tabs via ?tab= and jump update banner to 关于
The settings sub-tab now lives in the URL (typed `?tab=` search param on the /settings route, validated against the tab whitelist; default 外观 omits it). The active tab is derived from the URL and tab clicks navigate (replace), so tabs are shareable/back-button friendly. The sidebar "有新版本可用" banner now links to /settings?tab=about, landing directly on 关于 (where 软件更新 lives) instead of the default settings tab.
This commit is contained in:
3 files changed
+22
-4
No files matched your search
@@ -170,6 +170,7 @@ export function Sidebar({ collapsed = false, onItemClick }: SidebarProps) {
|
||||
<div className={cn('px-2 pt-2', collapsed && 'px-0')}>
|
||||
<Link
|
||||
to="/settings"
|
||||
search={{ tab: 'about' }}
|
||||
onClick={onItemClick}
|
||||
title={updateInfo.latest ? `有新版本 v${updateInfo.latest} · 点击查看` : '有可用更新'}
|
||||
aria-label="有可用更新"
|
||||
|
||||
Reference in new issue
Block a user