Simplify server detail actions
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user