feat: 운영 안정성과 세션 음성 경험 개선
This commit is contained in:
parent
facc4ad2d9
commit
c788343467
95 changed files with 8431 additions and 1785 deletions
|
|
@ -43,19 +43,30 @@ const NAV_BY_ROLE: Record<Role, NavItem[]> = {
|
|||
],
|
||||
};
|
||||
|
||||
export function navItemsFor(role: Role): NavItem[] {
|
||||
return NAV_BY_ROLE[role];
|
||||
const ADMIN_ENTRY: NavItem = {
|
||||
to: "/admin",
|
||||
label: "운영 콘솔",
|
||||
icon: "shield",
|
||||
end: true,
|
||||
};
|
||||
|
||||
export function navItemsFor(role: Role, showAdminEntry = false): NavItem[] {
|
||||
const items = NAV_BY_ROLE[role];
|
||||
if (role === "admin" || !showAdminEntry) return items;
|
||||
return [ADMIN_ENTRY, ...items];
|
||||
}
|
||||
|
||||
export interface SidebarProps {
|
||||
role: Role;
|
||||
/** 기본 역할 화면에서도 관리자 권한 사용자가 운영 콘솔로 돌아갈 수 있게 한다. */
|
||||
showAdminEntry?: boolean;
|
||||
/** 상단 그룹 라벨 (기본 "메뉴") */
|
||||
groupLabel?: string;
|
||||
}
|
||||
|
||||
/** 좌측 네비 (240px). 활성 = accent-tint 알약. 강조바 금지. §6.3 */
|
||||
export function Sidebar({ role, groupLabel = "메뉴" }: SidebarProps) {
|
||||
const items = navItemsFor(role);
|
||||
export function Sidebar({ role, showAdminEntry = false, groupLabel = "메뉴" }: SidebarProps) {
|
||||
const items = navItemsFor(role, showAdminEntry);
|
||||
return (
|
||||
<nav className="vg-nav" aria-label="주 메뉴">
|
||||
<span className="vg-nav__label">{groupLabel}</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue