feat(navigation): 为数字人前台拆分独立页面路由

- 新增对话列表、聊天、角色详情、书架详情及个人资料独立路由
- 导航使用真实链接,补齐历史返回、登录深链与会话草稿恢复
- 搜索筛选由 URL 驱动,修复浏览器返回时丢失筛选的问题
- 补齐路由校验回归、页面加载与异常入口,并同步 README
This commit is contained in:
湛兮
2026-10-28 17:07:34 +08:00
parent caa54c9b34
commit 4132b80ee0
25 changed files with 801 additions and 192 deletions
+72 -8
View File
@@ -121,7 +121,7 @@
flex-direction: column;
gap: 9px;
}
.dh-sidebar nav button {
.dh-sidebar nav a {
display: flex;
align-items: center;
gap: 14px;
@@ -130,15 +130,15 @@
color: var(--dh-muted);
text-align: left;
}
.dh-sidebar nav button small {
.dh-sidebar nav a small {
margin-left: auto;
font-size: 11px;
}
.dh-sidebar nav button.is-active {
.dh-sidebar nav a.is-active {
color: var(--dh-accent);
background: color-mix(in srgb, var(--dh-accent) 9%, transparent);
}
.dh-sidebar nav button:hover {
.dh-sidebar nav a:hover {
background: var(--dh-panel);
}
.dh-sidebar-bottom {
@@ -1963,7 +1963,7 @@
gap: 2px;
height: 100%;
}
.dh-sidebar nav button {
.dh-sidebar nav a {
padding: 7px 3px;
display: flex;
flex-direction: column;
@@ -1973,7 +1973,7 @@
justify-content: center;
position: relative;
}
.dh-sidebar nav button small {
.dh-sidebar nav a small {
position: absolute;
top: 0;
right: 18px;
@@ -1982,10 +1982,10 @@
padding: 0 5px;
border-radius: 9px;
}
.dh-sidebar nav button.is-active {
.dh-sidebar nav a.is-active {
background: none;
}
.dh-sidebar nav button.is-active svg {
.dh-sidebar nav a.is-active svg {
filter: drop-shadow(
0 0 8px color-mix(in srgb, var(--dh-accent) 45%, transparent)
);
@@ -2422,3 +2422,67 @@ html.dh-chat-active body {
display: none;
}
}
/* 页面导航使用真实链接,视觉与触摸命中范围保持一致。 */
.dh-sidebar nav a {
cursor: pointer;
}
.dh-conversation-open[aria-disabled="true"] {
opacity: 0.42;
cursor: not-allowed;
}
.dh-detail-page {
padding: 40px 32px;
min-height: 100dvh;
}
.dh-detail-page .dh-detail {
width: min(960px, 100%);
max-height: none;
overflow: visible;
margin: 0 auto;
}
.dh-detail-page .dh-detail-body h1 {
font-size: clamp(26px, 4vw, 38px);
line-height: 1.3;
overflow-wrap: anywhere;
}
.dh-route-message {
display: flex;
min-height: 100dvh;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 20px;
padding: 32px;
text-align: center;
}
.dh-route-message a,
.dh-route-message button {
padding: 12px 24px;
border: 1px solid var(--dh-line);
border-radius: 12px;
}
@media (max-width: 600px) {
.dh-detail-page {
padding: 16px 14px 100px;
}
.dh-detail-page .dh-detail {
max-height: none;
}
}
.dh-detail-nav {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
max-width: 960px;
margin: 0 auto 20px;
color: var(--dh-muted);
}
.dh-app .dh-detail-back {
display: flex;
align-items: center;
gap: 8px;
min-height: 44px;
color: var(--dh-accent);
}