Skip to content

Commit 6deeab9

Browse files
feat: Disable update button when container is stopped
- Add disabled condition to update button in table view - Add disabled condition to update button in mobile card view - Prevents users from updating stopped containers - Uses containerStatus to determine if button should be disabled - Improves UX by preventing invalid operations on stopped containers
1 parent 5497e66 commit 6deeab9

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/app/_components/InstalledScriptsTab.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,6 +1174,7 @@ export function InstalledScriptsTab() {
11741174
onClick={() => handleUpdateScript(script)}
11751175
variant="update"
11761176
size="sm"
1177+
disabled={containerStatuses.get(script.id) === 'stopped'}
11771178
>
11781179
Update
11791180
</Button>

src/app/_components/ScriptInstallationCard.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ export function ScriptInstallationCard({
198198
variant="update"
199199
size="sm"
200200
className="flex-1 min-w-0"
201+
disabled={containerStatus === 'stopped'}
201202
>
202203
Update
203204
</Button>

0 commit comments

Comments
 (0)