Simplify server detail actions

This commit is contained in:
npc0-hue
2026-08-26 15:34:14 +08:00
parent d395019848
commit e3e1c787be
2 changed files with 18 additions and 14 deletions
+8 -14
View File
@@ -160,17 +160,6 @@ export function ServerDetailPage(props: PageComponentProps) {
return (
<section className="server-detail-page" aria-labelledby="server-detail-title">
<div className="action-strip">
<button type="button" className="icon-command" onClick={() => onNavigate("servers")}>
<MoonStar size={16} />
<span></span>
</button>
<button type="button" className="icon-command" onClick={() => void refresh()}>
<Sparkles size={16} />
<span></span>
</button>
</div>
{instance.status === "loading" && <LoadingState label="正在加载服务器详情…" />}
{instance.status === "error" && (
<ErrorState title="服务器详情加载失败" reason={instance.reason} diagnosticId={`server-detail:${serverId}`} onRetry={() => void refresh()} />
@@ -198,11 +187,16 @@ export function ServerDetailPage(props: PageComponentProps) {
<div className="server-detail-title-row">
<div>
<h1 id="server-detail-title">{instance.data.name}</h1>
<span className="provider-id">
{instance.data.id} · {instance.data.pluginId}@{instance.data.pluginVersion} · Run {runEndpoint ? "已自动附着" : "等待上报"}
</span>
</div>
<div className="action-strip">
<button type="button" className="icon-command" onClick={() => onNavigate("servers")}>
<MoonStar size={16} />
<span></span>
</button>
<button type="button" className="icon-command" onClick={() => void refresh()}>
<Sparkles size={16} />
<span></span>
</button>
<span className={cx("status-pill", detailFreshness === "fresh" ? statusClass(instance.data.state) : "status-disabled")}>{detailStateText}</span>
<button
type="button"