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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user