CSS Margin / Field Wipe on Toggle

Fix DNS card spacing and preserve DNS input values on toggle

- Added margin-top and margin-bottom to #stat-dns-label.visible for consistent spacing.
- Removed input value clearing from on_dns_toggle to keep DNS fields populated when toggling off and on.
This commit is contained in:
2026-03-30 11:53:26 -04:00
parent a7e0de76fb
commit cfc1f95505
+1 -3
View File
@@ -677,7 +677,7 @@ class UplinkManagerApp(App):
.stat-box:last-of-type { margin-right: 0; }
#stat-dns-label { margin-top: 1; color: transparent; }
#stat-dns-label.visible { color: $text-muted; text-style: bold; }
#stat-dns-label.visible { color: $text-muted; text-style: bold; margin-top: 1; margin-bottom: 1; }
.stat-dns-ip { color: transparent; text-style: bold; height: 1; }
.stat-dns-ip.visible { color: #fabd2f; }
@@ -1227,8 +1227,6 @@ class UplinkManagerApp(App):
dns_fields.add_class("visible")
else:
dns_fields.remove_class("visible")
self.query_one("#inp-dns-primary", Input).value = ""
self.query_one("#inp-dns-secondary", Input).value = ""
@on(Input.Changed, "#inp-dns-primary")
def validate_dns_primary_live(self, event: Input.Changed):