diff --git a/AGENTS.md b/AGENTS.md index 519b58c..143dd40 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # RustProxy source and documentation maintenance -Current source version: **0.38.3**. The Cargo package and binary are named `rust-proxy`. +Current source version: **0.38.4**. The Cargo package and binary are named `rust-proxy`. Before editing, read [README.md](README.md), the relevant [documentation guide](docs/README.md) and the actual code and tests. Historical release experiments are not current specifications. Use the bundled `src/admin/openapi.json` for API routes and payloads; the source implementation is authoritative for runtime behavior. diff --git a/CHANGELOG.md b/CHANGELOG.md index ea323cf..256b920 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ Release history focused on **features, settings, default behavior, compatibility and fixes**. Changes to internal code structure and preliminary performance experiments are intentionally omitted. Historical descriptions reflect their respective releases; consult the current documentation for the settings available in the latest release. +## 0.38.4 — on/off switches in the panel + +- **Switches for on/off settings:** a setting that turns a feature or a whole section on or off is now a switch instead of a checkbox, with the same rule in every editor: **Enabled** of vhosts, backends, locations, streams, listeners, redirect and 404 hosts, cache rules and PHP profiles; per-host features (WebSockets, Force HTTPS, www redirect, HTTP/2, HTTP/3, keep-alive, client IP forwarding, Cloudflare client IP, diagnostic headers, passive health checks, Content-Type denylist, rate limit, HSTS, User-Agent blocking, cache, transformations, compression, PQC key exchange) in the vhost and Docker app editors alike; the "custom"/"inherit" overrides; and global features (ACL countries, cache and its subsystems, Varnish-compatible policy, Via header, transformations, logging outputs and captured fields, GeoIP, Prometheus, alerts, trusted X-Forwarded-Proto, admin TLS, Web Server directory listing, .htaccess, precompressed files, PHP and hardening, default certificate), plus live refresh, appearance and layout preferences. +- **Checkboxes stay where they fit:** choices from a set (TLS versions, compression algorithms, cache headers, cache stale-if-error and COLD triggers, passive health error types, metric groups, alert types, transformation types, precompressed formats), row and column selection, cache-rule modifiers and risk confirmations (terms of service, production issuance, private or local destinations, certificate mismatch). Every other standalone on/off setting, including options inside a section (for example HSTS includeSubDomains/preload, legacy WebSocket support, retry conditions, preserve Host, backend TLS verification, backup/drain, listener protocols, .htaccess and PHP options), is a switch. +- **Appearance preference:** **Settings → Appearance → Interface → Show on/off settings as switches** (on by default) brings back ordinary checkboxes everywhere when turned off. Preferences API: additive `switch_controls` boolean (default `true`) in `/api/preferences`; no migration is required. +- The Docker **Publish** switch uses the same shared style; switches follow the selected corner style, show a keyboard focus ring and respect reduced motion. Saved configuration and the API are unchanged. + ## 0.38.3 — Docker vhosts ready for production - **Security and access for Docker apps:** the per-service editor has a new **Security and access** section with HTTP method policy, per-client IP rate limit, country access, security headers (HSTS, nosniff, X-Frame-Options, Referrer-Policy) and the verified Cloudflare client IP, the same engine as ordinary vhosts. Unused options are not stored, existing assignments are unchanged. diff --git a/Cargo.lock b/Cargo.lock index 7a01e0c..d78da6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1943,7 +1943,7 @@ dependencies = [ [[package]] name = "rust-proxy" -version = "0.38.3" +version = "0.38.4" dependencies = [ "anyhow", "arc-swap", diff --git a/Cargo.toml b/Cargo.toml index 534093a..c4db0a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust-proxy" -version = "0.38.3" +version = "0.38.4" edition = "2021" rust-version = "1.99.1" description = "RustProxy - independent reverse proxy with local administration" diff --git a/docker-agent/model.go b/docker-agent/model.go index 56157de..5152c17 100644 --- a/docker-agent/model.go +++ b/docker-agent/model.go @@ -1,6 +1,6 @@ package main -var version = "0.38.3" // overridden by the package builder using -ldflags -X main.version +var version = "0.38.4" // overridden by the package builder using -ldflags -X main.version type config struct { Listen string diff --git a/docs/API.md b/docs/API.md index 2b62ffa..9fb45b2 100644 --- a/docs/API.md +++ b/docs/API.md @@ -31,7 +31,7 @@ The current bundled `src/admin/openapi.json` declares these operations (among ot | `GET /api/certificates` · `POST /api/certificates/upload` | Certificate inventory/import. | | `POST /api/certificates/inspect` | Read DNS SAN coverage from a managed/external public PEM path for the editor; admin browser session only. | | `GET /api/acme` · `POST /api/acme/issue` · `POST /api/acme/renew` | Managed certificate jobs. | -| `GET/PUT /api/preferences` | Personal UI settings, including theme/layout, optional `interface_icons` and `logo_animation` (both default `false`), and `stable_dialog_position` (default `true`). | +| `GET/PUT /api/preferences` | Personal UI settings, including theme/layout, optional `interface_icons` and `logo_animation` (both default `false`), `stable_dialog_position` and `switch_controls` (both default `true`). | | `GET /api/dashboard-presets` and named preset operations | Saved Overview presets. | | `GET /docs/openapi.json` | Protected machine-readable API specification. | diff --git a/docs/DASHBOARD.md b/docs/DASHBOARD.md index f295ce6..3f2c8f6 100644 --- a/docs/DASHBOARD.md +++ b/docs/DASHBOARD.md @@ -98,6 +98,10 @@ The **Corner style** setting (Original, Square, Subtle, Rounded, Extra) also app Under **Settings → Appearance → Interface**, **Keep dialogs at a stable top position** is **on by default**. It anchors primary panel dialogs near the top of the viewport, so switching between editor tabs whose contents have different heights does not make the dialog jump vertically. The account preference is `stable_dialog_position: true|false` in `/api/preferences`; turning it off restores the browser's vertically centered dialog behavior. The setting changes only panel presentation and does not affect proxy configuration or editor data. +### Switches for on/off settings + +Under **Settings → Appearance → Interface**, **Show on/off settings as switches** is **on by default**. Settings that turn a feature or a whole section on or off (for example a vhost's **Enabled**, HSTS, rate limit, cache, Prometheus or alerts) are drawn as switches. Every standalone on/off setting, including options inside a section, is a switch. Choices from a set (TLS versions, compression algorithms, alert types, metric groups), row and column selection, cache-rule modifiers and risk confirmations stay checkboxes. Turning the preference off draws every control as an ordinary checkbox. The account preference is `switch_controls: true|false` in `/api/preferences`; it changes only panel presentation. + ## Editing configuration safely 1. Open the relevant workspace and inspect existing state before editing. diff --git a/docs/HEADLESS.md b/docs/HEADLESS.md index fa47330..84032ad 100644 --- a/docs/HEADLESS.md +++ b/docs/HEADLESS.md @@ -196,7 +196,7 @@ In a container, mount the file read-only (RustProxy never writes it) and keep `/ `GET /healthz` on `--health-listen` answers `200` while every vhost with backends has at least one healthy backend and `503` otherwise: ```json -{"status":"ok","mode":"headless","version":"0.38.3","revision":4,"uptime_seconds":120, +{"status":"ok","mode":"headless","version":"0.38.4","revision":4,"uptime_seconds":120, "last_reload":{"ok":true,"at_unix":1794743660,"error":null}, "vhosts_without_healthy_backends":[], "pools":[{"vhost":"app","healthy":3,"backends":3}]} diff --git a/integrations/routeros-oci-build/README.md b/integrations/routeros-oci-build/README.md index 0720b82..2fa64a3 100644 --- a/integrations/routeros-oci-build/README.md +++ b/integrations/routeros-oci-build/README.md @@ -77,10 +77,10 @@ ENV_FILE=integrations/routeros-oci-build/.env \ bash integrations/routeros-oci-build/build-routeros-oci.sh push ``` -For example, with RustProxy version `0.38.3` and the defaults this publishes: +For example, with RustProxy version `0.38.4` and the defaults this publishes: ```text -oci.example.net/network/rustproxy:0.38.3 +oci.example.net/network/rustproxy:0.38.4 oci.example.net/network/rustproxy:latest oci.example.net/network/rustproxy:routeros ``` diff --git a/langs/en_US.json b/langs/en_US.json index 294fe35..7d0b266 100644 --- a/langs/en_US.json +++ b/langs/en_US.json @@ -2523,6 +2523,8 @@ "logoAnimationHelp": "Plays short, subtle animations of the sidebar logo from time to time and on hover.", "stableDialogPosition": "Keep dialogs at a stable top position", "stableDialogPositionHelp": "Keeps editor dialogs anchored near the top of the viewport so switching between tabs with different content heights does not move the dialog.", + "switchControls": "Show on/off settings as switches", + "switchControlsHelp": "Draws settings that turn a feature or section on or off as switches instead of checkboxes. Option lists keep checkboxes.", "entityEnableHint": "Controls whether this item is active.", "setupCommandExample": "Standard service installation example:", "certificateRuntimeTitle": "ACME runtime", diff --git a/langs/pl_pl.json b/langs/pl_pl.json index 723a3b4..5b189ea 100644 --- a/langs/pl_pl.json +++ b/langs/pl_pl.json @@ -2523,6 +2523,8 @@ "logoAnimationHelp": "Od czasu do czasu (i po najechaniu kursorem) odtwarza krótkie, subtelne animacje logo w panelu bocznym.", "stableDialogPosition": "Stabilna pozycja okien dialogowych", "stableDialogPositionHelp": "Utrzymuje edytory blisko górnej krawędzi widoku, dzięki czemu przełączanie między kartami o różnej wysokości nie przesuwa okna.", + "switchControls": "Przełączniki zamiast pól wyboru", + "switchControlsHelp": "Ustawienia włączające lub wyłączające funkcję albo sekcję są pokazywane jako przełączniki zamiast pól wyboru. Listy opcji zostają polami wyboru.", "entityEnableHint": "Określa, czy ten element jest aktywny.", "setupCommandExample": "Przykład dla standardowej instalacji usługi:", "certificateRuntimeTitle": "Środowisko ACME", diff --git a/src/admin/openapi.json b/src/admin/openapi.json index 389343f..845ef94 100644 --- a/src/admin/openapi.json +++ b/src/admin/openapi.json @@ -2,7 +2,7 @@ "openapi": "3.0.3", "info": { "title": "RustProxy Administration API", - "version": "0.38.3", + "version": "0.38.4", "description": "Administration API for the active panel origin. Sign in through the panel; the same-origin HttpOnly cookie authenticates all private operations. Mutations also require the exact Origin, X-RustProxy-Request: 1 and a session-bound X-CSRF-Token. Loopback HTTP is the default; Settings can enable HTTPS before using a non-loopback administration bind. This document contains no live configuration or credentials. Object schemas marked extensible are summaries: full configuration validation is authoritative in Rust. The API also permits explicitly scoped GeneralApiBearer tokens on a narrow route allowlist, with RO/RW and source CIDR checks; API-token management and Prometheus-token management are browser-session-only." }, "servers": [ @@ -4174,6 +4174,11 @@ "default": true, "description": "Account-scoped administration UI preference. When enabled, primary panel dialogs stay anchored near the top of the viewport instead of being vertically re-centered when their content height changes." }, + "switch_controls": { + "type": "boolean", + "default": true, + "description": "Since 0.38.4. Account-scoped administration UI preference. When enabled, settings that turn a feature or section on or off are drawn as switches; when disabled they are drawn as ordinary checkboxes. Presentation only; does not change the stored configuration." + }, "button_style": { "type": "string", "enum": [ diff --git a/src/admin/preferences.rs b/src/admin/preferences.rs index e23221f..10c53d6 100644 --- a/src/admin/preferences.rs +++ b/src/admin/preferences.rs @@ -24,6 +24,9 @@ fn default_admin_corner_style() -> String { fn default_admin_stable_dialog_position() -> bool { true } +fn default_admin_switch_controls() -> bool { + true +} fn default_admin_table_density() -> String { "normal".to_owned() } @@ -160,6 +163,8 @@ struct AdminPreferences { logo_animation: bool, #[serde(default = "default_admin_stable_dialog_position")] stable_dialog_position: bool, + #[serde(default = "default_admin_switch_controls")] + switch_controls: bool, #[serde(default = "default_admin_button_style")] button_style: String, #[serde(default = "default_admin_corner_style")] @@ -235,6 +240,7 @@ impl Default for AdminPreferences { interface_icons: false, logo_animation: false, stable_dialog_position: default_admin_stable_dialog_position(), + switch_controls: default_admin_switch_controls(), button_style: default_admin_button_style(), corner_style: default_admin_corner_style(), table_density: default_admin_table_density(), diff --git a/src/admin/preferences_tests.rs b/src/admin/preferences_tests.rs index b568797..6737ca5 100644 --- a/src/admin/preferences_tests.rs +++ b/src/admin/preferences_tests.rs @@ -48,6 +48,21 @@ fn overview_factory_preset_matches_registry_and_operator_visibility() { assert!(!AdminPreferences::default().interface_icons); assert!(!AdminPreferences::default().logo_animation); assert!(AdminPreferences::default().stable_dialog_position); + assert!(AdminPreferences::default().switch_controls); +} + +#[test] +fn switch_controls_default_on_for_new_and_legacy_documents() { + assert!(AdminPreferences::default().switch_controls); + let legacy: AdminPreferences = serde_json::from_str(r#"{"theme":"light"}"#).unwrap(); + assert!(legacy.switch_controls); + let mut disabled = legacy.clone(); + disabled.switch_controls = false; + assert!(validate_admin_preferences(&disabled).is_ok()); + let stored = serde_json::to_string(&disabled).unwrap(); + assert!(stored.contains("\"switch_controls\":false")); + let recovered: AdminPreferences = serde_json::from_str(&stored).unwrap(); + assert!(!recovered.switch_controls); } #[test] diff --git a/src/admin/tests.rs b/src/admin/tests.rs index 6e425f8..cae50b5 100644 --- a/src/admin/tests.rs +++ b/src/admin/tests.rs @@ -2177,6 +2177,7 @@ mod tests { assert_eq!(initial["interface_icons"], false); assert_eq!(initial["logo_animation"], false); assert_eq!(initial["stable_dialog_position"], true); + assert_eq!(initial["switch_controls"], true); assert_eq!(initial["button_style"], "normal"); assert_eq!(initial["corner_style"], "default"); assert_eq!( @@ -2227,6 +2228,7 @@ mod tests { assert_eq!(legacy["interface_icons"], false); assert_eq!(legacy["logo_animation"], false); assert_eq!(legacy["stable_dialog_position"], true); + assert_eq!(legacy["switch_controls"], true); assert_eq!(legacy["button_style"], "normal"); assert_eq!(legacy["corner_style"], "default"); assert_eq!( @@ -2252,6 +2254,7 @@ mod tests { "interface_icons":true, "logo_animation":true, "stable_dialog_position":false, + "switch_controls":false, "button_style":"compact", "corner_style":"rounded", "table_density":"ultra", diff --git a/src/admin/web/app/preferences.js b/src/admin/web/app/preferences.js index 00cec4e..f2082a4 100644 --- a/src/admin/web/app/preferences.js +++ b/src/admin/web/app/preferences.js @@ -13,7 +13,7 @@ const ADMIN_DEFAULT_HIDDEN_WIDGETS = Object.freeze([...new Set([ ])]); const ADMIN_APPEARANCE_DEFAULTS = Object.freeze({ theme: "dark", language: "auto", ui_scale: 100, time_format: "24h", chart_style: "default", - chart_axes: false, interface_icons: false, logo_animation: false, stable_dialog_position: true, + chart_axes: false, interface_icons: false, logo_animation: false, stable_dialog_position: true, switch_controls: true, button_style: "normal", corner_style: "default", table_density: "normal", dashboard_density: ADMIN_DASHBOARD_DEFAULTS.dashboard_density, dashboard_widgets: [...ADMIN_DASHBOARD_WIDGETS], dashboard_hidden_widgets: [...ADMIN_DEFAULT_HIDDEN_WIDGETS], dashboard_widget_sizes: null, dashboard_widget_heights: null, dashboard_widget_positions: null, dashboard_auto_fit: true, sidebar_collapsed: false, }); const CHART_STYLE_KEYS = Object.freeze({ default: "chartStyleDefault", soft: "chartStyleSoft", technical: "chartStyleTechnical", high_contrast: "chartStyleHighContrast", neon: "chartStyleNeon", monochrome: "chartStyleMonochrome", warm: "chartStyleWarm", cool: "chartStyleCool", sunset: "chartStyleSunset", aurora: "chartStyleAurora", ocean: "chartStyleOcean", forest: "chartStyleForest", pastel: "chartStylePastel", terminal: "chartStyleTerminal", blueprint: "chartStyleBlueprint", colorblind: "chartStyleColorblind" }); @@ -152,6 +152,12 @@ function applyAdminStableDialogPosition(value) { const input = $("ui-stable-dialog-position"); if (input) input.checked = enabled; return enabled; } +function applyAdminSwitchControls(value) { + const enabled = value !== false; + document.documentElement.dataset.switchControls = String(enabled); + const input = $("ui-switch-controls"); if (input) input.checked = enabled; + return enabled; +} function applyAdminButtonStyle(value) { const style = normalizeAdminButtonStyle(value); document.documentElement.dataset.buttonStyle = style; const select = $("ui-button-style"); if (select) select.value = style; return style; @@ -331,7 +337,7 @@ function applyAdminPreferences(value, cache = true) { ...value, refresh: normalizeRefreshPreferences(value.refresh), theme: applyAdminTheme(value.theme, cache), language: applyAdminLanguage(value.language, cache, false), ui_scale: applyAdminUiScale(value.ui_scale, cache), - time_format: applyAdminTimeFormat(value.time_format), chart_style: applyAdminChartStyle(value.chart_style), chart_axes: applyAdminChartAxes(value.chart_axes), interface_icons: applyAdminInterfaceIcons(value.interface_icons), logo_animation: applyAdminLogoAnimation(value.logo_animation), stable_dialog_position: applyAdminStableDialogPosition(value.stable_dialog_position), button_style: applyAdminButtonStyle(value.button_style), corner_style: applyAdminCornerStyle(value.corner_style, cache), table_density: applyAdminTableDensity(value.table_density), + time_format: applyAdminTimeFormat(value.time_format), chart_style: applyAdminChartStyle(value.chart_style), chart_axes: applyAdminChartAxes(value.chart_axes), interface_icons: applyAdminInterfaceIcons(value.interface_icons), logo_animation: applyAdminLogoAnimation(value.logo_animation), stable_dialog_position: applyAdminStableDialogPosition(value.stable_dialog_position), switch_controls: applyAdminSwitchControls(value.switch_controls), button_style: applyAdminButtonStyle(value.button_style), corner_style: applyAdminCornerStyle(value.corner_style, cache), table_density: applyAdminTableDensity(value.table_density), dashboard_density: applyAdminDashboardDensity(value.dashboard_density), dashboard_widgets: savedOrder, dashboard_hidden_widgets: savedHidden, dashboard_widget_sizes: savedSizes, dashboard_widget_heights: savedHeights, dashboard_widget_positions: savedPositions, dashboard_auto_fit: savedAutoFit, }; adminPreferences = normalized; @@ -383,7 +389,7 @@ function updateAdminPreferences(patch) { const next = { ...current, ...patch }; next.refresh = normalizeRefreshPreferences(next.refresh); next.theme = normalizeAdminTheme(next.theme); next.language = normalizeAdminLanguage(next.language); next.ui_scale = normalizeAdminUiScale(next.ui_scale); - next.time_format = normalizeAdminTimeFormat(next.time_format); next.chart_style = normalizeAdminChartStyle(next.chart_style); next.chart_axes = next.chart_axes === true; next.interface_icons = next.interface_icons === true; next.logo_animation = next.logo_animation === true; next.stable_dialog_position = next.stable_dialog_position !== false; next.button_style = normalizeAdminButtonStyle(next.button_style); next.corner_style = normalizeAdminCornerStyle(next.corner_style); next.table_density = normalizeAdminDensity(next.table_density); + next.time_format = normalizeAdminTimeFormat(next.time_format); next.chart_style = normalizeAdminChartStyle(next.chart_style); next.chart_axes = next.chart_axes === true; next.interface_icons = next.interface_icons === true; next.logo_animation = next.logo_animation === true; next.stable_dialog_position = next.stable_dialog_position !== false; next.switch_controls = next.switch_controls !== false; next.button_style = normalizeAdminButtonStyle(next.button_style); next.corner_style = normalizeAdminCornerStyle(next.corner_style); next.table_density = normalizeAdminDensity(next.table_density); next.dashboard_density = normalizeAdminDensity(next.dashboard_density, "compact"); next.dashboard_widgets = normalizeDashboardWidgets(next.dashboard_widgets); next.dashboard_hidden_widgets = normalizeHiddenDashboardWidgets(next.dashboard_hidden_widgets); next.dashboard_widget_sizes = normalizeDashboardWidgetSizes(next.dashboard_widget_sizes); next.dashboard_widget_heights = normalizeDashboardWidgetHeights(next.dashboard_widget_heights); next.dashboard_widget_positions = normalizeDashboardWidgetPositions(next.dashboard_widget_positions); next.dashboard_auto_fit = next.dashboard_auto_fit !== false; next.sidebar_collapsed = next.sidebar_collapsed === true; const saved = await api("/api/preferences", { method: "PUT", body: JSON.stringify(next) }); if (!authenticated || epoch !== authEpoch) return adminPreferences; @@ -491,6 +497,14 @@ $("ui-stable-dialog-position")?.addEventListener("change", () => { applyAdminStableDialogPosition(previous); }); }); +$("ui-switch-controls")?.addEventListener("change", () => { + const control = $("ui-switch-controls"), previous = adminPreferences?.switch_controls !== false, next = control.checked; + applyAdminSwitchControls(next); if (adminPreferences) adminPreferences.switch_controls = next; + void saveAppearancePreference({ switch_controls: next }, control, () => { + if (adminPreferences) adminPreferences.switch_controls = previous; + applyAdminSwitchControls(previous); + }); +}); $("ui-button-style")?.addEventListener("change", () => { const control = $("ui-button-style"), previous = adminPreferences?.button_style || "normal", next = normalizeAdminButtonStyle(control.value); applyAdminButtonStyle(next); if (adminPreferences) adminPreferences.button_style = next; void saveAppearancePreference({ button_style: next }, control, () => { if (adminPreferences) adminPreferences.button_style = previous; applyAdminButtonStyle(previous); }); @@ -522,7 +536,7 @@ async function resetAppearancePatch(patch, control, messageKey = "appearanceSect } document.querySelectorAll("[data-appearance-reset]").forEach(control => control.addEventListener("click", () => { const patches = { - interface: { theme: "dark", language: "auto", ui_scale: 100, time_format: "24h", interface_icons: false, logo_animation: false, stable_dialog_position: true, button_style: "normal", corner_style: "default" }, charts: { chart_style: "default", chart_axes: false }, tables: { table_density: "normal" }, + interface: { theme: "dark", language: "auto", ui_scale: 100, time_format: "24h", interface_icons: false, logo_animation: false, stable_dialog_position: true, switch_controls: true, button_style: "normal", corner_style: "default" }, charts: { chart_style: "default", chart_axes: false }, tables: { table_density: "normal" }, dashboard: { dashboard_density: ADMIN_DASHBOARD_DEFAULTS.dashboard_density, dashboard_widgets: [...ADMIN_DASHBOARD_WIDGETS], dashboard_hidden_widgets: [...ADMIN_APPEARANCE_DEFAULTS.dashboard_hidden_widgets], dashboard_widget_sizes: null, dashboard_widget_heights: null, dashboard_auto_fit: true }, }; void resetAppearancePatch(patches[control.dataset.appearanceReset] || {}, control); diff --git a/src/admin/web/cache-rules.js b/src/admin/web/cache-rules.js index 177f926..283475a 100644 --- a/src/admin/web/cache-rules.js +++ b/src/admin/web/cache-rules.js @@ -228,7 +228,7 @@ window.rustProxyCacheRules = (() => { const exportButton = el("button", t("cacheRulesExportVcl"), "outline"); exportButton.type = "button"; const addButton = el("button", t("cacheRulesAdd"), "primary"); addButton.type = "button"; toolbar.append(templates, importButton, exportButton, addButton); - const ignoreWrap = el("label", undefined, "check cache-rules-ignore"), ignoreBox = el("input"); ignoreBox.type = "checkbox"; ignoreBox.checked = ignoreGlobal; if (options.ignoreId !== "") ignoreBox.id = options.ignoreId || "vh-cache-ignore-global-rules"; + const ignoreWrap = el("label", undefined, "check cache-rules-ignore"), ignoreBox = el("input", undefined, "switch"); ignoreBox.type = "checkbox"; ignoreBox.checked = ignoreGlobal; if (options.ignoreId !== "") ignoreBox.id = options.ignoreId || "vh-cache-ignore-global-rules"; ignoreWrap.append(ignoreBox, el("span", t("cacheRulesIgnoreGlobal"))); const notices = el("div", undefined, "cache-rules-notices"); const list = el("div", undefined, "cache-rules-list"); @@ -284,7 +284,7 @@ window.rustProxyCacheRules = (() => { card.addEventListener("drop", event => { event.preventDefault(); card.classList.remove("is-drop"); const from = Number(event.dataTransfer.getData("text/plain")); if (Number.isInteger(from) && from !== index) move(from, index); }); const head = el("div", undefined, "cache-rule-head"); const grip = el("span", "⠿", "cache-rule-grip"); grip.title = t("cacheRulesDrag"); - const toggle = el("input"); toggle.type = "checkbox"; toggle.checked = rule.enabled; toggle.setAttribute("aria-label", t("enabled")); + const toggle = el("input", undefined, "switch"); toggle.type = "checkbox"; toggle.checked = rule.enabled; toggle.setAttribute("aria-label", t("enabled")); toggle.addEventListener("change", () => { rule.enabled = toggle.checked; card.classList.toggle("is-disabled", !rule.enabled); exportPre.textContent = exportVcl(rules); changed(); }); const title = el("button", undefined, "cache-rule-title"); title.type = "button"; title.dataset.uiIconName = "none"; title.append(el("b", rule.name || rule.id), el("span", t(STAGE_KEYS[rule.stage]), "pill cache-rule-stage"), el("span", summary(rule), "fine cache-rule-summary")); diff --git a/src/admin/web/css/10-base.css b/src/admin/web/css/10-base.css index 1b8b320..275776b 100644 --- a/src/admin/web/css/10-base.css +++ b/src/admin/web/css/10-base.css @@ -1146,6 +1146,65 @@ html[data-dashboard-density=compact] #panel-overview .dashboard-overview-grid>.c transform: translateY(-1px); } +/* On/off switch: an ordinary checkbox with class "switch". Used for settings + that turn a feature or section on; option lists, row selection and risk + confirmations stay plain checkboxes. The account preference + switch_controls=false (html[data-switch-controls="false"]) keeps the plain + checkbox look. */ +html:not([data-switch-controls="false"]) input[type=checkbox].switch { + --rp-switch-h: calc(var(--ui-check-size) + 1px); + --rp-switch-w: calc(var(--rp-switch-h) * 1.875); + --rp-switch-knob: calc(var(--rp-switch-h) - 6px); + -webkit-appearance: none; + appearance: none; + position: relative; + flex: 0 0 var(--rp-switch-w); + width: var(--rp-switch-w); + min-width: var(--rp-switch-w); + height: var(--rp-switch-h); + min-height: var(--rp-switch-h); + margin: 0; + padding: 0; + border: 1px solid var(--field-line); + border-radius: min(var(--rp-switch-h), var(--rp-radius-control, 3px)); + background: var(--field-bg); + cursor: pointer; + vertical-align: middle; + transition: background-color .12s ease, border-color .12s ease; +} + +html:not([data-switch-controls="false"]) input[type=checkbox].switch::before { + content: ""; + position: absolute; + top: 2px; + left: 2px; + width: var(--rp-switch-knob); + height: var(--rp-switch-knob); + border-radius: max(0px, calc(min(var(--rp-switch-h), var(--rp-radius-control, 3px)) - 2px)); + background: var(--muted); + transition: transform .12s ease, background-color .12s ease; +} + +html:not([data-switch-controls="false"]) input[type=checkbox].switch:checked { + border-color: var(--green); + background: var(--nav-selected-bg); +} + +html:not([data-switch-controls="false"]) input[type=checkbox].switch:checked::before { + transform: translateX(calc(var(--rp-switch-w) - var(--rp-switch-knob) - 6px)); + background: var(--green); +} + +html:not([data-switch-controls="false"]) input[type=checkbox].switch:focus-visible { + outline: 2px solid var(--green); + outline-offset: 3px; +} + +html:not([data-switch-controls="false"]) input[type=checkbox].switch:disabled { + opacity: .5; + cursor: not-allowed; +} + .operation-message { margin: 14px 0 0; padding: 11px 12px; diff --git a/src/admin/web/css/50-settings.css b/src/admin/web/css/50-settings.css index e5a587e..085195e 100644 --- a/src/admin/web/css/50-settings.css +++ b/src/admin/web/css/50-settings.css @@ -82,6 +82,7 @@ .appearance-interface-icons-setting, .appearance-logo-animation-setting, .appearance-stable-dialog-position-setting, +.appearance-switch-controls-setting, .appearance-chart-axes-setting { align-self: center; min-width: 0; @@ -90,6 +91,7 @@ .appearance-interface-icons-setting>span, .appearance-logo-animation-setting>span, .appearance-stable-dialog-position-setting>span, +.appearance-switch-controls-setting>span, .appearance-chart-axes-setting>span { display: grid; gap: 4px; @@ -612,52 +614,13 @@ cursor: pointer; } -.docker-publish-field input[type=checkbox].docker-publish { - -webkit-appearance: none; - position: relative; - flex: 0 0 30px; - width: 30px; - height: 16px; - margin: 0; - padding: 0; - border: 1px solid var(--field-line); - border-radius: min(3px, var(--rp-radius-control, 3px)); - background: var(--field-bg); - cursor: pointer; - vertical-align: middle; -} - -.docker-publish-field .docker-publish::before { - content: ""; - position: absolute; - inset: 2px auto 2px 2px; - width: 10px; - background: var(--muted); - border-radius: min(1px, var(--rp-radius-control, 1px)); - transition: transform .12s ease; -} - -.docker-publish-field .docker-publish:checked { - background: var(--field-bg); - border-color: var(--accent); -} - -.docker-publish-field .docker-publish:checked::before { - transform: translateX(14px); - background: var(--accent); -} - -.docker-publish-field .docker-publish:focus-visible { - outline: 2px solid var(--accent); - outline-offset: 3px; -} - .docker-publish-field:has(.docker-publish:disabled) { opacity: .55; cursor: wait; } -.docker-publish-field .docker-publish:disabled { +html:not([data-switch-controls="false"]) .docker-publish-field input.docker-publish:disabled { + opacity: 1; cursor: wait; } diff --git a/src/admin/web/css/70-responsive.css b/src/admin/web/css/70-responsive.css index 260a530..94af231 100644 --- a/src/admin/web/css/70-responsive.css +++ b/src/admin/web/css/70-responsive.css @@ -1558,8 +1558,8 @@ @media (prefers-reduced-motion:reduce) { - .docker-publish-field .docker-publish, - .docker-publish-field .docker-publish::before, + html:not([data-switch-controls="false"]) input[type=checkbox].switch, + html:not([data-switch-controls="false"]) input[type=checkbox].switch::before, #panel-overview .overview-meter-fill, #panel-overview .www-segmented span { transition: none; diff --git a/src/admin/web/docker.js b/src/admin/web/docker.js index f61fb4e..db23fda 100644 --- a/src/admin/web/docker.js +++ b/src/admin/web/docker.js @@ -431,7 +431,7 @@ const value = agent || { id: "", name: "", enabled: true, endpoint: "https://127.0.0.1:9876", token: "", tls_fingerprint_sha256: null, domains: [], poll_interval_seconds: 30, certificate_ids: [], acl_profile_id: null, default_target_ip: null, listener_ids: [firstListener()], assignments: [] }; const row = el("div", undefined, "docker-agent-settings entity"); row.dataset.originalId = agent?.id || ""; row._assignments = structuredClone(value.assignments || []); const head = el("div", undefined, "card-heading"), title = el("div"), titleText = el("h3", value.name || value.id || t("dockerAgentNew")); title.append(el("span", t("dockerAgent"), "small-label"), titleText); - const enabled = input("", "checkbox", "docker-agent-enabled"); enabled.checked = value.enabled !== false; + const enabled = input("", "checkbox", "docker-agent-enabled switch"); enabled.checked = value.enabled !== false; const enabledLabel = el("label", undefined, "check"); enabledLabel.append(enabled, el("span", t("enabled"))); const state = agent ? obs(agent.id) : null, stateBadge = el("span", state?.ok ? t("dockerConnected") : state ? t("dockerError") : t("dockerWaiting"), `pill docker-agent-status-badge ${state?.ok ? "live" : ""}`.trim()); const remove = action(t("remove"), () => { row.remove(); setSettingsDirty("docker-agents-form"); }), actions = el("div", undefined, "entity-actions docker-agent-heading-actions"); @@ -484,7 +484,7 @@ provisionInput.addEventListener("change", () => void applyProvision()); provisionInput.addEventListener("keydown", event => { if (event.key === "Enter") { event.preventDefault(); void applyProvision(); } }); row.focusProvision = () => { provision.open = true; provisionInput.focus(); }; - const labelPublish = input("", "checkbox", "docker-agent-label-publish"); labelPublish.checked = value.label_publish === true; + const labelPublish = input("", "checkbox", "docker-agent-label-publish switch"); labelPublish.checked = value.label_publish === true; const labelField = checkboxField("dockerLabelPublish", labelPublish), labelHelp = el("small", undefined, "fine docker-label-help"), labelInfo = el("button", "?", "docker-label-info"); labelInfo.type = "button"; labelInfo.dataset.uiIconName = "none"; labelInfo.title = t("dockerLabelHelpTitle"); labelInfo.setAttribute("aria-label", t("dockerLabelHelpTitle")); labelInfo.addEventListener("click", openLabelHelp); labelHelp.append(el("span", t("dockerLabelPublishHelp")), labelInfo); labelField.append(labelHelp); let closeBubble = null; @@ -528,7 +528,7 @@ summary.append(el("span", t("dockerAlertSettings")), el("small", t("dockerAlertSettingsHelp"), "fine")); box.append(summary); const grid = el("div", undefined, "field-grid docker-alert-grid"), check = (cls, checked) => { const node = input("", "checkbox", cls); node.checked = checked; return node; }; const num = (cls, val, min, max, step = 1) => { const node = input(val, "number", cls); node.min = min; node.max = max; node.step = step; node.required = true; return node; }; - grid.append(checkboxField("dockerAlertEnabled", check("docker-alert-enabled", value.enabled !== false)), + grid.append(checkboxField("dockerAlertEnabled", check("docker-alert-enabled switch", value.enabled !== false)), labeled("dockerAlertDisk", num("docker-alert-disk", value.disk_percent, 50, 100)), labeled("dockerAlertMemory", num("docker-alert-memory", value.memory_percent, 50, 100)), labeled("dockerAlertLoad", num("docker-alert-load", value.load_per_cpu, 0.1, 64, 0.1)), @@ -675,7 +675,7 @@ const passive = { ...defaultPassiveHealth(), ...(assignment?.passive_health || {}) }, details = el("details", undefined, "docker-health-editor docker-passive-health-editor"), summary = el("summary"); summary.append(el("span", t("dockerPassiveHealth")), el("small", t("dockerPassiveHealthSummary"), "fine")); details.append(summary); const grid = el("div", undefined, "field-grid docker-health-grid"); - const enabled = input("", "checkbox", "docker-passive-enabled"); enabled.checked = passive.enabled === true; + const enabled = input("", "checkbox", "docker-passive-enabled switch"); enabled.checked = passive.enabled === true; const connect = input("", "checkbox", "docker-passive-connect"); connect.checked = passive.count_connect_errors !== false; const timeouts = input("", "checkbox", "docker-passive-timeouts"); timeouts.checked = passive.count_timeouts !== false; const io = input("", "checkbox", "docker-passive-io"); io.checked = passive.count_io_errors !== false; @@ -716,9 +716,9 @@ details._inheritedProfiles = inheritedProfiles; const help = el("small", "", "fine"), profileControl = el("div", undefined, "docker-field docker-profile-field"); profileControl.append(el("span", t("dockerAclProfile")), profile, help, profileWarning(profile, 0)); - const publicAccess = input("", "checkbox", "docker-acl-public"); publicAccess.checked = !explicit.length && !inherit && !assignment?.acl; + const publicAccess = input("", "checkbox", "docker-acl-public switch"); publicAccess.checked = !explicit.length && !inherit && !assignment?.acl; const publicLabel = checkboxField("dockerAclPublic", publicAccess); publicLabel.append(el("small", t("dockerAclPublicHelp"), "fine")); - const inline = input("", "checkbox", "docker-acl-inline"); inline.checked = !!assignment?.acl; const inlineLabel = checkboxField("dockerAclInline", inline); inlineLabel.classList.add("docker-acl-inline-row"); + const inline = input("", "checkbox", "docker-acl-inline switch"); inline.checked = !!assignment?.acl; const inlineLabel = checkboxField("dockerAclInline", inline); inlineLabel.classList.add("docker-acl-inline-row"); const defaultAction = el("select", undefined, "docker-acl-default"); for (const value of ["deny", "allow"]) { const option = el("option", t(value)); option.value = value; defaultAction.append(option); } defaultAction.value = assignment?.acl?.default || "deny"; const rules = document.createElement("textarea"); rules.className = "docker-acl-rules"; rules.rows = 4; rules.maxLength = 32768; rules.spellcheck = false; rules.value = rulesText(assignment?.acl); rules.placeholder = "allow 10.0.0.0/8\ndeny 0.0.0.0/0"; const sameSet = (a, b) => a.length === b.length && a.every(id => b.includes(id)); @@ -769,10 +769,10 @@ } function selectFrom(values, current, cls) { const control = el("select", undefined, cls); for (const [value, key] of values) { const option = el("option", t(key)); option.value = value; control.append(option); } control.value = current; return control; } function basicAuthControls(assignment) { - const basic = assignment?.basic_auth || {}, enabled = input("", "checkbox", "docker-basic-enabled"); enabled.checked = basic.enabled === true; + const basic = assignment?.basic_auth || {}, enabled = input("", "checkbox", "docker-basic-enabled switch"); enabled.checked = basic.enabled === true; const realm = input(basic.realm || "Restricted", "text", "docker-basic-realm"); realm.maxLength = 128; - const requireTls = input("", "checkbox", "docker-basic-tls"); requireTls.checked = basic.require_tls !== false; - const forward = input("", "checkbox", "docker-basic-forward"); forward.checked = basic.forward_credentials === true; + const requireTls = input("", "checkbox", "docker-basic-tls switch"); requireTls.checked = basic.require_tls !== false; + const forward = input("", "checkbox", "docker-basic-forward switch"); forward.checked = basic.forward_credentials === true; const users = el("div", undefined, "docker-basic-users docker-wide-field"); const addRow = (user = {}) => { if (users.children.length >= 64) { toast(t("basic.too_many_users"), true); return; } @@ -812,18 +812,18 @@ const methodList = document.createElement("textarea"); methodList.className = "docker-method-list"; methodList.rows = 3; methodList.maxLength = 1024; methodList.value = (method.methods || []).join("\n"); const methodListField = labeled("vhMethodList", methodList); methodListField.classList.add("docker-wide-field"); const rate = assignment?.rate_limit || {}, access = rate.country_access || {}; - const rateEnabled = input("", "checkbox", "docker-rate-enabled"); rateEnabled.checked = rate.enabled === true; + const rateEnabled = input("", "checkbox", "docker-rate-enabled switch"); rateEnabled.checked = rate.enabled === true; const requests = numberInput(rate.requests ?? 120, "docker-rate-requests", 1, 1000000), windowSeconds = numberInput(rate.window_seconds ?? 60, "docker-rate-window", 1, 3600), burst = numberInput(rate.burst ?? 30, "docker-rate-burst", 0, 1000000); const countryMode = selectFrom([["off", "vhOff"], ["block", "vhCountryBlock"], ["allow", "vhCountryAllow"]], access.mode || "off", "docker-country-mode"); const countryList = document.createElement("textarea"); countryList.className = "docker-country-list"; countryList.rows = 2; countryList.maxLength = 1024; countryList.value = (access.countries || []).join("\n"); const countryListField = labeled("vhCountryList", countryList, t("dockerCountryHelp")); countryListField.classList.add("docker-wide-field"); const security = assignment?.security_headers || {}, hsts = security.hsts || {}; - const hstsEnabled = input("", "checkbox", "docker-hsts"); hstsEnabled.checked = hsts.enabled === true; - const hstsAge = numberInput(hsts.max_age_seconds ?? 31536000, "docker-hsts-age", 0, 63072000), hstsSub = input("", "checkbox", "docker-hsts-sub"); hstsSub.checked = hsts.include_subdomains === true; - const nosniff = input("", "checkbox", "docker-nosniff"); nosniff.checked = security.nosniff === true; + const hstsEnabled = input("", "checkbox", "docker-hsts switch"); hstsEnabled.checked = hsts.enabled === true; + const hstsAge = numberInput(hsts.max_age_seconds ?? 31536000, "docker-hsts-age", 0, 63072000), hstsSub = input("", "checkbox", "docker-hsts-sub switch"); hstsSub.checked = hsts.include_subdomains === true; + const nosniff = input("", "checkbox", "docker-nosniff switch"); nosniff.checked = security.nosniff === true; const frame = selectFrom([["preserve", "vhPreserve"], ["deny", "vhDeny"], ["sameorigin", "vhSameorigin"]], security.frame_options || "preserve", "docker-frame"); const referrer = input(security.referrer_policy || "", "text", "docker-referrer"); referrer.maxLength = 256; referrer.placeholder = "strict-origin-when-cross-origin"; - const cloudflare = input("", "checkbox", "docker-cloudflare-ip"); cloudflare.checked = assignment?.cloudflare_client_ip === true; + const cloudflare = input("", "checkbox", "docker-cloudflare-ip switch"); cloudflare.checked = assignment?.cloudflare_client_ip === true; const heading = key => el("h4", t(key), "docker-subheading"), basic = basicAuthControls(assignment); grid.append(heading("dockerBasicSection"), ...basic.fields, heading("vhTrafficMethodsSection"), labeled("vhMethodMode", methodMode), methodListField, @@ -866,7 +866,7 @@ function diagnosticsEditor(assignment) { const details = el("details", undefined, "docker-diagnostics-editor"), summary = el("summary"); summary.append(el("span", t("dockerDiagnostics")), el("small", t("dockerDiagnosticsHelp"), "fine")); details.append(summary); const grid = el("div", undefined, "field-grid docker-diagnostics-grid"); - const box = (cls, value) => { const node = input("", "checkbox", cls); node.checked = value === true; return node; }; + const box = (cls, value) => { const node = input("", "checkbox", `${cls} switch`); node.checked = value === true; return node; }; grid.append(checkboxField("vhTimingHeaders", box("docker-timing-headers", assignment?.timing_headers)), checkboxField("vhBackendHeader", box("docker-backend-header", assignment?.backend_header)), checkboxField("vhBackendTimingHeader", box("docker-backend-timing-header", assignment?.backend_timing_header))); details.append(grid); return details; } @@ -950,7 +950,7 @@ status: stale ? 4 : assignment?.enabled === false || !assignment ? 3 : member?.status === "up" ? 0 : member?.status === "down" ? 1 : 2, backend: String(assignment?.target_ip || agent.default_target_ip || inventory?.public_ip || "").toLowerCase(), scheme: String(assignment?.scheme || "http"), published: assignment && assignment.enabled !== false ? 0 : 1, }; - const top = el("div", undefined, "docker-service-head"), publish = input("", "checkbox", "docker-publish"); publish.checked = !!assignment && assignment.enabled !== false; + const top = el("div", undefined, "docker-service-head"), publish = input("", "checkbox", "docker-publish switch"); publish.checked = !!assignment && assignment.enabled !== false; publish.setAttribute("role", "switch"); publish.setAttribute("aria-checked", String(publish.checked)); const publishLabel = el("label", undefined, "docker-publish-field"); @@ -997,12 +997,12 @@ domainSelect.addEventListener("change", () => { syncHostHelp(); aliases.refresh(); syncOpenActions(host.value); updateHint(); }); host.addEventListener("input", syncHostHelp); const target = el("select", undefined, "docker-target-ip"), auto = el("option", agent.default_target_ip ? `${t("dockerBackendIpAuto")} (${agent.default_target_ip})` : t("dockerBackendIpAuto")); auto.value = ""; target.append(auto); for (const [ip, label] of targetOptions(inventory, service, assignment, agent)) { const option = el("option", label); option.value = ip; target.append(option); } target.value = assignment?.target_ip || ""; const scheme = el("select", undefined, "docker-scheme"); for (const name of ["http", "https"]) { const option = el("option", name.toUpperCase()); option.value = name; scheme.append(option); } scheme.value = assignment?.scheme || "http"; - const preserve = input("", "checkbox", "docker-preserve-host"); preserve.checked = assignment?.preserve_host !== false; const preserveLabel = checkboxField("dockerPreserveHost", preserve); preserveLabel.classList.add("docker-preserve-field"); - const forceSsl = input("", "checkbox", "docker-force-ssl"), forceCapable = canForceSsl(agent); forceSsl.checked = assignment ? assignment.force_ssl === true : forceCapable; forceSsl.disabled = !forceCapable; const forceSslField = checkboxField("dockerForceSsl", forceSsl); if (!forceCapable) forceSslField.append(el("small", t("dockerForceSslUnavailable"), "fine")); - const websockets = input("", "checkbox", "docker-websockets"); websockets.checked = assignment?.websockets !== false; const websocketField = checkboxField("dockerWebsockets", websockets); - const cacheEnabled = input("", "checkbox", "docker-cache-enabled"); cacheEnabled.checked = assignment?.cache_enabled === true; const cacheField = checkboxField("dockerCache", cacheEnabled); - const transformEnabled = input("", "checkbox", "docker-transform-enabled"); transformEnabled.checked = assignment?.transform_enabled === true; const transformField = checkboxField("dockerTransform", transformEnabled); - const compressionEnabled = input("", "checkbox", "docker-compression-enabled"); compressionEnabled.checked = assignment?.compression_enabled !== false; const compressionField = checkboxField("dockerCompression", compressionEnabled); compressionField.title = t("dockerCompressionHelp"); + const preserve = input("", "checkbox", "docker-preserve-host switch"); preserve.checked = assignment?.preserve_host !== false; const preserveLabel = checkboxField("dockerPreserveHost", preserve); preserveLabel.classList.add("docker-preserve-field"); + const forceSsl = input("", "checkbox", "docker-force-ssl switch"), forceCapable = canForceSsl(agent); forceSsl.checked = assignment ? assignment.force_ssl === true : forceCapable; forceSsl.disabled = !forceCapable; const forceSslField = checkboxField("dockerForceSsl", forceSsl); if (!forceCapable) forceSslField.append(el("small", t("dockerForceSslUnavailable"), "fine")); + const websockets = input("", "checkbox", "docker-websockets switch"); websockets.checked = assignment?.websockets !== false; const websocketField = checkboxField("dockerWebsockets", websockets); + const cacheEnabled = input("", "checkbox", "docker-cache-enabled switch"); cacheEnabled.checked = assignment?.cache_enabled === true; const cacheField = checkboxField("dockerCache", cacheEnabled); + const transformEnabled = input("", "checkbox", "docker-transform-enabled switch"); transformEnabled.checked = assignment?.transform_enabled === true; const transformField = checkboxField("dockerTransform", transformEnabled); + const compressionEnabled = input("", "checkbox", "docker-compression-enabled switch"); compressionEnabled.checked = assignment?.compression_enabled !== false; const compressionField = checkboxField("dockerCompression", compressionEnabled); compressionField.title = t("dockerCompressionHelp"); const switches = el("div", undefined, "docker-switch-row"); switches.append(preserveLabel, forceSslField, websocketField, cacheField, compressionField, transformField); const certMismatch = input("", "checkbox", "docker-cert-mismatch"); certMismatch.checked = assignment?.allow_certificate_mismatch === true; certMismatch.disabled = !agentCertificates(agent).length; @@ -1027,8 +1027,8 @@ const backendIpSettings = el("div", undefined, "docker-backend-ip-settings"); backendIpSettings.append(labeled("dockerBackendIp", target), certificateBar); - const h2Enabled = input("", "checkbox", "docker-http2-enabled"); h2Enabled.checked = assignment?.http2_enabled !== false; - const h3Enabled = input("", "checkbox", "docker-http3-enabled"); h3Enabled.checked = assignment ? assignment.http3_enabled !== false : false; + const h2Enabled = input("", "checkbox", "docker-http2-enabled switch"); h2Enabled.checked = assignment?.http2_enabled !== false; + const h3Enabled = input("", "checkbox", "docker-http3-enabled switch"); h3Enabled.checked = assignment ? assignment.http3_enabled !== false : false; const protocolBox = el("details", undefined, "docker-protocol-editor"), protocolSummary = el("summary"); protocolSummary.append(el("span", t("dockerFrontendProtocols")), el("small", t("dockerFrontendProtocolsHelp"), "fine")); const protocolOptions = el("div", undefined, "docker-protocol-options"); diff --git a/src/admin/web/index.html b/src/admin/web/index.html index 2ccd9a1..0d0f85b 100644 --- a/src/admin/web/index.html +++ b/src/admin/web/index.html @@ -152,12 +152,12 @@ title="Move blocks into empty grid space once">Fill gaps

@@ -1439,7 +1439,7 @@

-
@@ -1462,7 +1462,7 @@
-
@@ -1617,7 +1617,7 @@ Ban

Refresh

@@ -1918,7 +1918,7 @@ error:"connection reset" - @@ -3192,10 +3198,10 @@

Captured request dimensions

- -

Country lookup is @@ -3206,10 +3212,10 @@

JSON file

- -

-
-

@@ -3446,9 +3452,9 @@

General

- -

@@ -3516,7 +3522,7 @@ -
-
- -
@@ -4495,7 +4501,7 @@ id="web-service-index" maxlength="4096" rows="5" spellcheck="false">Optional ordered index list. index.php may be used when PHP-FPM is enabled. -