Files
memind/ops/src/components/OpsLayout.tsx
T
john 9b4a25799f Add smart ACK provider for WeChat MP replies
Replace fixed ackText with a rule-based AckProvider that picks
response templates by message type and intent (translate, summary,
rewrite, poster, ppt, mindmap, code, search, schedule). Pure sync,
zero I/O, auto-falls back to config.ackText on any error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 15:19:03 +08:00

55 lines
1.5 KiB
TypeScript

import { NavLink, Outlet } from 'react-router-dom';
import { useAuth } from '../lib/auth';
const opsLinks = [
{ to: '/', label: '审核队列', end: true },
{ to: '/reports', label: '举报处理' },
{ to: '/featured', label: '精选管理' },
{ to: '/creators', label: '创作者' },
{ to: '/analytics', label: '数据看板' },
];
export function OpsLayout() {
const { user } = useAuth();
return (
<div className="layout">
<header>
<h1>Plaza </h1>
<p style={{ color: '#68716c' }}></p>
</header>
<nav className="nav">
{opsLinks.map((link) => (
<NavLink
key={link.to}
to={link.to}
end={link.end}
className={({ isActive }) => (isActive ? 'active' : undefined)}
>
{link.label}
</NavLink>
))}
{user?.role === 'admin' ? (
<>
<NavLink
to="/admin/wechat"
className={({ isActive }) => (isActive ? 'active' : undefined)}
style={{ marginLeft: 'auto' }}
>
</NavLink>
<NavLink
to="/admin"
className={({ isActive }) => (isActive ? 'active' : undefined)}
style={{ opacity: 0.75 }}
>
</NavLink>
</>
) : null}
</nav>
<Outlet />
</div>
);
}