Compare commits

...

2 Commits

Author SHA1 Message Date
librelad
712068a00e Merge claude/1 2026-06-25 21:18:23 +01:00
librelad
dac824a161 fix(webui/forms): enhance per-app config & port dropdowns with themed select
The custom-select enhancer only matched select.form-control /
select.theme-selector, so dropdowns rendered by the per-app config form
(config-form.js uses form-select / form-input / config-input), the app
tools form, the port-manager grid (port-* classes) and the instance
domain picker stayed as plain native OS dropdowns. The LibrePortal app's
Theme option is one of these.

Add those classes to ENHANCE_CLASSES, give the classless instance domain
select a form-control class, and add a compact button override so the
themed dropdown matches the dense port-manager input metrics.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-06-25 21:18:15 +01:00
3 changed files with 22 additions and 3 deletions

View File

@ -85,7 +85,7 @@ class InstanceManager {
<div class="lp-instance-row"> <div class="lp-instance-row">
<label class="lp-instance-field"> <label class="lp-instance-field">
<span>Domain</span> <span>Domain</span>
<select id="lp-instance-domain">${domainOptions}</select> <select id="lp-instance-domain" class="form-control">${domainOptions}</select>
</label> </label>
<label class="lp-instance-field"> <label class="lp-instance-field">
<span>Subdomain</span> <span>Subdomain</span>

View File

@ -405,6 +405,14 @@ div.panel-fields > div.form-field[id^="PORT_"] {
transform: scale(1.2); transform: scale(1.2);
} }
/* Themed dropdowns (custom-select.js) inside the dense port grid: match the
compact metrics of the sibling text inputs above so rows line up. */
.port-field .custom-select-button {
padding: 8px 12px;
border-radius: 4px;
font-size: 14px;
}
.port-manager-hidden { .port-manager-hidden {
display: none; display: none;
} }

View File

@ -282,8 +282,19 @@
// Classes that participate in the themed dropdown. Add more here // Classes that participate in the themed dropdown. Add more here
// (or use data-no-enhance to opt a specific <select> out) as new // (or use data-no-enhance to opt a specific <select> out) as new
// dropdown surfaces appear in the app. // dropdown surfaces appear in the app. Only <select>s with one of
const ENHANCE_CLASSES = ['form-control', 'theme-selector']; // these classes are enhanced — same-class <input>/<textarea> are
// skipped (shouldEnhance requires an HTMLSelectElement).
const ENHANCE_CLASSES = [
'form-control', 'theme-selector',
// Per-app config forms (components/apps/core/config-form.js) and the
// app tools forms — these render selects (theme, domain, backup
// strategy, gluetun, …) with these classes instead of form-control.
'form-select', 'form-input', 'config-input',
// Port manager grid (components/apps/port-manager) — one select per column.
'port-service', 'port-protocol', 'port-access', 'port-traefik',
'port-button-enabled', 'port-login-required', 'port-recommended',
];
const ENHANCE_SELECTOR = ENHANCE_CLASSES.map(c => `select.${c}`).join(','); const ENHANCE_SELECTOR = ENHANCE_CLASSES.map(c => `select.${c}`).join(',');
function shouldEnhance(el) { function shouldEnhance(el) {