feat(ui): add dispose instance and rehydrate

Adds a dispose instance action to the instance info view, POSTing to /instance/dispose and rehydrating per-instance stores; also handles server.instance.disposed events and adds danger button styling.
This commit is contained in:
Shantur Rathore
2026-02-18 01:07:52 +00:00
parent 4eaa711f01
commit 859312ba3b
14 changed files with 296 additions and 12 deletions

View File

@@ -54,3 +54,28 @@ button.button-tertiary:hover:not(:disabled) {
button.button-tertiary:focus-visible {
box-shadow: 0 0 0 2px var(--focus-ring-offset), 0 0 0 4px var(--focus-ring-color);
}
.button-danger,
button.button-danger {
@apply px-6 py-3 text-base rounded-lg;
background-color: var(--button-danger-bg);
color: var(--button-danger-text);
border-color: var(--button-danger-bg);
}
.button-danger:hover:not(:disabled),
button.button-danger:hover:not(:disabled) {
background-color: var(--button-danger-hover-bg);
border-color: var(--button-danger-hover-bg);
}
.button-danger:focus-visible,
button.button-danger:focus-visible {
box-shadow: 0 0 0 2px var(--focus-ring-offset), 0 0 0 4px var(--focus-ring-color);
}
/* Smaller sizing variant for destructive actions in tight spaces. */
.button-danger.button-small,
button.button-danger.button-small {
@apply px-4 py-2 text-sm;
}

View File

@@ -64,6 +64,8 @@
button.button-primary,
.button-secondary,
button.button-secondary,
.button-danger,
button.button-danger,
.button-tertiary,
button.button-tertiary) {
@apply inline-flex items-center justify-center gap-2 font-medium transition-colors rounded-md;
@@ -74,6 +76,8 @@
button.button-primary,
.button-secondary,
button.button-secondary,
.button-danger,
button.button-danger,
.button-tertiary,
button.button-tertiary):focus-visible {
outline: none;
@@ -84,6 +88,8 @@
button.button-primary,
.button-secondary,
button.button-secondary,
.button-danger,
button.button-danger,
.button-tertiary,
button.button-tertiary):disabled {
@apply cursor-not-allowed opacity-50;