Extract memind_adm admin server, add local dev tooling, and remove image-generation.
Split platform admin and ops APIs into standalone admin-server.mjs with network guards; simplify billing to RMB token pricing, refactor user auth, and add rsync deploy plus local-test scripts and docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { NavLink, Outlet } from 'react-router-dom';
|
||||
import { useAuth } from '../lib/auth';
|
||||
|
||||
const links = [
|
||||
{ to: '/', label: '审核队列' },
|
||||
const opsLinks = [
|
||||
{ to: '/', label: '审核队列', end: true },
|
||||
{ to: '/reports', label: '举报处理' },
|
||||
{ to: '/featured', label: '精选管理' },
|
||||
{ to: '/creators', label: '创作者' },
|
||||
@@ -9,6 +10,8 @@ const links = [
|
||||
];
|
||||
|
||||
export function OpsLayout() {
|
||||
const { user } = useAuth();
|
||||
|
||||
return (
|
||||
<div className="layout">
|
||||
<header>
|
||||
@@ -16,16 +19,25 @@ export function OpsLayout() {
|
||||
<p style={{ color: '#68716c' }}>内容审核、精选与数据概览</p>
|
||||
</header>
|
||||
<nav className="nav">
|
||||
{links.map((link) => (
|
||||
{opsLinks.map((link) => (
|
||||
<NavLink
|
||||
key={link.to}
|
||||
to={link.to}
|
||||
end={link.to === '/'}
|
||||
end={link.end}
|
||||
className={({ isActive }) => (isActive ? 'active' : undefined)}
|
||||
>
|
||||
{link.label}
|
||||
</NavLink>
|
||||
))}
|
||||
{user?.role === 'admin' ? (
|
||||
<NavLink
|
||||
to="/admin"
|
||||
className={({ isActive }) => (isActive ? 'active' : undefined)}
|
||||
style={{ marginLeft: 'auto', opacity: 0.75 }}
|
||||
>
|
||||
⚙ 超管
|
||||
</NavLink>
|
||||
) : null}
|
||||
</nav>
|
||||
<Outlet />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user