feat: Refactor service management scripts to use a unified dev script

- Added package.json to manage development scripts.
- Updated restart-services.ps1 to call the new dev script for starting services.
- Refactored start-admin.ps1, start-backend.ps1, start-frontend.ps1, and start-mcp.ps1 to utilize the dev script for starting respective services.
- Enhanced stop-services.ps1 to improve process termination logic by matching command patterns.
This commit is contained in:
2026-03-29 21:36:13 +08:00
parent 84f82c2a7e
commit 92a85eef20
137 changed files with 14181 additions and 2691 deletions

View File

@@ -21,38 +21,38 @@ import { cn } from '@/lib/utils'
const primaryNav = [
{
to: '/',
label: 'Overview',
description: 'Live operational dashboard',
label: '概览',
description: '站点运营总览',
icon: LayoutDashboard,
},
{
to: '/posts',
label: 'Posts',
description: 'Markdown content workspace',
label: '文章',
description: 'Markdown 内容管理',
icon: ScrollText,
},
{
to: '/comments',
label: 'Comments',
description: 'Moderation and paragraph replies',
label: '评论',
description: '审核与段落回复',
icon: MessageSquareText,
},
{
to: '/friend-links',
label: 'Friend links',
description: 'Partner queue and reciprocity',
label: '友链',
description: '友链申请与互链管理',
icon: Link2,
},
{
to: '/reviews',
label: 'Reviews',
description: 'Curated review library',
label: '评测',
description: '评测内容库',
icon: BookOpenText,
},
{
to: '/settings',
label: 'Site settings',
description: 'Brand, profile, and AI config',
label: '设置',
description: '品牌、资料与 AI 配置',
icon: Settings,
},
]
@@ -77,15 +77,12 @@ export function AppShell({
<div className="space-y-3">
<div className="inline-flex items-center gap-2 rounded-full border border-primary/20 bg-primary/10 px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.28em] text-primary">
<Orbit className="h-3.5 w-3.5" />
Termi admin
Termi
</div>
<div className="space-y-2">
<h1 className="text-2xl font-semibold tracking-tight">
Control room for the blog system
</h1>
<h1 className="text-2xl font-semibold tracking-tight"></h1>
<p className="text-sm leading-6 text-muted-foreground">
A dedicated React workspace for publishing, moderation, operations, and
AI-related site controls.
React AI
</p>
</div>
</div>
@@ -141,20 +138,20 @@ export function AppShell({
<div className="flex items-center justify-between gap-3">
<div>
<p className="text-xs uppercase tracking-[0.24em] text-muted-foreground">
Workspace status
</p>
<p className="mt-1 text-sm text-muted-foreground">
Core admin flows are now available in the standalone app.
</p>
</div>
<Badge variant="success">live</Badge>
<Badge variant="success"></Badge>
</div>
<div className="mt-4 grid gap-2">
<div className="rounded-2xl border border-border/60 bg-card/70 px-4 py-3 text-sm text-muted-foreground">
Public site and admin stay decoupled.
</div>
<div className="rounded-2xl border border-border/60 bg-card/70 px-4 py-3 text-sm text-muted-foreground">
Backend remains the shared auth and data layer.
</div>
</div>
</div>
@@ -168,12 +165,14 @@ export function AppShell({
<div className="space-y-2">
<div className="inline-flex items-center gap-2 rounded-full bg-secondary px-3 py-1 text-[11px] font-semibold uppercase tracking-[0.24em] text-secondary-foreground">
<Sparkles className="h-3.5 w-3.5" />
New admin workspace
</div>
<div>
<p className="text-sm text-muted-foreground">Signed in as {username ?? 'admin'}</p>
<p className="text-sm text-muted-foreground">
{username ?? 'admin'}
</p>
<p className="text-xs uppercase tracking-[0.18em] text-muted-foreground">
React + shadcn/ui foundation
React + shadcn/ui
</p>
</div>
</div>
@@ -202,12 +201,12 @@ export function AppShell({
<Button variant="outline" asChild>
<a href="http://localhost:4321" target="_blank" rel="noreferrer">
<ExternalLink className="h-4 w-4" />
Open site
</a>
</Button>
<Button variant="ghost" onClick={() => void onLogout()} disabled={loggingOut}>
<LogOut className="h-4 w-4" />
{loggingOut ? 'Signing out...' : 'Sign out'}
{loggingOut ? '退出中...' : '退出登录'}
</Button>
</div>
</div>