fix(web): 后台侧栏「新建笔记」上移至首位,移除管理员信息中的「站点所有者」
侧栏 Menu 与移动端 tabbar 同步调换,编辑页高亮新建入口的逻辑不变。
This commit is contained in:
@@ -196,8 +196,8 @@ export function AdminTopbar({ title, children }: { title: string; children?: Rea
|
|||||||
}
|
}
|
||||||
|
|
||||||
const adminNav = [
|
const adminNav = [
|
||||||
{ to: '/admin', label: '笔记管理', icon: House, end: true, match: 'exact' as const },
|
|
||||||
{ to: '/admin/notes/new', label: '新建笔记', icon: PenLine, end: false, match: 'prefix' as const },
|
{ to: '/admin/notes/new', label: '新建笔记', icon: PenLine, end: false, match: 'prefix' as const },
|
||||||
|
{ to: '/admin', label: '笔记管理', icon: House, end: true, match: 'exact' as const },
|
||||||
{ to: '/admin/trash', label: '回收站', icon: Trash2, end: true, match: 'exact' as const },
|
{ to: '/admin/trash', label: '回收站', icon: Trash2, end: true, match: 'exact' as const },
|
||||||
{ to: '/admin/settings', label: '设置', icon: Settings, end: true, match: 'exact' as const },
|
{ to: '/admin/settings', label: '设置', icon: Settings, end: true, match: 'exact' as const },
|
||||||
]
|
]
|
||||||
@@ -245,8 +245,8 @@ function AdminSidebar() {
|
|||||||
type: 'group',
|
type: 'group',
|
||||||
label: '内容',
|
label: '内容',
|
||||||
children: [
|
children: [
|
||||||
{ key: 'notes', icon: <House size={15} />, label: '笔记管理' },
|
|
||||||
{ key: 'new', icon: <PenLine size={15} />, label: '新建笔记' },
|
{ key: 'new', icon: <PenLine size={15} />, label: '新建笔记' },
|
||||||
|
{ key: 'notes', icon: <House size={15} />, label: '笔记管理' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -266,7 +266,6 @@ function AdminSidebar() {
|
|||||||
<span className="pn-admin-avatar">管</span>
|
<span className="pn-admin-avatar">管</span>
|
||||||
<span className="pn-admin-user-meta">
|
<span className="pn-admin-user-meta">
|
||||||
<span className="pn-admin-user-name">管理员</span>
|
<span className="pn-admin-user-name">管理员</span>
|
||||||
<span className="pn-admin-user-role">站点所有者</span>
|
|
||||||
</span>
|
</span>
|
||||||
<span className="pn-admin-user-actions">
|
<span className="pn-admin-user-actions">
|
||||||
<Tooltip title="返回博客" placement="bottom">
|
<Tooltip title="返回博客" placement="bottom">
|
||||||
|
|||||||
@@ -1406,10 +1406,6 @@ button.pn-note-back:hover {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--sidebar-foreground);
|
color: var(--sidebar-foreground);
|
||||||
}
|
}
|
||||||
.pn-admin-user-role {
|
|
||||||
font-size: 11px;
|
|
||||||
color: var(--muted-foreground);
|
|
||||||
}
|
|
||||||
/* 主区 / topbar */
|
/* 主区 / topbar */
|
||||||
.pn-admin-main {
|
.pn-admin-main {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user