feat(networks): add delete confirmation modal with host count warning

Show a modal before deleting a network. If the network has hosts,
display a warning with the exact count since they will be cascade-deleted.
Host count comes from the existing NetworkWithCounts data (no extra query).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-16 01:28:12 +02:00
parent 30dd1ad0b0
commit 55d8ed9f72
3 changed files with 92 additions and 5 deletions

View File

@@ -924,6 +924,23 @@ td.col-actions {
background: var(--bg-hover);
}
.modal__body {
margin-bottom: var(--size-lg);
}
.modal__body p {
margin: 0 0 var(--size-sm);
}
.warning {
color: var(--color-warning, #b45309);
background: var(--color-warning-bg, #fef3c7);
border: 1px solid var(--color-warning-border, #fcd34d);
border-radius: var(--radius-sm);
padding: var(--size-sm) var(--size-md);
font-size: var(--font-sm);
}
/* Form fields inside modal — single column stack */
.modal .add-form__fields {
display: flex;