feat: add shadcn admin workspace

This commit is contained in:
2026-03-28 17:56:36 +08:00
parent ec96d91548
commit 178434d63e
41 changed files with 6153 additions and 16 deletions

View File

@@ -1,6 +1,7 @@
param(
[switch]$FrontendOnly,
[switch]$BackendOnly,
[switch]$AdminOnly,
[switch]$McpOnly,
[switch]$WithMcp
)
@@ -9,8 +10,8 @@ $ErrorActionPreference = "Stop"
$repoRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
if (@($FrontendOnly, $BackendOnly, $McpOnly).Where({ $_ }).Count -gt 1) {
throw "Use only one of -FrontendOnly, -BackendOnly, or -McpOnly."
if (@($FrontendOnly, $BackendOnly, $AdminOnly, $McpOnly).Where({ $_ }).Count -gt 1) {
throw "Use only one of -FrontendOnly, -BackendOnly, -AdminOnly, or -McpOnly."
}
function Stop-RepoShells {
@@ -75,6 +76,11 @@ function Stop-Backend {
Stop-PortOwner -Port 5150 -Label "backend"
}
function Stop-Admin {
Stop-RepoShells -ScriptName "start-admin.ps1"
Stop-PortOwner -Port 4322 -Label "admin"
}
function Stop-Mcp {
Stop-RepoShells -ScriptName "start-mcp.ps1"
Stop-PortOwner -Port 5151 -Label "MCP"
@@ -90,13 +96,19 @@ if ($BackendOnly) {
exit 0
}
if ($AdminOnly) {
Stop-Admin
exit 0
}
if ($McpOnly) {
Stop-Mcp
exit 0
}
Write-Host "[stop] Stopping frontend and backend services..." -ForegroundColor Cyan
Write-Host "[stop] Stopping frontend, admin, and backend services..." -ForegroundColor Cyan
Stop-Frontend
Stop-Admin
Stop-Backend
if ($WithMcp) {