Files
dnsmasq-webui/src/DnsmasqWebUI/Components/Modals/SettingsModal.razor.css
T
alex cefc488712 Refactor client settings fields, fix logs overwrite, improve settings modal
- Replace FieldBounds with generic ClientSettingsField<T> abstraction
- Add IClientSettingsField, ClientSettingsMinMaxField, ClientSettingsBoolField
- Put abstractions in Models/Client/Abstractions namespace
- Fields hold values; CoerceValue for clamping on set
- ClientSettingsService hydrates fields on load; ToDto for save
- Settings modal binds directly to field values, collapsible only for All context
- Add LogsPreView with ShouldRender freeze to prevent Blazor overwriting JS-owned logs DOM
- Add left margin to static group heading in single-section mode
2026-02-11 08:28:44 +10:00

117 lines
2.3 KiB
CSS

.settings-modal-dialog::backdrop {
background: rgba(0, 0, 0, 0.5);
}
.settings-modal-dialog .modal-content {
max-width: 28rem;
margin: auto;
}
.settings-modal-dialog {
border: none;
border-radius: 0.375rem;
padding: 0;
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}
.settings-modal-dialog .modal-header {
padding: 1rem 1.25rem;
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}
.settings-modal-dialog .modal-title {
margin: 0;
font-size: 1.25rem;
}
.settings-modal-dialog .modal-body {
padding: 1.25rem;
}
.settings-modal-dialog .modal-footer {
padding: 1rem 1.25rem;
border-top: 1px solid rgba(0, 0, 0, 0.125);
gap: 0.5rem;
}
/* Collapsible section groups */
.settings-group {
border: 1px solid rgba(0, 0, 0, 0.1);
border-radius: 0.375rem;
margin-bottom: 0.5rem;
overflow: hidden;
}
.settings-group:last-child {
margin-bottom: 0;
}
.settings-group-header {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 0.625rem 0.75rem;
font-size: 0.9375rem;
font-weight: 500;
color: #212529;
background: rgba(0, 0, 0, 0.03);
border: none;
cursor: pointer;
text-align: left;
transition: background-color 0.15s ease;
}
.settings-group-header:hover {
background: rgba(0, 0, 0, 0.06);
}
.settings-group-header.expanded {
background: rgba(0, 0, 0, 0.05);
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.settings-group-chevron {
flex-shrink: 0;
width: 0.75rem;
height: 0.75rem;
margin-left: 0.5rem;
border-right: 2px solid #6c757d;
border-bottom: 2px solid #6c757d;
transform: rotate(-45deg);
transition: transform 0.2s ease;
}
.settings-group-header.expanded .settings-group-chevron {
transform: rotate(135deg);
}
.settings-group-title-static {
margin-left: 0.75rem;
}
.settings-group-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.25s ease-out;
}
.settings-group-content.expanded {
max-height: 500px;
transition: max-height 0.35s ease-in;
}
.settings-group-content > * {
padding: 1rem 0.75rem;
}
.settings-section {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.settings-section + .settings-section {
border-top: 1px solid rgba(0, 0, 0, 0.06);
}