polish server deployment workflow
This commit is contained in:
@@ -167,6 +167,16 @@ export function ServerDetailPage({ session, params, operations, onNavigate }: Pa
|
||||
void refresh();
|
||||
}, [refresh]);
|
||||
|
||||
useEffect(() => {
|
||||
if (params.routeKey !== "run-builder" || instance.status !== "ready" || typeof document === "undefined") return;
|
||||
const frame = window.requestAnimationFrame(() => {
|
||||
const target = document.getElementById("run-builder");
|
||||
target?.scrollIntoView({ behavior: "smooth", block: "start" });
|
||||
target?.focus({ preventScroll: true });
|
||||
});
|
||||
return () => window.cancelAnimationFrame(frame);
|
||||
}, [instance.status, params.routeKey]);
|
||||
|
||||
const serverOperations = useMemo(
|
||||
() => operations.operations.filter((operation) => operation.targetId === serverId || operation.targetId.startsWith(`${serverId}:`)),
|
||||
[operations.operations, serverId]
|
||||
@@ -1007,7 +1017,7 @@ function RuntimeDistributionSection({ instance, runtimeActions, session, operati
|
||||
}
|
||||
|
||||
return (
|
||||
<article className="console-panel" aria-label="run distribution controls">
|
||||
<article id="run-builder" className="console-panel" aria-label="run distribution controls" tabIndex={-1}>
|
||||
<div className="panel-header">
|
||||
<h2>
|
||||
<PackageOpen size={16} style={{ verticalAlign: "-2px" }} /> 运行分发
|
||||
|
||||
Reference in New Issue
Block a user