fix(web): restore operator navigation IA
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
"awooop": "AwoooP",
|
||||
"awooopHome": "AwoooP 總覽",
|
||||
"awooopWorkbench": "AwoooP 操作台",
|
||||
"codeReview": "程式碼審查",
|
||||
"knowledgeAutomation": "知識與自動化",
|
||||
"governanceSecurity": "治理與安全",
|
||||
"workItems": "工作鏈路",
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
"awooop": "AwoooP",
|
||||
"awooopHome": "AwoooP 總覽",
|
||||
"awooopWorkbench": "AwoooP 操作台",
|
||||
"codeReview": "程式碼審查",
|
||||
"knowledgeAutomation": "知識與自動化",
|
||||
"governanceSecurity": "治理與安全",
|
||||
"workItems": "工作鏈路",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
"use client";
|
||||
|
||||
import { AppLayout } from "@/components/layout";
|
||||
import { Link, usePathname } from "@/i18n/routing";
|
||||
import { usePathname } from "@/i18n/routing";
|
||||
import {
|
||||
BrainCircuit,
|
||||
CalendarDays,
|
||||
@@ -116,29 +116,6 @@ export default function AwoooPLayout({
|
||||
<span>{t("status.score")}</span>
|
||||
</div>
|
||||
|
||||
<nav
|
||||
aria-label={t("workflowRailLabel")}
|
||||
className="flex max-w-full flex-wrap gap-1 overflow-hidden border-t border-[#e0ddd4] px-3 py-2 sm:px-5"
|
||||
>
|
||||
{navItems.map((item) => {
|
||||
const active = activeItem.href === item.href;
|
||||
return (
|
||||
<Link
|
||||
key={item.href}
|
||||
href={item.href}
|
||||
aria-current={active ? "page" : undefined}
|
||||
className={[
|
||||
"shrink-0 rounded-button border px-3 py-1.5 text-xs font-semibold transition-colors",
|
||||
active
|
||||
? "border-[#d97757] bg-[#fff7ed] text-[#141413]"
|
||||
: "border-[#d8d3c7] bg-white text-[#6f6b62] hover:border-[#c8c1b3] hover:text-[#141413]",
|
||||
].join(" ")}
|
||||
>
|
||||
{t(`nav.${item.labelKey}`)}
|
||||
</Link>
|
||||
);
|
||||
})}
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div className="w-full max-w-full">
|
||||
|
||||
@@ -26,14 +26,21 @@ import { usePathname } from 'next/navigation'
|
||||
import Link from 'next/link'
|
||||
import { cn } from '@/lib/utils'
|
||||
import {
|
||||
BarChart3,
|
||||
Bell,
|
||||
BookOpen,
|
||||
BrainCircuit,
|
||||
Building2,
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
ClipboardList,
|
||||
FileText,
|
||||
GitPullRequest,
|
||||
HelpCircle,
|
||||
LayoutDashboard,
|
||||
Monitor,
|
||||
Package,
|
||||
PlayCircle,
|
||||
Radar,
|
||||
Settings,
|
||||
ShieldCheck,
|
||||
@@ -71,10 +78,10 @@ type NavSection = {
|
||||
}
|
||||
|
||||
// ============================================================
|
||||
// 2026-06-04: Operator-first IA
|
||||
// 2026-06-26: Operator-first IA repair
|
||||
// ============================================================
|
||||
// 參考 Material / Atlassian / Carbon 的 app shell 模式:
|
||||
// 側欄放高頻任務與產品導航,Header 留給搜尋與全域工具。
|
||||
// 側欄放高頻任務與產品導航,頁面內不再重複用二層分頁藏入口。
|
||||
// ============================================================
|
||||
|
||||
const NAV_SECTIONS: NavSection[] = [
|
||||
@@ -83,22 +90,54 @@ const NAV_SECTIONS: NavSection[] = [
|
||||
items: [
|
||||
{ id: 'command-center', href: '/', labelKey: 'commandCenter', Icon: LayoutDashboard },
|
||||
{
|
||||
id: 'awooop-workbench',
|
||||
id: 'awooop-overview',
|
||||
href: '/awooop',
|
||||
labelKey: 'awooopWorkbench',
|
||||
labelKey: 'awooopHome',
|
||||
Icon: BrainCircuit,
|
||||
exact: true,
|
||||
badge: true,
|
||||
aliases: [
|
||||
'/awooop/work-items',
|
||||
'/awooop/runs',
|
||||
'/awooop/approvals',
|
||||
'/awooop/contracts',
|
||||
'/awooop/tenants',
|
||||
'/alerts',
|
||||
'/authorizations',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
sectionKey: 'queues',
|
||||
items: [
|
||||
{
|
||||
id: 'awooop-work-items',
|
||||
href: '/awooop/work-items',
|
||||
labelKey: 'workItems',
|
||||
Icon: ClipboardList,
|
||||
},
|
||||
{
|
||||
id: 'awooop-runs',
|
||||
href: '/awooop/runs',
|
||||
labelKey: 'runMonitor',
|
||||
Icon: PlayCircle,
|
||||
},
|
||||
{
|
||||
id: 'awooop-approvals',
|
||||
href: '/awooop/approvals',
|
||||
labelKey: 'approvalQueue',
|
||||
Icon: ShieldCheck,
|
||||
aliases: ['/authorizations'],
|
||||
badge: true,
|
||||
},
|
||||
{
|
||||
id: 'awooop-contracts',
|
||||
href: '/awooop/contracts',
|
||||
labelKey: 'contracts',
|
||||
Icon: FileText,
|
||||
},
|
||||
{
|
||||
id: 'awooop-tenants',
|
||||
href: '/awooop/tenants',
|
||||
labelKey: 'tenants',
|
||||
Icon: Building2,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
sectionKey: 'monitoring',
|
||||
items: [
|
||||
{
|
||||
id: 'observability',
|
||||
href: '/observability',
|
||||
@@ -107,11 +146,11 @@ const NAV_SECTIONS: NavSection[] = [
|
||||
aliases: ['/monitoring', '/apm', '/errors', '/apps', '/services', '/topology'],
|
||||
},
|
||||
{
|
||||
id: 'knowledge-automation',
|
||||
href: '/knowledge-base',
|
||||
labelKey: 'knowledgeAutomation',
|
||||
Icon: BookOpen,
|
||||
aliases: ['/knowledge', '/automation', '/auto-repair', '/drift', '/neural-command'],
|
||||
id: 'alerts',
|
||||
href: '/alerts',
|
||||
labelKey: 'alerts',
|
||||
Icon: Bell,
|
||||
aliases: ['/alert-operation-logs', '/notifications'],
|
||||
},
|
||||
{
|
||||
id: 'iwooos-security',
|
||||
@@ -119,14 +158,38 @@ const NAV_SECTIONS: NavSection[] = [
|
||||
labelKey: 'iwooos',
|
||||
Icon: ShieldCheck,
|
||||
aliases: ['/security-compliance'],
|
||||
relatedPaths: ['/iwooos', '/code-review', '/security', '/compliance'],
|
||||
relatedPaths: ['/iwooos', '/security', '/compliance'],
|
||||
},
|
||||
{
|
||||
id: 'code-review',
|
||||
href: '/code-review',
|
||||
labelKey: 'codeReview',
|
||||
Icon: GitPullRequest,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
sectionKey: 'knowledge',
|
||||
items: [
|
||||
{
|
||||
id: 'knowledge-automation',
|
||||
href: '/knowledge-base',
|
||||
labelKey: 'knowledgeAutomation',
|
||||
Icon: BookOpen,
|
||||
aliases: ['/knowledge', '/automation', '/auto-repair', '/drift', '/neural-command'],
|
||||
},
|
||||
{
|
||||
id: 'reports',
|
||||
href: '/reports',
|
||||
labelKey: 'reports',
|
||||
Icon: BarChart3,
|
||||
},
|
||||
{
|
||||
id: 'operations',
|
||||
href: '/operations',
|
||||
labelKey: 'operationsOverview',
|
||||
Icon: Package,
|
||||
aliases: ['/deployments', '/tickets', '/cost', '/billing', '/action-logs', '/reports'],
|
||||
aliases: ['/deployments', '/tickets', '/cost', '/billing', '/action-logs'],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user