Refine nsite action buttons next to Deploy

- Add a Settings icon button on the left of the Deploy button so all
  nsite actions live in one row. Drops the now-redundant "Edit site
  settings" text link from the summary card.
- Only show the History (version-history) button when the project has
  publishSnapshotOnDeploy enabled — otherwise the modal would always
  be empty.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
hzrd149andClaude Opus 4.7 committed 2026-05-15 13:43:34 -05:00
1 parent 21e4da5fbe
commit 23a6eeec9b
1 file changed
+28 -24
+28 -24
View File
@@ -638,31 +638,22 @@ export function DeploySteps({ projectId, projectName, onClose }: DeployStepsProp
const serverCount = nsiteVfsConfig.servers?.length ?? 0;
return (
<div className="space-y-3">
<div className="rounded-md border bg-muted/30 p-3 space-y-2 text-sm">
{nsiteVfsConfig.title && (
<div className="flex justify-between">
<span className="text-muted-foreground">Title</span>
<span className="font-medium">{nsiteVfsConfig.title}</span>
</div>
)}
<div className="rounded-md border bg-muted/30 p-3 space-y-2 text-sm">
{nsiteVfsConfig.title && (
<div className="flex justify-between">
<span className="text-muted-foreground">Title</span>
<span className="font-medium">{nsiteVfsConfig.title}</span>
</div>
)}
<div className="flex justify-between">
<span className="text-muted-foreground">Relays</span>
<span className="font-medium">{relayCount} configured</span>
</div>
<div className="flex justify-between">
<span className="text-muted-foreground">Blossom servers</span>
<span className="font-medium">{serverCount} configured</span>
</div>
<div className="flex justify-between">
<span className="text-muted-foreground">Relays</span>
<span className="font-medium">{relayCount} configured</span>
</div>
<div className="flex justify-between">
<span className="text-muted-foreground">Blossom servers</span>
<span className="font-medium">{serverCount} configured</span>
</div>
<button
type="button"
className="text-xs text-muted-foreground underline hover:text-foreground transition-colors"
onClick={() => setNsiteSettingsOpen(true)}
>
Edit site settings
</button>
</div>
);
}
@@ -970,6 +961,19 @@ export function DeploySteps({ projectId, projectName, onClose }: DeployStepsProp
{selectedProvider && (
<div className="flex gap-2">
{selectedProvider.type === 'nsite' && nsiteVfsConfig && (
<Button
type="button"
variant="outline"
size="icon"
onClick={() => setNsiteSettingsOpen(true)}
title="Site settings"
aria-label="Site settings"
>
<Settings className="h-4 w-4" />
</Button>
)}
<Button
onClick={handleDeploy}
disabled={
@@ -999,7 +1003,7 @@ export function DeploySteps({ projectId, projectName, onClose }: DeployStepsProp
)}
</Button>
{selectedProvider.type === 'nsite' && nsiteVfsConfig && user && (
{selectedProvider.type === 'nsite' && nsiteVfsConfig?.publishSnapshotOnDeploy && user && (
<Button
type="button"
variant="outline"