fix(web): restore operator navigation IA
This commit is contained in:
@@ -72,6 +72,7 @@
|
|||||||
"awooop": "AwoooP",
|
"awooop": "AwoooP",
|
||||||
"awooopHome": "AwoooP 總覽",
|
"awooopHome": "AwoooP 總覽",
|
||||||
"awooopWorkbench": "AwoooP 操作台",
|
"awooopWorkbench": "AwoooP 操作台",
|
||||||
|
"codeReview": "程式碼審查",
|
||||||
"knowledgeAutomation": "知識與自動化",
|
"knowledgeAutomation": "知識與自動化",
|
||||||
"governanceSecurity": "治理與安全",
|
"governanceSecurity": "治理與安全",
|
||||||
"workItems": "工作鏈路",
|
"workItems": "工作鏈路",
|
||||||
|
|||||||
@@ -72,6 +72,7 @@
|
|||||||
"awooop": "AwoooP",
|
"awooop": "AwoooP",
|
||||||
"awooopHome": "AwoooP 總覽",
|
"awooopHome": "AwoooP 總覽",
|
||||||
"awooopWorkbench": "AwoooP 操作台",
|
"awooopWorkbench": "AwoooP 操作台",
|
||||||
|
"codeReview": "程式碼審查",
|
||||||
"knowledgeAutomation": "知識與自動化",
|
"knowledgeAutomation": "知識與自動化",
|
||||||
"governanceSecurity": "治理與安全",
|
"governanceSecurity": "治理與安全",
|
||||||
"workItems": "工作鏈路",
|
"workItems": "工作鏈路",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { AppLayout } from "@/components/layout";
|
import { AppLayout } from "@/components/layout";
|
||||||
import { Link, usePathname } from "@/i18n/routing";
|
import { usePathname } from "@/i18n/routing";
|
||||||
import {
|
import {
|
||||||
BrainCircuit,
|
BrainCircuit,
|
||||||
CalendarDays,
|
CalendarDays,
|
||||||
@@ -116,29 +116,6 @@ export default function AwoooPLayout({
|
|||||||
<span>{t("status.score")}</span>
|
<span>{t("status.score")}</span>
|
||||||
</div>
|
</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>
|
||||||
|
|
||||||
<div className="w-full max-w-full">
|
<div className="w-full max-w-full">
|
||||||
|
|||||||
@@ -26,14 +26,21 @@ import { usePathname } from 'next/navigation'
|
|||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { cn } from '@/lib/utils'
|
import { cn } from '@/lib/utils'
|
||||||
import {
|
import {
|
||||||
|
BarChart3,
|
||||||
|
Bell,
|
||||||
BookOpen,
|
BookOpen,
|
||||||
BrainCircuit,
|
BrainCircuit,
|
||||||
|
Building2,
|
||||||
ChevronLeft,
|
ChevronLeft,
|
||||||
ChevronRight,
|
ChevronRight,
|
||||||
|
ClipboardList,
|
||||||
|
FileText,
|
||||||
|
GitPullRequest,
|
||||||
HelpCircle,
|
HelpCircle,
|
||||||
LayoutDashboard,
|
LayoutDashboard,
|
||||||
Monitor,
|
Monitor,
|
||||||
Package,
|
Package,
|
||||||
|
PlayCircle,
|
||||||
Radar,
|
Radar,
|
||||||
Settings,
|
Settings,
|
||||||
ShieldCheck,
|
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 模式:
|
// 參考 Material / Atlassian / Carbon 的 app shell 模式:
|
||||||
// 側欄放高頻任務與產品導航,Header 留給搜尋與全域工具。
|
// 側欄放高頻任務與產品導航,頁面內不再重複用二層分頁藏入口。
|
||||||
// ============================================================
|
// ============================================================
|
||||||
|
|
||||||
const NAV_SECTIONS: NavSection[] = [
|
const NAV_SECTIONS: NavSection[] = [
|
||||||
@@ -83,22 +90,54 @@ const NAV_SECTIONS: NavSection[] = [
|
|||||||
items: [
|
items: [
|
||||||
{ id: 'command-center', href: '/', labelKey: 'commandCenter', Icon: LayoutDashboard },
|
{ id: 'command-center', href: '/', labelKey: 'commandCenter', Icon: LayoutDashboard },
|
||||||
{
|
{
|
||||||
id: 'awooop-workbench',
|
id: 'awooop-overview',
|
||||||
href: '/awooop',
|
href: '/awooop',
|
||||||
labelKey: 'awooopWorkbench',
|
labelKey: 'awooopHome',
|
||||||
Icon: BrainCircuit,
|
Icon: BrainCircuit,
|
||||||
exact: true,
|
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',
|
id: 'observability',
|
||||||
href: '/observability',
|
href: '/observability',
|
||||||
@@ -107,11 +146,11 @@ const NAV_SECTIONS: NavSection[] = [
|
|||||||
aliases: ['/monitoring', '/apm', '/errors', '/apps', '/services', '/topology'],
|
aliases: ['/monitoring', '/apm', '/errors', '/apps', '/services', '/topology'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'knowledge-automation',
|
id: 'alerts',
|
||||||
href: '/knowledge-base',
|
href: '/alerts',
|
||||||
labelKey: 'knowledgeAutomation',
|
labelKey: 'alerts',
|
||||||
Icon: BookOpen,
|
Icon: Bell,
|
||||||
aliases: ['/knowledge', '/automation', '/auto-repair', '/drift', '/neural-command'],
|
aliases: ['/alert-operation-logs', '/notifications'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'iwooos-security',
|
id: 'iwooos-security',
|
||||||
@@ -119,14 +158,38 @@ const NAV_SECTIONS: NavSection[] = [
|
|||||||
labelKey: 'iwooos',
|
labelKey: 'iwooos',
|
||||||
Icon: ShieldCheck,
|
Icon: ShieldCheck,
|
||||||
aliases: ['/security-compliance'],
|
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',
|
id: 'operations',
|
||||||
href: '/operations',
|
href: '/operations',
|
||||||
labelKey: 'operationsOverview',
|
labelKey: 'operationsOverview',
|
||||||
Icon: Package,
|
Icon: Package,
|
||||||
aliases: ['/deployments', '/tickets', '/cost', '/billing', '/action-logs', '/reports'],
|
aliases: ['/deployments', '/tickets', '/cost', '/billing', '/action-logs'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user