Grafica nuova sulla linea di Febe, con tema automatico (#28)
Alberto ha scelto la proposta A fra le tre di docs/mockup/redesign. I token diventano quelli di Febe: grigio caldo, carte bianche, accento blu petrolio, ogni stato con tinta piena, variante per il testo e fondo tenue. Ogni token è light-dark(chiaro, scuro) e data-theme vale auto, light o dark: un browser nuovo segue il sistema, il bottone in alto gira fra i tre. Carattere Archivo (OFL) copiato in wwwroot/fonts e servito anche prima dell'accesso. L'ossatura segue la proposta: barra laterale grigia con mondo e utente Bidoo in fondo (non più chip in alto), indicatori come pastiglie, titolo grande, elenco e pannello in due riquadri con la maniglia fra i due (split.js conta il margine), righe più ariose. Tolti i cinque colori scritti a mano in app.css. ContrastTests legge tokens.css: contrasto delle coppie testo/fondo nei due temi, nessun colore fuori dai token, ogni var(--…) definito, caratteri locali. Provata con un bot finto su un server statico nelle pagine e larghezze principali; le schermate con un bot vero restano per la chiusura. ADR 0016. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
483b2436e6
commit
ceca0013b8
17 files changed
+740
-305
No files matched your search
@@ -38,6 +38,11 @@ copia nella release la sezione della versione.
|
||||
il primo accredito non si vede nel saldo, tetti per giro e per giorno, solo nelle ore scelte, pausa da
|
||||
sola se Bidoo chiede una verifica. Si può anche incollare un collegamento e riscattarlo subito. I
|
||||
forzieri si segnalano su Telegram, non si aprono.
|
||||
- **Grafica nuova, sulla linea di Febe** (ADR 0016): grigio caldo, carte bianche, accento blu petrolio,
|
||||
carattere Archivo, righe più ariose. La barra laterale tiene in fondo il mondo (sito vero o simulatore) e
|
||||
l'utente Bidoo; elenco e pannello stanno in due riquadri. Il tema di fabbrica segue quello del sistema:
|
||||
il bottone in alto passa fra automatico, chiaro e scuro. Ogni colore ha la sua variante per il testo, e
|
||||
una prova controlla il contrasto in tutti e due i temi.
|
||||
|
||||
## 1.2.0
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# 0016 — Grafica sulla linea di Febe, con tema automatico
|
||||
|
||||
**Stato:** accettata (2.0.0, 24/11/2026)
|
||||
|
||||
## Contesto
|
||||
|
||||
La grafica della 1.x era nata dai mockup della riscrittura: tema scuro di fabbrica, blu acceso, densità
|
||||
molto compatta, cinque colori scritti a mano fuori dai token. Gli altri progetti di Alberto (Febe in testa)
|
||||
hanno preso un'altra linea. Per la 2.0.0 sono state preparate tre proposte con lo stesso contenuto
|
||||
(`docs/mockup/redesign/`, immagini in `immagini/` e foglio di confronto `confronto.png`): A sulla linea di
|
||||
Febe, B di Khaemhat, C di Anubis. Alberto ha scelto la **A**.
|
||||
|
||||
## Decisione
|
||||
|
||||
- **Colori**: grigio caldo, carte bianche, accento blu petrolio (`#0F5C8C` in chiaro, `#62B1E0` in scuro).
|
||||
Ogni stato ha la tinta piena (`--ok`, `--warn`, `--bad`, `--gold`), la variante per il testo (`--*-text`) e
|
||||
il fondo tenue (`--*-soft`): un testo colorato usa sempre la variante `-text`, che si legge sulla
|
||||
superficie e sul suo fondo tenue.
|
||||
- **Tema** `auto | light | dark` su `data-theme`; ogni token è `light-dark(chiaro, scuro)` e
|
||||
`color-scheme` sceglie quale vale. Un browser che non ha ancora scelto segue il sistema; il bottone in alto
|
||||
gira automatico → chiaro → scuro e il browser lo ricorda. «Tema scuro» delle Impostazioni, al salvataggio,
|
||||
lo fissa per il browser da cui si salva.
|
||||
- **Carattere**: Archivo (SIL OFL 1.1), copiato in `wwwroot/fonts` con la licenza; le pagine d'accesso lo
|
||||
possono caricare prima dell'accesso, come `/css/` e `/img/`.
|
||||
- **Ossatura**: barra laterale grigia con le pagine e, in fondo, il mondo (sito vero o simulatore) e
|
||||
l'utente Bidoo; in alto gli indicatori come pastiglie sullo sfondo; titolo della pagina grande; elenco e
|
||||
pannello in due riquadri staccati, la maniglia nello spazio fra i due (`split.js` ne tiene conto). Righe
|
||||
più ariose (circa 40 px), intestazioni sobrie, riga scelta con fondo d'accento e barra a sinistra.
|
||||
- **Non cambia**: virtualizzazione della griglia, aggiornamenti chirurgici del DOM, maniglie, `title`
|
||||
ovunque, nessuna notifica laterale, nessuna risorsa da fuori.
|
||||
- **Controllo automatico** (`tests/Mimante.Tests/ContrastTests.cs`): legge `tokens.css` e verifica il
|
||||
contrasto delle coppie testo/fondo nei due temi (4,5:1; 3:1 per i segni senza testo), che fuori da
|
||||
`tokens.css` non ci siano colori scritti, che ogni `var(--…)` usato esista e che i caratteri siano locali.
|
||||
|
||||
## Conseguenze
|
||||
|
||||
- Un browser che aveva già scelto il tema scuro lo tiene; uno nuovo segue il sistema.
|
||||
- La proposta A aveva la riga di stato sotto il titolo; nell'interfaccia vera gli indicatori restano in cima,
|
||||
sopra il titolo, perché ogni pagina compone da sé la sua testa. Il conto delle aste per modo
|
||||
resta nella barra della pagina Aste invece che accanto alle voci del menu.
|
||||
- Le schermate del README si rifanno con `tools/Mimante.Schermate` contro un bot con PostgreSQL (lavoro di
|
||||
chiusura della 2.0.0).
|
||||
+8
-1
@@ -228,7 +228,8 @@ cambiarle; dove serve, il punto nel codice è indicato.
|
||||
per Aste e Storico) e lo spazio che serve all'elenco; sotto 1100 px restano cassetti.
|
||||
- **Nome del programma nella barra laterale** (1.2.0): §9.1 lo metteva nella barra in alto. Sta in cima
|
||||
alla barra laterale con l'icona; compressa resta l'icona. La barra laterale si comprime e si espande
|
||||
solo con le frecce in fondo; la barra in alto tiene i chip di stato, il tema e l'uscita.
|
||||
solo con le frecce in fondo; la barra in alto tiene i chip di stato, il tema e l'uscita. Dalla 2.0.0
|
||||
in fondo alla barra laterale stanno anche il mondo (sito vero o simulatore) e l'utente Bidoo.
|
||||
- **Saldo solo come totale** (1.2.0): §9.1 voleva le puntate residue con `(pagate + gratis)`. Su
|
||||
richiesta di Alberto si mostra solo il totale; la divisione resta in `AccountState.Paid/Free` per il
|
||||
costo effettivo della puntata del modello.
|
||||
@@ -252,6 +253,12 @@ cambiarle; dove serve, il punto nel codice è indicato.
|
||||
nuovo, spento di fabbrica, con la pagina «Puntate gratis»; i forzieri si segnalano e non si aprono.
|
||||
Mancano ancora la lettura delle ricompense (`/my_chests.php`, `/bids_history.php`) e la campanella come
|
||||
seconda fonte, e il primo riscatto dal bot va fatto dal vivo.
|
||||
- **Grafica** (2.0.0, ADR 0016): §9 descriveva la grafica dei mockup della riscrittura, scura di fabbrica.
|
||||
Alberto ha scelto la proposta A, sulla linea di Febe: tema che segue il sistema (automatico, chiaro,
|
||||
scuro), carattere Archivo, mondo e utente Bidoo in fondo alla barra laterale invece che fra i chip in
|
||||
alto. Provata con un bot finto su un server statico (Aste, Impostazioni, Puntate gratis e accesso, a
|
||||
1600, 1366 e 1000 px, nei due temi, senza errori JavaScript); le schermate con
|
||||
`tools/Mimante.Schermate` contro un bot vero restano per la chiusura.
|
||||
|
||||
## Cosa è rimasto della versione desktop dopo la rimozione di `legacy/` (1.1.0)
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public static class Pages
|
||||
|
||||
private static string Head(string title) => $$"""
|
||||
<!doctype html>
|
||||
<html lang="it" data-theme="dark">
|
||||
<html lang="it" data-theme="auto">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
@@ -167,6 +167,7 @@ public static class WebServer
|
||||
private static bool IsPublicAsset(string path) =>
|
||||
path.StartsWith("/css/", StringComparison.Ordinal) ||
|
||||
path.StartsWith("/img/", StringComparison.Ordinal) ||
|
||||
path.StartsWith("/fonts/", StringComparison.Ordinal) ||
|
||||
path == "/favicon.ico";
|
||||
|
||||
private static async Task LoginPageAsync(UiAuth auth, HttpContext ctx, string client, string? error)
|
||||
|
||||
+259
-196
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
Mimante — componenti dell'interfaccia. Solo token di tokens.css, niente colori
|
||||
scritti qui. Densità compatta; layout fluido (grid/flex con 1fr, nessuna larghezza fissa
|
||||
nelle colonne della griglia); le maniglie cambiano solo grid-template-columns/rows.
|
||||
Mimante — componenti dell'interfaccia (proposta A «stile Febe», ADR 0016). Solo token di tokens.css,
|
||||
niente colori scritti qui (lo controlla ContrastTests). Layout fluido (grid/flex con 1fr, nessuna
|
||||
larghezza fissa nelle colonne della griglia); le maniglie cambiano solo grid-template-columns/rows.
|
||||
*/
|
||||
*, *::before, *::after { box-sizing: border-box; }
|
||||
|
||||
@@ -10,12 +10,14 @@ html, body {
|
||||
height: 100%;
|
||||
background: var(--bg);
|
||||
color: var(--text);
|
||||
font: var(--fs)/1.35 var(--font);
|
||||
font: var(--fs)/1.42 var(--font);
|
||||
font-variant-numeric: tabular-nums;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
a { color: var(--accent); }
|
||||
code { font-family: var(--mono); font-size: .95em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }
|
||||
a { color: var(--accent-text); }
|
||||
code { font-family: var(--mono); font-size: .92em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
|
||||
b, strong { font-weight: 600; }
|
||||
button, input, select, textarea { font: inherit; color: inherit; }
|
||||
button { cursor: pointer; }
|
||||
@@ -24,7 +26,7 @@ button:disabled { cursor: not-allowed; opacity: .55; }
|
||||
[hidden] { display: none !important; }
|
||||
|
||||
::-webkit-scrollbar { width: 10px; height: 10px; }
|
||||
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; border: 2px solid var(--bg); }
|
||||
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 6px; border: 2px solid var(--surface); }
|
||||
::-webkit-scrollbar-track { background: transparent; }
|
||||
|
||||
.muted { color: var(--muted); }
|
||||
@@ -33,112 +35,122 @@ button:disabled { cursor: not-allowed; opacity: .55; }
|
||||
.help { color: var(--faint); font-size: var(--fs-small); }
|
||||
.right, .num { text-align: right; }
|
||||
.nowrap { white-space: nowrap; }
|
||||
.ok { color: var(--ok); }
|
||||
.warn { color: var(--warn); }
|
||||
.bad { color: var(--bad); }
|
||||
.gold, .me, .won { color: var(--gold); font-weight: 600; }
|
||||
.pos { color: var(--ok); }
|
||||
.neg { color: var(--bad); }
|
||||
.ok { color: var(--ok-text); }
|
||||
.warn { color: var(--warn-text); }
|
||||
.bad { color: var(--bad-text); }
|
||||
.gold, .me, .won { color: var(--gold-text); font-weight: 600; }
|
||||
.pos { color: var(--ok-text); }
|
||||
.neg { color: var(--bad-text); }
|
||||
.spacer { flex: 1; }
|
||||
|
||||
/* ── bottoni e campi ─────────────────────────────────────────────────── */
|
||||
.btn {
|
||||
display: inline-flex; align-items: center; gap: 6px;
|
||||
padding: 6px 11px; border-radius: var(--r);
|
||||
border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
|
||||
white-space: nowrap; line-height: 1.2;
|
||||
display: inline-flex; align-items: center; gap: 7px;
|
||||
min-height: var(--ctl-h); padding: 0 12px; border-radius: var(--r);
|
||||
border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
|
||||
white-space: nowrap; line-height: 1.2; font-weight: 550;
|
||||
}
|
||||
.btn:hover:not(:disabled) { background: var(--surface-3); }
|
||||
.btn:hover:not(:disabled) { background: var(--hover); }
|
||||
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
|
||||
.btn.primary:hover:not(:disabled) { filter: brightness(1.08); background: var(--accent); }
|
||||
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; font-weight: 600; }
|
||||
.btn.ghost { background: transparent; }
|
||||
.btn.wide { width: 100%; justify-content: center; padding: 9px; }
|
||||
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--bad-ink); font-weight: 600; }
|
||||
.btn.danger:hover:not(:disabled) { filter: brightness(1.08); background: var(--bad); }
|
||||
.btn.ghost { background: transparent; border-color: transparent; }
|
||||
.btn.ghost:hover:not(:disabled) { background: var(--hover); }
|
||||
.btn.wide { width: 100%; justify-content: center; min-height: 38px; }
|
||||
.btn .ic { font-size: 12px; }
|
||||
|
||||
input.txt, select.txt, textarea.txt, .field input, .field select {
|
||||
background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
|
||||
border-radius: var(--r); padding: 5px 8px; min-width: 0;
|
||||
background: var(--surface); border: 1px solid var(--line-strong); color: var(--text);
|
||||
border-radius: var(--r); padding: 0 9px; min-height: var(--ctl-h); min-width: 0;
|
||||
}
|
||||
input.txt:focus, select.txt:focus, .field input:focus, .field select:focus { border-color: var(--accent); outline: none; }
|
||||
textarea.txt { padding: 6px 9px; }
|
||||
input.txt::placeholder, textarea.txt::placeholder { color: var(--faint); }
|
||||
input.txt:focus, select.txt:focus, textarea.txt:focus, .field input:focus, .field select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
|
||||
input[type="number"] { -moz-appearance: textfield; }
|
||||
input[type="number"]::-webkit-inner-spin-button { opacity: .4; }
|
||||
select option { background: var(--surface); color: var(--text); }
|
||||
|
||||
/* interruttore: checkbox con aspetto a levetta */
|
||||
.switch { position: relative; display: inline-block; width: 34px; height: 18px; flex: none; }
|
||||
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: none; }
|
||||
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
|
||||
.switch span { position: absolute; inset: 0; border-radius: 9px; background: var(--line); transition: background .15s; }
|
||||
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
|
||||
.switch span { position: absolute; inset: 0; border-radius: 10px; background: var(--line-strong); transition: background .15s; }
|
||||
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--knob); box-shadow: 0 1px 2px var(--shadow); transition: transform .15s; }
|
||||
.switch input:checked + span { background: var(--accent); }
|
||||
.switch input:checked + span::after { transform: translateX(16px); }
|
||||
.switch input:checked + span::after { transform: translateX(16px); background: var(--accent-ink); }
|
||||
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
|
||||
|
||||
/* indicatori (la riga di stato in alto) e chip delle pagine */
|
||||
.chip {
|
||||
display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; min-width: 0;
|
||||
border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
|
||||
color: var(--muted); white-space: nowrap; font-size: var(--fs-small);
|
||||
display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; min-width: 0;
|
||||
border-radius: 15px; background: var(--surface); border: 1px solid var(--line);
|
||||
color: var(--muted); white-space: nowrap; font-size: 13px;
|
||||
}
|
||||
.chip b { color: var(--text); font-weight: 600; }
|
||||
.chip small { color: var(--faint); font-size: var(--fs-tiny); }
|
||||
.chip.shadow { border-color: var(--accent); color: var(--accent); }
|
||||
.chip.shadow b { color: var(--accent); }
|
||||
.chip.sim { border-color: var(--warn); color: var(--warn); }
|
||||
.chip.shadow { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }
|
||||
.chip.shadow b { color: var(--accent-text); }
|
||||
.chip.sim { border-color: var(--warn); color: var(--warn-text); background: var(--warn-soft); }
|
||||
.chip.sim b { color: var(--warn-text); }
|
||||
.chip.clickable { cursor: pointer; }
|
||||
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
|
||||
.chip.clickable:hover { border-color: var(--line-strong); }
|
||||
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
|
||||
.dot.warn { background: var(--warn); }
|
||||
.dot.bad { background: var(--bad); }
|
||||
.dot.off { background: var(--faint); }
|
||||
.dot.accent { background: var(--accent); }
|
||||
|
||||
.badge { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: var(--fs-tiny); font-weight: 600; letter-spacing: .1px; white-space: nowrap; }
|
||||
.b-lead { background: var(--ok-soft); color: var(--ok); }
|
||||
.b-active { background: var(--accent-soft); color: var(--accent); }
|
||||
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: var(--r-badge); font-size: var(--fs-tiny); font-weight: 600; white-space: nowrap; }
|
||||
.b-lead { background: var(--ok-soft); color: var(--ok-text); }
|
||||
.b-active { background: var(--accent-soft); color: var(--accent-text); }
|
||||
.b-watch { background: var(--muted-soft); color: var(--muted); }
|
||||
.b-stop { background: var(--muted-soft); color: var(--faint); }
|
||||
.b-won { background: var(--gold-soft); color: var(--gold); }
|
||||
.b-lost { background: var(--bad-soft); color: var(--bad); }
|
||||
.b-pause { background: var(--warn-soft); color: var(--warn); }
|
||||
.b-won { background: var(--gold-soft); color: var(--gold-text); }
|
||||
.b-lost { background: var(--bad-soft); color: var(--bad-text); }
|
||||
.b-pause { background: var(--warn-soft); color: var(--warn-text); }
|
||||
.b-sched { background: var(--muted-soft); color: var(--muted); }
|
||||
|
||||
.pill { padding: 2px 8px; border-radius: 999px; font-size: var(--fs-tiny); font-weight: 600; white-space: nowrap; }
|
||||
.pill.ok { background: var(--ok-soft); color: var(--ok); }
|
||||
.pill.warn { background: var(--warn-soft); color: var(--warn); }
|
||||
.pill.bad { background: var(--bad-soft); color: var(--bad); }
|
||||
.pill.info { background: var(--accent-soft); color: var(--accent); }
|
||||
.pill { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 10px; font-size: var(--fs-tiny); font-weight: 600; white-space: nowrap; }
|
||||
.pill.ok { background: var(--ok-soft); color: var(--ok-text); }
|
||||
.pill.warn { background: var(--warn-soft); color: var(--warn-text); }
|
||||
.pill.bad { background: var(--bad-soft); color: var(--bad-text); }
|
||||
.pill.info { background: var(--accent-soft); color: var(--accent-text); }
|
||||
.pill.muted { background: var(--muted-soft); color: var(--muted); }
|
||||
|
||||
.banner { padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--warn); background: var(--warn-soft); color: var(--warn); display: flex; gap: 12px; align-items: center; }
|
||||
.banner.bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
|
||||
.banner.info { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
|
||||
.banner.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
|
||||
.banner { padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--warn); background: var(--warn-soft); color: var(--warn-text); display: flex; gap: 12px; align-items: center; }
|
||||
.banner.bad { border-color: var(--bad); background: var(--bad-soft); color: var(--bad-text); }
|
||||
.banner.info { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
|
||||
.banner.ok { border-color: var(--ok); background: var(--ok-soft); color: var(--ok-text); }
|
||||
.banner .btn { margin-left: auto; }
|
||||
|
||||
/* ── pagine intere: accesso, errore, avvio ───────────────────────────── */
|
||||
body.fullpage { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
|
||||
.box {
|
||||
width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line);
|
||||
border-radius: var(--r-lg); padding: 26px 28px; display: flex; flex-direction: column; gap: 12px;
|
||||
border-radius: var(--r-lg); padding: 28px 30px; display: flex; flex-direction: column; gap: 14px;
|
||||
box-shadow: 0 12px 40px var(--shadow);
|
||||
}
|
||||
.box h1 { margin: 0; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
|
||||
.box h1 { margin: 0; font-size: 20px; font-weight: 650; font-stretch: 104%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
|
||||
.box .v { color: var(--faint); font-size: var(--fs-small); font-weight: 400; margin-left: auto; }
|
||||
.box .lead { margin: 0; color: var(--muted); }
|
||||
.box form { display: flex; flex-direction: column; gap: 10px; }
|
||||
.box input[type="password"] { width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 9px 10px; }
|
||||
.box .form-error { margin: 0; color: var(--bad); }
|
||||
.box input[type="password"] { width: 100%; min-height: 38px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 11px; }
|
||||
.box input[type="password"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
|
||||
.box .form-error { margin: 0; color: var(--bad-text); }
|
||||
.box .help { margin: 0; }
|
||||
.box.err { width: min(720px, 100%); }
|
||||
.box .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
|
||||
.logo { width: 22px; height: 22px; border-radius: 5px; background: var(--accent); display: grid; place-items: center; color: var(--accent-ink); font-weight: 800; font-size: 12px; flex: none; }
|
||||
.sq { width: 16px; height: 16px; background: var(--bad); border-radius: 2px; flex: none; }
|
||||
.sq { width: 16px; height: 16px; background: var(--bad); border-radius: 3px; flex: none; }
|
||||
.err-item { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--bad); background: var(--bad-soft); }
|
||||
.err-item.ok { border-color: var(--ok); background: var(--ok-soft); }
|
||||
.err-item .mark { color: var(--bad); font-weight: 700; }
|
||||
.err-item.ok .mark { color: var(--ok); }
|
||||
.err-item .mark { color: var(--bad-text); font-weight: 700; }
|
||||
.err-item.ok .mark { color: var(--ok-text); }
|
||||
.err-item .detail { color: var(--muted); }
|
||||
.mono { font-family: var(--mono); font-size: var(--fs-small); color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; white-space: pre-wrap; margin-top: 6px; }
|
||||
.mono { font-family: var(--mono); font-size: var(--fs-small); color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; white-space: pre-wrap; margin-top: 6px; }
|
||||
|
||||
/* ── struttura dell'applicazione ─────────────────────────────────────── */
|
||||
/* barra laterale a tutta altezza (nome del programma in cima); a destra barra in alto e pagina */
|
||||
/* barra laterale a tutta altezza (nome in cima, pagine, stato in fondo); a destra gli indicatori e la pagina */
|
||||
.app {
|
||||
display: grid;
|
||||
grid-template-columns: var(--nav-w) minmax(0, 1fr);
|
||||
@@ -148,57 +160,80 @@ body.fullpage { display: grid; place-items: center; min-height: 100vh; padding:
|
||||
.app.narrow { grid-template-columns: var(--nav-w-narrow) minmax(0, 1fr); }
|
||||
|
||||
.topbar {
|
||||
grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 6px; padding: 0 12px;
|
||||
overflow: hidden; background: var(--surface); border-bottom: 1px solid var(--line); min-width: 0;
|
||||
grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 8px; padding: 0 22px;
|
||||
overflow: hidden; background: var(--bg); min-width: 0;
|
||||
}
|
||||
.topbar .chips { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
|
||||
.topbar .chips { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; }
|
||||
.logo-img { width: 26px; height: 26px; object-fit: contain; flex: none; }
|
||||
.icon-btn { flex: none; width: 30px; height: 30px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; font-size: 14px; padding: 0; }
|
||||
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--surface-3); }
|
||||
.icon-btn { flex: none; width: 32px; height: 32px; border-radius: var(--r); border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); display: grid; place-items: center; font-size: 14px; padding: 0; }
|
||||
.icon-btn:hover:not(:disabled) { color: var(--text); background: var(--hover); }
|
||||
.icon-btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
|
||||
.icon-btn.primary:hover:not(:disabled) { background: var(--accent); color: var(--accent-ink); filter: brightness(1.08); }
|
||||
.topbar .icon-btn { border-color: var(--line); }
|
||||
|
||||
/* icone SVG (icons.js): il colore dice la funzione */
|
||||
.ico { width: 1em; height: 1em; display: block; flex: none; }
|
||||
.icon-btn .ico { width: 16px; height: 16px; }
|
||||
.btn .ico { width: 14px; height: 14px; }
|
||||
.c-bid { color: var(--gold); }
|
||||
.c-play { color: var(--ok); }
|
||||
.c-watch { color: var(--accent); }
|
||||
.c-stop { color: var(--bad); }
|
||||
.c-won { color: var(--gold); }
|
||||
.c-lost { color: var(--bad); }
|
||||
.icon-btn.c-play, .icon-btn.c-watch, .icon-btn.c-stop { background: var(--surface-2); }
|
||||
.icon-btn.c-play:hover:not(:disabled) { color: var(--ok); background: var(--ok-soft); }
|
||||
.icon-btn.c-watch:hover:not(:disabled) { color: var(--accent); background: var(--accent-soft); }
|
||||
.icon-btn.c-stop:hover:not(:disabled) { color: var(--bad); background: var(--bad-soft); }
|
||||
.btn .ico { width: 15px; height: 15px; }
|
||||
.c-bid { color: var(--gold-text); }
|
||||
.c-play { color: var(--ok-text); }
|
||||
.c-watch { color: var(--accent-text); }
|
||||
.c-stop { color: var(--bad-text); }
|
||||
.c-won { color: var(--gold-text); }
|
||||
.c-lost { color: var(--bad-text); }
|
||||
.icon-btn.c-play, .icon-btn.c-watch, .icon-btn.c-stop { background: var(--surface); }
|
||||
.icon-btn.c-play:hover:not(:disabled) { color: var(--ok-text); background: var(--ok-soft); }
|
||||
.icon-btn.c-watch:hover:not(:disabled) { color: var(--accent-text); background: var(--accent-soft); }
|
||||
.icon-btn.c-stop:hover:not(:disabled) { color: var(--bad-text); background: var(--bad-soft); }
|
||||
.tool-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; flex: none; }
|
||||
|
||||
/* barra di elaborazione in corso (util.busy): sotto la barra in alto, fuori dalla griglia */
|
||||
.busy-bar { position: fixed; top: calc(var(--topbar-h) - 1px); left: var(--nav-w); right: 0; height: 3px; z-index: 60; overflow: hidden; background: var(--accent-soft); pointer-events: none; }
|
||||
/* barra di elaborazione in corso (util.busy): sotto gli indicatori, fuori dalla griglia */
|
||||
.busy-bar { position: fixed; top: calc(var(--topbar-h) - 3px); left: var(--nav-w); right: 0; height: 3px; z-index: 60; overflow: hidden; background: var(--accent-soft); pointer-events: none; }
|
||||
.busy-bar i, .progress i { position: absolute; top: 0; bottom: 0; left: 0; width: 32%; background: var(--accent); animation: busy 1.1s ease-in-out infinite; }
|
||||
@keyframes busy { from { left: -32%; } to { left: 100%; } }
|
||||
.progress { position: relative; width: 220px; max-width: 80%; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
|
||||
.progress { position: relative; width: 220px; max-width: 80%; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
|
||||
|
||||
.nav {
|
||||
grid-column: 1; grid-row: 1 / 3; background: var(--surface); border-right: 1px solid var(--line);
|
||||
padding: 0 8px 10px; display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: hidden auto;
|
||||
grid-column: 1; grid-row: 1 / 3; background: var(--surface-3); border-right: 1px solid var(--line);
|
||||
padding: 0 12px 12px; display: flex; flex-direction: column; gap: 2px; min-height: 0; overflow: hidden auto;
|
||||
}
|
||||
/* il nome del programma: alto quanto la barra in alto, logo sulla colonna delle icone */
|
||||
/* il nome del programma: alto quanto gli indicatori, logo sulla colonna delle icone */
|
||||
.nav .brand {
|
||||
flex: none; height: var(--topbar-h); margin-bottom: 6px; padding: 0 6px; display: flex; align-items: center; gap: 10px;
|
||||
color: var(--text); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden;
|
||||
flex: none; height: var(--topbar-h); margin-bottom: 4px; padding: 0 8px; display: flex; align-items: center; gap: 10px;
|
||||
color: var(--text); font-weight: 650; font-size: 17px; font-stretch: 108%; white-space: nowrap; overflow: hidden;
|
||||
}
|
||||
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); color: var(--muted); text-decoration: none; white-space: nowrap; }
|
||||
.nav a:hover { color: var(--text); background: var(--surface-2); }
|
||||
.nav a.on { background: var(--surface-3); color: var(--text); font-weight: 600; }
|
||||
.nav a {
|
||||
display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: var(--r);
|
||||
border: 1px solid transparent; color: var(--muted); text-decoration: none; white-space: nowrap; font-weight: 500;
|
||||
}
|
||||
.nav a:hover { color: var(--text); background: var(--hover); }
|
||||
.nav a.on { background: var(--surface); border-color: var(--line); color: var(--text); font-weight: 600; }
|
||||
.nav a.on .ic { color: var(--accent-text); }
|
||||
.nav .ic { width: 18px; display: grid; place-items: center; flex: none; }
|
||||
.nav .ic .ico { width: 16px; height: 16px; }
|
||||
.nav .ic .ico { width: 17px; height: 17px; }
|
||||
.nav .sep { flex: 1; }
|
||||
/* stato in fondo alla barra: mondo (sito vero o simulatore) e utente Bidoo */
|
||||
.nav .side-status {
|
||||
flex: none; margin-top: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg);
|
||||
padding: 11px 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0;
|
||||
}
|
||||
.side-status .world { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; }
|
||||
.side-status .world.sim { color: var(--warn-text); }
|
||||
.side-status .who { display: flex; align-items: center; gap: 9px; padding-top: 10px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; min-width: 0; }
|
||||
.side-status .who b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.side-status .who small { display: block; font-size: var(--fs-small); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.side-status .who > span:last-child { min-width: 0; }
|
||||
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--muted-soft); color: var(--muted); font-weight: 700; font-size: 12px; flex: none; text-transform: uppercase; }
|
||||
.avatar.ok { background: var(--ok-soft); color: var(--ok-text); }
|
||||
.avatar.warn { background: var(--warn-soft); color: var(--warn-text); }
|
||||
.avatar.bad { background: var(--bad-soft); color: var(--bad-text); }
|
||||
/* comprimi/espandi: solo la doppia freccia, sulla colonna delle icone */
|
||||
.nav .collapse { flex: none; color: var(--faint); padding: 8px 10px; background: none; border: 0; border-radius: var(--r); display: flex; align-items: center; }
|
||||
.nav .collapse:hover { color: var(--text); background: var(--surface-2); }
|
||||
.app.narrow .nav .lbl { display: none; }
|
||||
.nav .collapse { flex: none; margin-top: 6px; color: var(--faint); height: 32px; padding: 0 10px; background: none; border: 0; border-radius: var(--r); display: flex; align-items: center; }
|
||||
.nav .collapse:hover { color: var(--text); background: var(--hover); }
|
||||
.app.narrow .nav { padding-left: 8px; padding-right: 8px; }
|
||||
.app.narrow .nav .lbl, .app.narrow .side-status .world, .app.narrow .side-status .who > span:last-child { display: none; }
|
||||
.app.narrow .side-status { padding: 6px; border: 0; background: none; }
|
||||
.app.narrow .side-status .who { border: 0; padding: 0; justify-content: center; }
|
||||
.app.narrow .nav a, .app.narrow .nav .collapse, .app.narrow .nav .brand { justify-content: center; }
|
||||
.app.narrow .nav .brand { padding: 0; }
|
||||
.app.narrow .busy-bar { left: var(--nav-w-narrow); }
|
||||
@@ -207,42 +242,52 @@ body.fullpage { display: grid; place-items: center; min-height: 100vh; padding:
|
||||
.page-host { min-height: 0; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
|
||||
.page-host > section { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
||||
|
||||
.toolbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; min-width: 0; }
|
||||
.toolbar h1 { font-size: 15px; font-weight: 600; margin: 0 8px 0 0; white-space: nowrap; }
|
||||
.counters { display: flex; align-items: center; gap: 12px; }
|
||||
.counter { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); white-space: nowrap; }
|
||||
.counter .ico { width: 14px; height: 14px; }
|
||||
/* la testa della pagina: titolo grande, poi strumenti; sullo sfondo, senza riquadro */
|
||||
.toolbar { display: flex; align-items: center; gap: 10px; padding: 6px 22px 14px; flex-wrap: wrap; min-width: 0; }
|
||||
.toolbar h1 { font-size: 22px; font-weight: 650; font-stretch: 104%; letter-spacing: -.005em; margin: 0 6px 0 0; white-space: nowrap; }
|
||||
/* una barra dentro un riquadro (per esempio «Incolla un collegamento») non è una testa di pagina */
|
||||
.section .toolbar, .panel .toolbar { padding: 0; }
|
||||
.counters { display: flex; align-items: center; gap: 14px; }
|
||||
.counter { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; }
|
||||
.counter .ico { width: 15px; height: 15px; }
|
||||
.counter b { color: var(--text); }
|
||||
.counter.c-play { color: var(--ok); }
|
||||
.counter.c-watch { color: var(--accent); }
|
||||
.counter.c-stop, .counter.c-lost { color: var(--bad); }
|
||||
.counter.c-won, .counter.c-won b { color: var(--gold); }
|
||||
.toolbar .sub { color: var(--muted); font-size: var(--fs-small); }
|
||||
.counter.c-play { color: var(--ok-text); }
|
||||
.counter.c-watch { color: var(--accent-text); }
|
||||
.counter.c-stop, .counter.c-lost { color: var(--bad-text); }
|
||||
.counter.c-won, .counter.c-won b { color: var(--gold-text); }
|
||||
.toolbar .sub { color: var(--muted); font-size: 13px; }
|
||||
|
||||
/* due colonne ridimensionabili: elenco | maniglia | pannello */
|
||||
.split { display: grid; grid-template-columns: minmax(480px, 1fr) 6px var(--panel-w, 400px); flex: 1; min-height: 0; }
|
||||
.split.collapsed { grid-template-columns: minmax(0, 1fr) 6px 0; }
|
||||
/* due colonne ridimensionabili: elenco | maniglia | pannello, ognuno nel suo riquadro */
|
||||
.split { display: grid; grid-template-columns: minmax(480px, 1fr) 14px var(--panel-w, 400px); flex: 1; min-height: 0; padding: 0 22px 22px; }
|
||||
.split.collapsed { grid-template-columns: minmax(0, 1fr) 14px 0; }
|
||||
.split.collapsed > .panel { display: none; }
|
||||
.split > .content { overflow: auto; min-width: 0; min-height: 0; position: relative; }
|
||||
.vsplit { cursor: col-resize; background: var(--surface); border-left: 1px solid var(--line); border-right: 1px solid var(--line); position: relative; }
|
||||
.vsplit::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 2px; height: 28px; background: var(--faint); border-radius: 2px; }
|
||||
.vsplit button { position: absolute; top: 6px; left: -8px; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 10px; z-index: 2; }
|
||||
.split > .content {
|
||||
overflow: auto; min-width: 0; min-height: 0; position: relative;
|
||||
background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
|
||||
}
|
||||
.vsplit { cursor: col-resize; background: transparent; position: relative; }
|
||||
.vsplit::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 3px; height: 32px; background: var(--line-strong); border-radius: 2px; }
|
||||
.vsplit:hover::after { background: var(--accent); }
|
||||
.vsplit button { position: absolute; top: 8px; left: -4px; width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-size: 10px; z-index: 2; }
|
||||
body.dragging, body.dragging * { user-select: none !important; cursor: inherit; }
|
||||
|
||||
/* ── tabelle ─────────────────────────────────────────────────────────── */
|
||||
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; }
|
||||
table.grid th {
|
||||
position: sticky; top: 0; z-index: 1; background: var(--surface); color: var(--muted);
|
||||
font-weight: 600; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line);
|
||||
font-weight: 500; text-align: left; height: 38px; padding: 0 10px; border-bottom: 1px solid var(--line);
|
||||
font-size: var(--fs-small); white-space: nowrap; user-select: none;
|
||||
}
|
||||
table.grid th.sortable { cursor: pointer; }
|
||||
table.grid th.sorted-asc::after { content: " \25B4"; color: var(--accent); }
|
||||
table.grid th.sorted-desc::after { content: " \25BE"; color: var(--accent); }
|
||||
table.grid td { padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
|
||||
table.grid th.sortable:hover { color: var(--text); }
|
||||
table.grid th.sorted-asc, table.grid th.sorted-desc { color: var(--text); }
|
||||
table.grid th.sorted-asc::after { content: " \25B4"; color: var(--accent-text); }
|
||||
table.grid th.sorted-desc::after { content: " \25BE"; color: var(--accent-text); }
|
||||
table.grid td { padding: 9px 10px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; vertical-align: middle; }
|
||||
table.grid tbody tr { cursor: default; }
|
||||
table.grid tbody tr:hover td { background: var(--surface-2); }
|
||||
table.grid tbody tr.sel td { background: var(--surface-3); }
|
||||
table.grid tbody tr:hover td { background: var(--hover); }
|
||||
table.grid tbody tr.sel td { background: var(--accent-soft); }
|
||||
table.grid tbody tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
|
||||
table.grid td.num, table.grid th.num { text-align: right; }
|
||||
table.grid td.wrap { white-space: normal; }
|
||||
table.grid td.ell { max-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
||||
@@ -250,130 +295,143 @@ table.grid td.ell { max-width: 0; overflow: hidden; text-overflow: ellipsis; }
|
||||
table.grid.fixed { table-layout: fixed; }
|
||||
table.grid.fixed th, table.grid.fixed td { overflow: hidden; text-overflow: ellipsis; }
|
||||
table.grid .spacer-row td { padding: 0; border: 0; }
|
||||
.empty { padding: 30px 14px; color: var(--muted); text-align: center; }
|
||||
table.grid .spacer-row:hover td { background: none; }
|
||||
.empty { padding: 34px 16px; color: var(--muted); text-align: center; }
|
||||
|
||||
.timer { display: flex; flex-direction: column; gap: 3px; min-width: 86px; }
|
||||
.timer .t { font-weight: 600; }
|
||||
.timer .t.warn { color: var(--warn); }
|
||||
.timer .t.bad { color: var(--bad); }
|
||||
.bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
|
||||
.timer .t.warn { color: var(--warn-text); }
|
||||
.timer .t.bad { color: var(--bad-text); font-weight: 700; }
|
||||
.bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
|
||||
.bar i { display: block; height: 100%; background: var(--ok); width: 0; }
|
||||
.bar i.warn { background: var(--warn); }
|
||||
.bar i.bad { background: var(--bad); }
|
||||
.ping { color: var(--ok); }
|
||||
.ping.warn { color: var(--warn); }
|
||||
.ping.bad { color: var(--bad); }
|
||||
.ping { color: var(--ok-text); }
|
||||
.ping.warn { color: var(--warn-text); }
|
||||
.ping.bad { color: var(--bad-text); }
|
||||
|
||||
.acts { display: flex; gap: 4px; }
|
||||
.acts button { width: 26px; height: 26px; padding: 0; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
|
||||
.acts button .ico { width: 15px; height: 15px; }
|
||||
.acts button:hover:not(:disabled) { background: var(--surface-3); }
|
||||
.acts button.c-bid { color: var(--gold); }
|
||||
.acts button.c-play { color: var(--ok); }
|
||||
.acts button.c-watch { color: var(--accent); }
|
||||
.acts button.c-stop { color: var(--bad); }
|
||||
.acts { display: flex; gap: 2px; }
|
||||
.acts button { width: 26px; height: 26px; padding: 0; border-radius: var(--r); border: 1px solid transparent; background: transparent; display: grid; place-items: center; font-size: 11px; color: var(--muted); }
|
||||
.acts button .ico { width: 16px; height: 16px; }
|
||||
.acts button:hover:not(:disabled) { background: var(--surface-2); border-color: var(--line); }
|
||||
.acts button.c-bid { color: var(--gold-text); }
|
||||
.acts button.c-play { color: var(--ok-text); }
|
||||
.acts button.c-watch { color: var(--accent-text); }
|
||||
.acts button.c-stop { color: var(--bad-text); }
|
||||
.acts button.c-bid:hover:not(:disabled) { background: var(--gold-soft); border-color: var(--gold); }
|
||||
.acts button.on.c-play { background: var(--ok-soft); border-color: var(--ok); }
|
||||
.acts button.on.c-watch { background: var(--accent-soft); border-color: var(--accent); }
|
||||
.acts button.on.c-watch { background: var(--accent-soft); border-color: var(--accent-line); }
|
||||
.acts button.on.c-stop { background: var(--bad-soft); border-color: var(--bad); }
|
||||
.acts button.c-del:hover:not(:disabled) { color: var(--text); }
|
||||
table.grid td.manual { font-style: italic; }
|
||||
.star { background: none; border: 0; padding: 0 2px; font-size: 14px; color: var(--faint); }
|
||||
.star { background: none; border: 0; padding: 0 2px; font-size: 15px; color: var(--faint); }
|
||||
.star.on { color: var(--gold); }
|
||||
|
||||
/* ── pannello dettagli ───────────────────────────────────────────────── */
|
||||
.panel { background: var(--surface); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
|
||||
.panel .head { padding: 10px 14px; border-bottom: 1px solid var(--line); }
|
||||
.panel .head h2 { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
|
||||
.panel {
|
||||
background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
|
||||
display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden;
|
||||
}
|
||||
.panel .head { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
|
||||
.panel .head h2 { margin: 0; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
|
||||
.panel .head small { color: var(--muted); }
|
||||
.tabs { display: flex; flex-wrap: wrap; gap: 0 2px; padding: 4px 8px 0; border-bottom: 1px solid var(--line); flex: none; }
|
||||
.tabs button { padding: 7px 8px; color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: none; white-space: nowrap; }
|
||||
.tabs { display: flex; flex-wrap: wrap; gap: 0 2px; padding: 0 10px; border-bottom: 1px solid var(--line); flex: none; }
|
||||
.tabs button { padding: 10px 9px 9px; margin-bottom: -1px; color: var(--muted); border: 0; border-bottom: 2px solid transparent; background: none; white-space: nowrap; }
|
||||
.tabs button:hover { color: var(--text); }
|
||||
.tabs button.on { color: var(--text); border-color: var(--accent); font-weight: 600; }
|
||||
.panel .body { padding: 12px 14px; overflow: auto; display: flex; flex-direction: column; gap: 12px; min-height: 0; flex: 1; }
|
||||
.panel .placeholder { color: var(--muted); padding: 24px 14px; }
|
||||
.panel .body { padding: 14px 16px; overflow: auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; flex: 1; }
|
||||
.panel .placeholder { color: var(--muted); padding: 28px 16px; }
|
||||
|
||||
.kv { display: grid; grid-template-columns: minmax(0, max-content) minmax(40%, 1fr); gap: 6px 10px; font-size: 12.5px; margin: 0; }
|
||||
.kv { display: grid; grid-template-columns: minmax(0, max-content) minmax(40%, 1fr); gap: 7px 12px; font-size: var(--fs-small); margin: 0; }
|
||||
.kv dt { color: var(--muted); margin: 0; }
|
||||
.kv dd { margin: 0; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
|
||||
.field { display: grid; grid-template-columns: minmax(0, 1fr) 130px; align-items: center; gap: 8px; }
|
||||
.field { display: grid; grid-template-columns: minmax(0, 1fr) 130px; align-items: center; gap: 10px; }
|
||||
.field label { color: var(--muted); }
|
||||
.field input, .field select { text-align: right; width: 100%; }
|
||||
.field.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 220px); }
|
||||
.card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
|
||||
.card h3 { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
|
||||
.verdict { padding: 8px 10px; border-radius: var(--r); border: 1px solid var(--muted); color: var(--muted); background: var(--muted-soft); }
|
||||
.verdict.yes { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
|
||||
.verdict.no { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
|
||||
.verdict.explore { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
|
||||
.log { font-size: var(--fs-small); line-height: 1.5; color: var(--muted); white-space: pre-wrap; font-family: var(--font); }
|
||||
.card { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
|
||||
.card h3 { margin: 0 0 8px; font-size: 13px; font-weight: 650; color: var(--text); }
|
||||
.verdict { padding: 12px; border-radius: var(--r); border: 1px solid var(--line-strong); color: var(--muted); background: var(--muted-soft); }
|
||||
.verdict.yes { border-color: var(--ok); color: var(--ok-text); background: var(--ok-soft); }
|
||||
.verdict.no { border-color: var(--bad); color: var(--bad-text); background: var(--bad-soft); }
|
||||
.verdict.explore { border-color: var(--accent-line); color: var(--accent-text); background: var(--accent-soft); }
|
||||
.log { font-size: var(--fs-small); line-height: 1.55; color: var(--muted); white-space: pre-wrap; font-family: var(--font); }
|
||||
.log b { color: var(--text); font-weight: 600; }
|
||||
.log .cnt { color: var(--faint); }
|
||||
.product { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 12px; align-items: start; }
|
||||
.product .img { width: 108px; height: 108px; border-radius: var(--r); background: var(--surface-3); display: grid; place-items: center; color: var(--faint); font-size: var(--fs-tiny); text-align: center; overflow: hidden; }
|
||||
.product .img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
|
||||
.product { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 14px; align-items: start; }
|
||||
.product .img { width: 108px; height: 108px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--faint); font-size: var(--fs-tiny); text-align: center; overflow: hidden; }
|
||||
.product .img img { width: 100%; height: 100%; object-fit: contain; background: var(--image-bg); }
|
||||
|
||||
/* ── pagine generiche ────────────────────────────────────────────────── */
|
||||
.page { padding: 14px; overflow: auto; display: flex; flex-direction: column; gap: 14px; min-height: 0; flex: 1; }
|
||||
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
|
||||
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
|
||||
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
|
||||
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; min-width: 0; }
|
||||
.stat .v { font-size: 22px; font-weight: 600; margin: 2px 0; }
|
||||
.page { padding: 0 22px 22px; overflow: auto; display: flex; flex-direction: column; gap: var(--gap); min-height: 0; flex: 1; }
|
||||
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
|
||||
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
|
||||
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
|
||||
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; min-width: 0; }
|
||||
.stat .v { font-size: 24px; font-weight: 650; font-stretch: 96%; line-height: 1.25; margin: 2px 0; }
|
||||
.stat .l { color: var(--muted); font-size: var(--fs-small); }
|
||||
.stat .s { color: var(--muted); font-size: var(--fs-small); }
|
||||
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; display: flex; flex-direction: column; }
|
||||
.section > h2 { margin: 0; padding: 10px 14px; font-size: 13.5px; font-weight: 600; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
|
||||
.section > .in { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
|
||||
.stat .s { color: var(--muted); font-size: 12px; }
|
||||
/* dentro un riquadro i numeri stanno su una superficie appena diversa */
|
||||
.section .stat { background: var(--surface-2); }
|
||||
.section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; display: flex; flex-direction: column; }
|
||||
.section > h2 { margin: 0; padding: 13px 16px 11px; font-size: 15px; font-weight: 650; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
|
||||
.section > .in { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
|
||||
.section > .table-wrap { overflow: auto; max-height: 420px; }
|
||||
.section > .tabs { padding: 0 12px; }
|
||||
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
|
||||
.help.note { margin: 0 0 2px; line-height: 1.4; }
|
||||
.help.note { margin: 0 0 2px; line-height: 1.45; }
|
||||
|
||||
.weights { display: flex; flex-direction: column; gap: 5px; font-size: var(--fs-small); }
|
||||
.weights { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-small); }
|
||||
.weights .w { display: grid; grid-template-columns: minmax(0, 1fr) minmax(60px, 160px) 48px; gap: 8px; align-items: center; }
|
||||
.weights .w .bar { height: 6px; }
|
||||
.weights .w .bar i { background: var(--accent); }
|
||||
.weights .w .bar i.neg { background: var(--bad); }
|
||||
.hist { height: 60px; display: flex; align-items: flex-end; gap: 2px; }
|
||||
.hist i { display: block; flex: 1; background: var(--accent); opacity: .8; border-radius: 1px; min-height: 1px; }
|
||||
.hist { height: 62px; display: flex; align-items: flex-end; gap: 3px; }
|
||||
.hist i { display: block; flex: 1; background: var(--accent); opacity: .75; border-radius: 2px 2px 0 0; min-height: 1px; }
|
||||
.hist i:last-child { opacity: 1; }
|
||||
|
||||
/* Browser: il browser del bot (screencast) e accanto la sessione */
|
||||
.browser-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 14px; flex: 1; min-height: 0; }
|
||||
.browser-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow: auto; }
|
||||
.browser-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: var(--gap); flex: 1; min-height: 0; }
|
||||
.browser-side { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; min-height: 0; overflow: auto; }
|
||||
ul.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
|
||||
.browser { background: var(--browser-bg); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
|
||||
.browser .url { display: flex; gap: 6px; align-items: center; padding: 6px 8px; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--fs-small); }
|
||||
.browser .url .icon-btn { width: 28px; height: 28px; }
|
||||
.browser .url input.addr { flex: 1; min-width: 120px; background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; color: var(--text); font-size: var(--fs-small); }
|
||||
.browser { background: var(--browser-bg); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
|
||||
.browser .url { display: flex; gap: 6px; align-items: center; padding: 8px 10px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--fs-small); }
|
||||
.browser .url .icon-btn { width: 30px; height: 30px; }
|
||||
.browser .url input.addr { flex: 1; min-width: 120px; min-height: 30px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 0 9px; color: var(--text); font-size: var(--fs-small); }
|
||||
.browser .url input.addr:focus { border-color: var(--accent); outline: none; }
|
||||
.browser .url .btn { padding: 5px 9px; }
|
||||
.browser .url .btn { min-height: 30px; padding: 0 10px; }
|
||||
.browser .view { position: relative; flex: 1; min-height: 300px; display: grid; place-items: center; outline: none; }
|
||||
.browser .view canvas { max-width: 100%; max-height: 100%; cursor: pointer; display: block; }
|
||||
.browser .view .idle { color: var(--muted); padding: 30px; text-align: center; }
|
||||
|
||||
/* ── dialoghi e avvisi ───────────────────────────────────────────────── */
|
||||
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
|
||||
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 10px 40px var(--shadow); display: flex; flex-direction: column; }
|
||||
.modal header { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; }
|
||||
.modal .content { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
|
||||
.modal footer { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
|
||||
.modal-back { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; z-index: 50; padding: 16px; }
|
||||
.modal { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 16px 48px var(--shadow); display: flex; flex-direction: column; }
|
||||
.modal header { padding: 15px 18px 13px; border-bottom: 1px solid var(--line); font-weight: 650; font-size: 15px; }
|
||||
.modal .content { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
|
||||
.modal footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
|
||||
.modal .field { grid-template-columns: minmax(0, 1fr) minmax(0, 220px); }
|
||||
/* messaggio importante al centro (util.notice): la barra a sinistra dice il tipo */
|
||||
.notice { margin: 0; padding: 2px 0 2px 12px; border-left: 4px solid var(--accent); white-space: pre-line; overflow-wrap: anywhere; }
|
||||
.notice.ok { border-left-color: var(--ok); color: var(--text); }
|
||||
.notice.warn { border-left-color: var(--warn); color: var(--text); }
|
||||
.notice.bad { border-left-color: var(--bad); color: var(--text); }
|
||||
.conn-lost { position: fixed; top: calc(var(--topbar-h) + 8px); left: 50%; transform: translateX(-50%); z-index: 40; }
|
||||
.conn-lost { position: fixed; top: calc(var(--topbar-h) + 8px); left: 50%; transform: translateX(-50%); z-index: 40; box-shadow: 0 8px 24px var(--shadow); }
|
||||
|
||||
/* catalogo: categorie a sinistra */
|
||||
.catalog { display: grid; grid-template-columns: 220px minmax(0, 1fr); flex: 1; min-height: 0; }
|
||||
.catalog .cats { border-right: 1px solid var(--line); overflow: auto; padding: 8px; background: var(--surface); }
|
||||
.catalog .cats button { display: block; width: 100%; text-align: left; padding: 6px 10px; border: 0; background: none; border-radius: var(--r); color: var(--muted); }
|
||||
.catalog .cats button.on { background: var(--surface-3); color: var(--text); font-weight: 600; }
|
||||
/* catalogo: categorie a sinistra, elenco a destra, nello stesso riquadro */
|
||||
.catalog {
|
||||
display: grid; grid-template-columns: 220px minmax(0, 1fr); flex: 1; min-height: 0; margin: 0 22px 22px;
|
||||
background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
|
||||
}
|
||||
.catalog .cats { border-right: 1px solid var(--line); overflow: auto; padding: 8px; background: var(--surface-2); }
|
||||
.catalog .cats button { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: none; border-radius: var(--r); color: var(--muted); }
|
||||
.catalog .cats button:hover { color: var(--text); background: var(--hover); }
|
||||
.catalog .cats button.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
|
||||
.catalog .list-wrap { position: relative; min-width: 0; min-height: 0; display: flex; }
|
||||
.catalog .list { overflow: auto; min-width: 0; flex: 1; }
|
||||
/* velo di caricamento: l'elenco resta visibile sotto, la barra dice che si sta leggendo */
|
||||
.loading-veil { display: none; position: absolute; inset: 0; z-index: 3; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
|
||||
.loading-veil::before { content: ""; position: absolute; inset: 0; background: var(--bg); opacity: .72; }
|
||||
.loading-veil::before { content: ""; position: absolute; inset: 0; background: var(--surface); opacity: .72; }
|
||||
.loading-veil > * { position: relative; }
|
||||
.list-wrap.loading .loading-veil { display: flex; }
|
||||
|
||||
@@ -382,30 +440,35 @@ ul.plain { margin: 0; padding-left: 18px; display: flex; flex-direction: column;
|
||||
numero: scritto o no lo dicono il title e il puntino della cella (prodotti.css). */
|
||||
table.grid td.edit { padding: 3px 5px; }
|
||||
table.grid th.edit::after { content: " \270E"; color: var(--faint); font-weight: 400; }
|
||||
.cell-edit { width: 100%; min-width: 62px; background: transparent; border: 1px solid transparent; border-radius: 4px; padding: 3px 6px; color: var(--text); text-align: right; }
|
||||
.cell-edit { width: 100%; min-width: 62px; min-height: 30px; background: transparent; border: 1px solid transparent; border-radius: var(--r); padding: 0 7px; color: var(--text); text-align: right; }
|
||||
select.cell-edit { text-align: left; min-width: 112px; }
|
||||
table.grid th.pname, table.grid td.pname { min-width: 190px; width: 22%; }
|
||||
.cell-edit::placeholder { color: var(--text); opacity: 1; }
|
||||
.cell-edit:hover { border-color: var(--line); }
|
||||
.cell-edit:focus { border-color: var(--accent); background: var(--surface-2); outline: none; }
|
||||
select.cell-edit option { background: var(--surface); color: var(--text); }
|
||||
.thumb { width: 40px; height: 40px; object-fit: contain; background: #fff; border-radius: 4px; }
|
||||
.cell-edit:hover { border-color: var(--line-strong); background: var(--surface); }
|
||||
.cell-edit:focus { border-color: var(--accent); background: var(--surface); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
|
||||
.thumb { width: 40px; height: 40px; object-fit: contain; background: var(--image-bg); border-radius: var(--r-badge); }
|
||||
|
||||
/* ── finestre strette ────────────────────────────────────────────────── */
|
||||
@media (max-width: 1100px) {
|
||||
.app { grid-template-columns: var(--nav-w-narrow) minmax(0, 1fr); }
|
||||
.app .nav .lbl { display: none; }
|
||||
.app .nav { padding-left: 8px; padding-right: 8px; }
|
||||
.app .nav .lbl, .app .side-status .world, .app .side-status .who > span:last-child { display: none; }
|
||||
.app .side-status { padding: 6px; border: 0; background: none; }
|
||||
.app .side-status .who { border: 0; padding: 0; justify-content: center; }
|
||||
.app .nav a, .app .nav .brand { justify-content: center; }
|
||||
.app .nav .brand { padding: 0; }
|
||||
/* qui la barra è sempre a sole icone: il bottone per comprimerla non servirebbe */
|
||||
.app .nav .collapse { display: none; }
|
||||
.busy-bar, .app.narrow .busy-bar { left: var(--nav-w-narrow); }
|
||||
.topbar, .toolbar { padding-left: 14px; padding-right: 14px; }
|
||||
.topbar .opt { display: none; }
|
||||
.counters { display: none; }
|
||||
.split { grid-template-columns: minmax(0, 1fr) 6px 0; position: relative; }
|
||||
.page { padding: 0 14px 14px; }
|
||||
.catalog { margin: 0 14px 14px; }
|
||||
.split { grid-template-columns: minmax(0, 1fr) 14px 0; position: relative; padding: 0 0 14px 14px; }
|
||||
.split > .panel {
|
||||
position: absolute; top: 0; right: 0; bottom: 0; width: min(var(--panel-w, 400px), 92%);
|
||||
border-left: 1px solid var(--line); box-shadow: -10px 0 30px var(--shadow); z-index: 5;
|
||||
position: absolute; top: 0; right: 14px; bottom: 14px; width: min(var(--panel-w, 400px), 92%);
|
||||
box-shadow: -10px 0 30px var(--shadow); z-index: 5;
|
||||
}
|
||||
.split:not(.drawer-open) > .panel { display: none; }
|
||||
.grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||||
@@ -424,12 +487,12 @@ select.cell-edit option { background: var(--surface); color: var(--text); }
|
||||
|
||||
/* ── aggiunte dell'interfaccia (M6) ──────────────────────────────────── */
|
||||
a.btn, a.icon-btn { text-decoration: none; }
|
||||
.stat .v.pos { color: var(--ok); }
|
||||
.stat .v.neg { color: var(--bad); }
|
||||
.ev.pos { color: var(--ok); }
|
||||
.ev.neg { color: var(--bad); }
|
||||
.stat .v.pos { color: var(--ok-text); }
|
||||
.stat .v.neg { color: var(--bad-text); }
|
||||
.ev.pos { color: var(--ok-text); }
|
||||
.ev.neg { color: var(--bad-text); }
|
||||
.content > .btn.wide { margin: 10px 0; }
|
||||
.panel .head .icon-btn { width: 24px; height: 24px; font-size: 11px; }
|
||||
.panel .head .icon-btn { width: 26px; height: 26px; font-size: 11px; }
|
||||
@media (min-width: 1101px) { .panel .head .icon-btn, .drawer-only { display: none; } }
|
||||
@media (max-width: 1100px) { .browser-grid { grid-template-columns: minmax(0, 1fr); } }
|
||||
table.grid th.grow, table.grid td.grow { width: 36%; }
|
||||
|
||||
@@ -16,22 +16,22 @@
|
||||
box-shadow: inset 1px 0 0 var(--line);
|
||||
}
|
||||
.aste-list table.grid th.col-acts { z-index: 2; }
|
||||
.aste-list table.grid td.col-acts { z-index: 1; background: var(--bg); }
|
||||
.aste-list table.grid tbody tr:hover td.col-acts { background: var(--surface-2); }
|
||||
.aste-list table.grid tbody tr.sel td.col-acts { background: var(--surface-3); }
|
||||
.aste-list table.grid td.col-acts { z-index: 1; background: var(--surface); }
|
||||
.aste-list table.grid tbody tr:hover td.col-acts { background: var(--hover); }
|
||||
.aste-list table.grid tbody tr.sel td.col-acts { background: var(--accent-soft); }
|
||||
|
||||
/* ── pannello: selettore del modo in cima (Asta | Registro del bot) ─────── */
|
||||
.aste-panel .panel-mode { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex: none; }
|
||||
.aste-panel .seg { flex: 1; min-width: 0; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
|
||||
.aste-panel .panel-mode { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex: none; }
|
||||
.aste-panel .seg { flex: 1; min-width: 0; display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); }
|
||||
.aste-panel .seg button {
|
||||
flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
||||
padding: 5px 8px; border: 0; border-radius: calc(var(--r) - 2px); background: none; color: var(--muted); white-space: nowrap;
|
||||
height: 28px; padding: 0 9px; border: 0; border-radius: calc(var(--r) - 2px); background: none; color: var(--muted); white-space: nowrap;
|
||||
}
|
||||
.aste-panel .seg button span { overflow: hidden; text-overflow: ellipsis; }
|
||||
.aste-panel .seg button .ico { width: 15px; height: 15px; }
|
||||
.aste-panel .seg button:hover { color: var(--text); }
|
||||
.aste-panel .seg button.on { background: var(--surface-3); color: var(--text); font-weight: 600; }
|
||||
.aste-panel .seg button.on .ico { color: var(--accent); }
|
||||
.aste-panel .seg button.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
|
||||
.aste-panel .seg button.on .ico { color: var(--accent-text); }
|
||||
|
||||
/* i due modi: uno visibile, l'altro con hidden (il suo contenuto resta, per esempio i paletti in scrittura) */
|
||||
.aste-panel .pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
||||
|
||||
@@ -11,14 +11,12 @@
|
||||
|
||||
.settings-page { gap: 12px; }
|
||||
|
||||
.settings-page > .section > h2 { padding: 8px 12px; }
|
||||
|
||||
.settings-page > .section > .in {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr));
|
||||
align-items: center;
|
||||
gap: 4px 28px;
|
||||
padding: 8px 12px 10px;
|
||||
padding: 10px 16px 14px;
|
||||
}
|
||||
|
||||
.settings-page .in > .full { grid-column: 1 / -1; min-width: 0; }
|
||||
@@ -26,9 +24,9 @@
|
||||
.settings-page .in > .extra { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--line); }
|
||||
.settings-page .in > .help.note { margin: 0 0 4px; line-height: 1.4; }
|
||||
|
||||
.settings-page .field { grid-template-columns: minmax(0, 1fr) minmax(84px, 128px); gap: 8px; min-height: 28px; min-width: 0; }
|
||||
.settings-page .field { grid-template-columns: minmax(0, 1fr) minmax(84px, 128px); gap: 10px; min-height: 38px; min-width: 0; border-bottom: 1px solid var(--line-soft); }
|
||||
.settings-page .field.toggle-row { grid-template-columns: minmax(0, 1fr) auto; }
|
||||
.settings-page .field input, .settings-page .field select { padding: 3px 7px; }
|
||||
.settings-page .field input, .settings-page .field select { min-height: 30px; padding: 0 8px; }
|
||||
.settings-page .field label { line-height: 1.3; }
|
||||
|
||||
/* Coppie nome-valore (rete, dati, database) nella stessa griglia dei campi. */
|
||||
|
||||
@@ -1,75 +1,85 @@
|
||||
/*
|
||||
Mimante — token dell'interfaccia (unica origine dei colori).
|
||||
Nati dai token semantici di docs/mockup/mock.css. Il colore ha significato:
|
||||
neutro = secondario, accento = primario, verde/ambra/rosso = ok/attenzione/pericolo,
|
||||
oro = asta vinta o «sono io». Tema scuro predefinito; chiaro con gli stessi nomi.
|
||||
Mimante — token dell'interfaccia: l'unica origine dei colori (ADR 0016, proposta A «stile Febe»).
|
||||
|
||||
Grigio caldo, carte bianche, accento blu petrolio. Il colore ha significato: neutro = secondario,
|
||||
accento = primario, verde/ambra/rosso = ok/attenzione/pericolo, oro = asta vinta o «sono io».
|
||||
Ogni stato ha la tinta piena (--ok, --warn, --bad, --gold: punti, barre, sfondi pieni), la variante
|
||||
per il testo (--*-text, leggibile su --surface e sul suo --*-soft) e il fondo tenue (--*-soft).
|
||||
|
||||
Tema: data-theme sull'elemento html vale auto (segue il sistema), light o dark. Ogni token è
|
||||
light-dark(chiaro, scuro): color-scheme sceglie quale dei due vale. tests/Mimante.Tests/ContrastTests.cs
|
||||
legge questo file e controlla il contrasto delle coppie testo/fondo nei due temi.
|
||||
*/
|
||||
:root,
|
||||
:root[data-theme="dark"] {
|
||||
color-scheme: dark;
|
||||
--bg: #151920;
|
||||
--surface: #1c2129;
|
||||
--surface-2: #232a34;
|
||||
--surface-3: #2a323d;
|
||||
--line: #2c3441;
|
||||
--text: #e6eaf1;
|
||||
--muted: #93a0b4;
|
||||
--faint: #5f6b7d;
|
||||
--accent: #5b9cff;
|
||||
--accent-ink: #0b1d3a;
|
||||
--ok: #3ecf8e;
|
||||
--warn: #f2b640;
|
||||
--bad: #f15b50;
|
||||
--gold: #e5b94e;
|
||||
--shadow: rgba(0, 0, 0, .45);
|
||||
|
||||
--ok-soft: rgba(62, 207, 142, .16);
|
||||
--warn-soft: rgba(242, 182, 64, .16);
|
||||
--bad-soft: rgba(241, 91, 80, .14);
|
||||
--accent-soft: rgba(91, 156, 255, .16);
|
||||
--gold-soft: rgba(229, 185, 78, .18);
|
||||
--muted-soft: rgba(147, 160, 180, .16);
|
||||
|
||||
--browser-bg: #0e1116;
|
||||
}
|
||||
|
||||
:root[data-theme="light"] {
|
||||
color-scheme: light;
|
||||
--bg: #eef1f5;
|
||||
--surface: #ffffff;
|
||||
--surface-2: #f4f6f9;
|
||||
--surface-3: #e9edf3;
|
||||
--line: #d7dde6;
|
||||
--text: #1b2230;
|
||||
--muted: #5b6778;
|
||||
--faint: #9aa5b5;
|
||||
--accent: #2f6fe4;
|
||||
--accent-ink: #ffffff;
|
||||
--ok: #1f9d63;
|
||||
--warn: #c98a10;
|
||||
--bad: #d63b31;
|
||||
--gold: #b8891a;
|
||||
--shadow: rgba(20, 30, 50, .18);
|
||||
|
||||
--ok-soft: rgba(31, 157, 99, .14);
|
||||
--warn-soft: rgba(201, 138, 16, .14);
|
||||
--bad-soft: rgba(214, 59, 49, .12);
|
||||
--accent-soft: rgba(47, 111, 228, .12);
|
||||
--gold-soft: rgba(184, 137, 26, .16);
|
||||
--muted-soft: rgba(91, 103, 120, .12);
|
||||
|
||||
--browser-bg: #dfe3ea;
|
||||
}
|
||||
:root[data-theme="auto"] { color-scheme: light dark; }
|
||||
:root[data-theme="light"] { color-scheme: light; }
|
||||
:root[data-theme="dark"] { color-scheme: dark; }
|
||||
|
||||
:root {
|
||||
--font: "Segoe UI", system-ui, "Liberation Sans", Arial, sans-serif;
|
||||
--mono: ui-monospace, "Cascadia Mono", "Liberation Mono", monospace;
|
||||
--r: 6px;
|
||||
--r-lg: 8px;
|
||||
--fs: 13px;
|
||||
--fs-small: 12px;
|
||||
--fs-tiny: 11px;
|
||||
--topbar-h: 46px;
|
||||
--nav-w: 212px;
|
||||
--nav-w-narrow: 56px;
|
||||
--bg: light-dark(#F4F4F4, #1B1B1B);
|
||||
--surface: light-dark(#FFFFFF, #242424);
|
||||
--surface-2: light-dark(#FAFAFA, #2B2B2B);
|
||||
--surface-3: light-dark(#ECECEC, #151515);
|
||||
--hover: light-dark(#F2F2F2, #303030);
|
||||
--line: light-dark(#E1E1E1, #363636);
|
||||
--line-soft: light-dark(#ECECEC, #2F2F2F);
|
||||
--line-strong: light-dark(#CCCCCC, #4A4A4A);
|
||||
|
||||
--text: light-dark(#1A1A1A, #EDEDED);
|
||||
--muted: light-dark(#555555, #B0B0B0);
|
||||
--faint: light-dark(#6A6A6A, #9C9C9C);
|
||||
|
||||
--accent: light-dark(#0F5C8C, #62B1E0);
|
||||
--accent-ink: light-dark(#FFFFFF, #0C2230);
|
||||
--accent-text: light-dark(#0B4A72, #8AC6EA);
|
||||
--accent-soft: light-dark(#E3EEF5, #1B3342);
|
||||
--accent-line: light-dark(#B5D0E2, #2C5068);
|
||||
|
||||
--ok: light-dark(#1E7B4F, #5CC08D);
|
||||
--ok-text: light-dark(#1E7B4F, #5CC08D);
|
||||
--ok-soft: light-dark(#E3F2EA, #1A3326);
|
||||
--warn: light-dark(#E0A021, #E0A021);
|
||||
--warn-text: light-dark(#8F5400, #E7B04C);
|
||||
--warn-soft: light-dark(#FBF0DA, #3A2E14);
|
||||
--bad: light-dark(#B42318, #E5534B);
|
||||
--bad-ink: light-dark(#FFFFFF, #2A0B08);
|
||||
--bad-text: light-dark(#B42318, #F0776C);
|
||||
--bad-soft: light-dark(#FBE9E7, #3F1E1B);
|
||||
--gold: light-dark(#B07F0C, #E2BD5A);
|
||||
--gold-text: light-dark(#7D5A00, #E2BD5A);
|
||||
--gold-soft: light-dark(#F5ECD2, #3A3115);
|
||||
--muted-soft: light-dark(#EEEEEE, #2F2F2F);
|
||||
|
||||
--knob: light-dark(#FFFFFF, #F2F2F2);
|
||||
--image-bg: #FFFFFF;
|
||||
--scrim: light-dark(rgba(26, 26, 26, .38), rgba(0, 0, 0, .6));
|
||||
--shadow: light-dark(rgba(26, 26, 26, .12), rgba(0, 0, 0, .5));
|
||||
--browser-bg: light-dark(#E6E6E6, #121212);
|
||||
|
||||
--font: "Archivo", system-ui, "Segoe UI", "Liberation Sans", Arial, sans-serif;
|
||||
--mono: "Cascadia Mono", ui-monospace, "Liberation Mono", monospace;
|
||||
--r: 7px;
|
||||
--r-lg: 10px;
|
||||
--r-badge: 4px;
|
||||
--fs: 13.5px;
|
||||
--fs-small: 12.5px;
|
||||
--fs-tiny: 11.5px;
|
||||
--ctl-h: 32px;
|
||||
--topbar-h: 54px;
|
||||
--nav-w: 220px;
|
||||
--nav-w-narrow: 60px;
|
||||
--gap: 14px;
|
||||
}
|
||||
|
||||
/* Archivo (SIL OFL 1.1, fonts/Archivo-OFL.txt), copiato in wwwroot: nessuna risorsa da fuori. */
|
||||
@font-face {
|
||||
font-family: "Archivo";
|
||||
src: url(../fonts/archivo-latin.woff2) format("woff2");
|
||||
font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
|
||||
}
|
||||
@font-face {
|
||||
font-family: "Archivo";
|
||||
src: url(../fonts/archivo-latin-ext.woff2) format("woff2");
|
||||
font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo) Archivo-Italic[wdth,wght].ttf: Copyright 2020 The Archivo Project Authors (https://github.com/Omnibus-Type/Archivo)
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
This license is copied below, and is also available with a FAQ at:
|
||||
http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="it" data-theme="dark">
|
||||
<html lang="it" data-theme="auto">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
@@ -28,11 +28,21 @@ let current = null; // { id, module }
|
||||
|
||||
// ── tema ──────────────────────────────────────────────────────────────
|
||||
|
||||
// auto segue il tema del sistema (tokens.css: color-scheme light dark); light e dark lo fissano.
|
||||
const THEMES = ['auto', 'light', 'dark'];
|
||||
const THEME_NAMES = { auto: 'automatico (come il sistema)', light: 'chiaro', dark: 'scuro' };
|
||||
|
||||
function applyTheme(theme) {
|
||||
if (!THEMES.includes(theme)) theme = 'auto';
|
||||
document.documentElement.dataset.theme = theme;
|
||||
store.set('theme', theme);
|
||||
if (themeBtn) {
|
||||
const next = THEMES[(THEMES.indexOf(theme) + 1) % THEMES.length];
|
||||
themeBtn.title = `Tema ${THEME_NAMES[theme]}. Clic: tema ${THEME_NAMES[next]} (ricordato in questo browser)`;
|
||||
}
|
||||
}
|
||||
applyTheme(store.get('theme', 'dark'));
|
||||
let themeBtn = null;
|
||||
applyTheme(store.get('theme', 'auto'));
|
||||
|
||||
// ── struttura ─────────────────────────────────────────────────────────
|
||||
|
||||
@@ -57,14 +67,17 @@ function setText(node, text) {
|
||||
|
||||
function buildTopbar() {
|
||||
const bar = $('#topbar');
|
||||
const theme = el('button', { class: 'icon-btn', type: 'button', title: 'Tema chiaro o scuro (ricordato in questo browser)', 'aria-label': 'Tema' }, icon('theme'));
|
||||
theme.addEventListener('click', () => applyTheme(document.documentElement.dataset.theme === 'light' ? 'dark' : 'light'));
|
||||
const theme = el('button', { class: 'icon-btn', type: 'button', 'aria-label': 'Tema' }, icon('theme'));
|
||||
themeBtn = theme;
|
||||
theme.addEventListener('click', () => {
|
||||
const now = document.documentElement.dataset.theme;
|
||||
applyTheme(THEMES[(THEMES.indexOf(now) + 1) % THEMES.length]);
|
||||
});
|
||||
applyTheme(document.documentElement.dataset.theme);
|
||||
const exit = el('a', { class: 'icon-btn', href: '/esci', title: 'Esci dall\'interfaccia (il bot continua a lavorare)', 'aria-label': 'Esci' }, icon('logout'));
|
||||
|
||||
bar.append(
|
||||
el('div', { class: 'chips' },
|
||||
chip('sim', 'Modalità debug (--simulatore): aste e avversari finti del simulatore interno'),
|
||||
chip('user', 'Utente Bidoo collegato. Senza utente il bot segue le aste e impara, ma non punta: accedi dal Browser'),
|
||||
chip('bids', BIDS_TITLE),
|
||||
chip('credit', 'Credito Bidoo Shop', true),
|
||||
chip('confirm', 'Aste vinte in attesa di conferma su Bidoo', true),
|
||||
@@ -77,9 +90,17 @@ function buildTopbar() {
|
||||
parts.pingDot = el('span', { class: 'dot off' });
|
||||
parts.ping = el('b', null, '—');
|
||||
chips.ping.append(parts.pingDot, 'Ping ', parts.ping);
|
||||
chips.sim.hidden = true;
|
||||
chips.user.classList.add('clickable');
|
||||
chips.user.addEventListener('click', () => { location.hash = '#/browser'; });
|
||||
}
|
||||
|
||||
// Lo stato in fondo alla barra laterale: in che mondo lavora il bot e con quale utente di Bidoo.
|
||||
const side = {};
|
||||
function buildSideStatus() {
|
||||
side.world = el('div', { class: 'world' });
|
||||
side.avatar = el('span', { class: 'avatar', 'aria-hidden': 'true' });
|
||||
side.user = el('b');
|
||||
side.detail = el('small');
|
||||
side.who = el('a', { class: 'who', href: '#/browser' }, side.avatar, el('span', null, side.user, side.detail));
|
||||
return el('div', { class: 'side-status' }, side.world, side.who);
|
||||
}
|
||||
|
||||
let brand = null;
|
||||
@@ -100,7 +121,7 @@ function buildNav() {
|
||||
nav.append(el('a', { href: '#/' + p.id, title: p.title, dataset: { page: p.id } },
|
||||
el('span', { class: 'ic', 'aria-hidden': 'true' }, icon(p.ic)), el('span', { class: 'lbl' }, p.label)));
|
||||
}
|
||||
nav.append(el('span', { class: 'sep' }));
|
||||
nav.append(el('span', { class: 'sep' }), buildSideStatus());
|
||||
const collapse = el('button', { class: 'collapse', type: 'button' });
|
||||
const setNarrow = narrow => {
|
||||
app.classList.toggle('narrow', narrow);
|
||||
@@ -124,20 +145,25 @@ function buildNav() {
|
||||
// ── barra: aggiornamenti ──────────────────────────────────────────────
|
||||
|
||||
function renderMode() {
|
||||
chips.sim.hidden = !state.mode.simulator;
|
||||
chips.sim.className = 'chip sim';
|
||||
chips.sim.replaceChildren(el('span', { class: 'dot warn' }), el('b', null, 'SIMULATORE'));
|
||||
const sim = !!state.mode.simulator;
|
||||
side.world.className = 'world' + (sim ? ' sim' : '');
|
||||
side.world.replaceChildren(el('span', { class: 'dot ' + (sim ? 'warn' : '') }), el('span', { class: 'lbl' }, sim ? 'Simulatore' : 'Sul sito vero'));
|
||||
side.world.title = sim
|
||||
? 'Modalità debug (--simulatore): aste e avversari finti del simulatore interno; niente arriva al modello vero'
|
||||
: 'Il bot segue le aste vere di Bidoo';
|
||||
}
|
||||
|
||||
function renderSession() {
|
||||
const s = state.session;
|
||||
const dot = { ok: '', verifica: 'warn', scaduta: 'bad', simulatore: 'warn', assente: 'off' }[s.state] ?? 'off';
|
||||
if (s.state === 'assente' || !s.user) {
|
||||
chips.user.replaceChildren(el('span', { class: 'dot off' }), 'Bidoo ', el('b', null, 'non collegato'));
|
||||
} else {
|
||||
chips.user.replaceChildren(el('span', { class: 'dot ' + dot }), 'Bidoo ', el('b', null, s.user), s.state === 'scaduta' ? ' sessione scaduta' : '');
|
||||
}
|
||||
chips.user.title = `Utente Bidoo: ${s.user || 'nessuno'}${s.detail ? ' (' + s.detail + ')' : ''}. Clic per il Browser`;
|
||||
const level = { ok: 'ok', verifica: 'warn', scaduta: 'bad', simulatore: 'warn', assente: '' }[s.state] ?? '';
|
||||
const present = s.state !== 'assente' && !!s.user;
|
||||
side.avatar.className = 'avatar ' + (present ? level : '');
|
||||
side.avatar.textContent = present ? s.user.replace(/[^\p{L}\p{N}]/gu, '').slice(0, 2) || '?' : '–';
|
||||
side.user.textContent = present ? s.user : 'Nessun utente';
|
||||
side.detail.textContent = !present ? 'Bidoo non collegato'
|
||||
: { ok: 'Bidoo collegato', verifica: 'Bidoo da verificare', scaduta: 'Sessione scaduta', simulatore: 'Utente del simulatore' }[s.state] ?? s.state;
|
||||
side.who.title = `Utente Bidoo: ${s.user || 'nessuno'}${s.detail ? ' (' + s.detail + ')' : ''}. `
|
||||
+ 'Senza utente il bot segue le aste e impara, ma non punta. Clic per il Browser';
|
||||
}
|
||||
|
||||
function renderAccount() {
|
||||
|
||||
@@ -120,7 +120,7 @@ const sections = [
|
||||
['MinLogLevel', 'Livello minimo del registro', L, 'Le righe meno importanti di questo livello non si registrano', [['Debug', 'Tutto (debug)'], ['Normal', 'Normale'], ['Warning', 'Solo avvisi'], ['Error', 'Solo errori']]],
|
||||
['MaxLogLinesPerAuction', 'Righe di registro per asta', I, 'Quante righe tiene il registro di ogni asta'],
|
||||
['MaxGlobalLogLines', 'Righe del registro generale', I, 'Quante righe tiene il registro generale nell\'interfaccia'],
|
||||
['DarkMode', 'Tema scuro', B, 'Predefinito; ogni browser ricorda anche il suo'],
|
||||
['DarkMode', 'Tema scuro', B, 'Al salvataggio vale per questo browser; un browser che non ha ancora scelto segue il tema del sistema'],
|
||||
['NavCollapsed', 'Menu compresso', B, 'Predefinito; ogni browser ricorda anche il suo']
|
||||
] }
|
||||
];
|
||||
|
||||
@@ -12,8 +12,14 @@ import { store } from './util.js';
|
||||
/** La stessa soglia di @media (max-width: 1100px) in app.css. */
|
||||
const drawerQuery = window.matchMedia('(max-width: 1100px)');
|
||||
|
||||
/** La maniglia fra elenco e pannello (colonna di 6 px in .split). */
|
||||
const handlePx = 6;
|
||||
/** La maniglia fra elenco e pannello (colonna di 14 px in .split). */
|
||||
const handlePx = 14;
|
||||
|
||||
/** I margini interni di .split a sinistra e a destra (lo spazio fra i riquadri e il bordo della pagina). */
|
||||
const padding = el => {
|
||||
const s = getComputedStyle(el);
|
||||
return { left: parseFloat(s.paddingLeft) || 0, right: parseFloat(s.paddingRight) || 0 };
|
||||
};
|
||||
|
||||
/**
|
||||
* Maniglia verticale fra elenco e pannello. splitEl è il contenitore .split, handle la
|
||||
@@ -30,7 +36,8 @@ export function verticalSplit(splitEl, handle, key, { min = 320, def = 400, minL
|
||||
|
||||
/** min(max(min, w), max(min, contenitore − minList − maniglia)); nel cassetto solo il minimo. */
|
||||
const clamp = w => {
|
||||
const avail = drawerQuery.matches ? 0 : splitEl.clientWidth;
|
||||
const pad = padding(splitEl);
|
||||
const avail = drawerQuery.matches ? 0 : splitEl.clientWidth - pad.left - pad.right;
|
||||
const max = avail > 0 ? Math.max(min, avail - listMin() - handlePx) : Infinity;
|
||||
return Math.round(Math.min(max, Math.max(min, w)));
|
||||
};
|
||||
@@ -71,7 +78,7 @@ export function verticalSplit(splitEl, handle, key, { min = 320, def = 400, minL
|
||||
e.preventDefault();
|
||||
handle.setPointerCapture(e.pointerId);
|
||||
document.body.classList.add('dragging');
|
||||
const right = splitEl.getBoundingClientRect().right;
|
||||
const right = splitEl.getBoundingClientRect().right - padding(splitEl).right;
|
||||
const move = ev => {
|
||||
width = clamp(right - ev.clientX);
|
||||
apply(width);
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
using System.Globalization;
|
||||
using System.Text.RegularExpressions;
|
||||
using Xunit;
|
||||
|
||||
namespace Mimante.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// I colori dell'interfaccia (ADR 0016): stanno tutti in <c>wwwroot/css/tokens.css</c>, ogni token usato esiste, e
|
||||
/// le coppie testo/fondo si leggono nei due temi (WCAG AA: 4,5:1 per il testo, 3:1 per i segni senza testo).
|
||||
/// </summary>
|
||||
public sealed partial class ContrastTests
|
||||
{
|
||||
private static readonly string Root = FindRoot();
|
||||
private static readonly string WebRoot = Path.Combine(Root, "src", "Mimante", "wwwroot");
|
||||
private static readonly Dictionary<string, (Rgb Light, Rgb Dark)> Tokens = ReadTokens();
|
||||
|
||||
/// <summary>Testo sul suo fondo: il testo di ogni livello su ogni superficie e ogni stato sul suo fondo tenue.</summary>
|
||||
public static TheoryData<string, string> TextPairs() => new()
|
||||
{
|
||||
{ "text", "bg" }, { "text", "surface" }, { "text", "surface-2" }, { "text", "surface-3" }, { "text", "hover" },
|
||||
{ "text", "accent-soft" },
|
||||
{ "muted", "bg" }, { "muted", "surface" }, { "muted", "surface-2" }, { "muted", "surface-3" }, { "muted", "hover" },
|
||||
{ "muted", "muted-soft" }, { "muted", "accent-soft" },
|
||||
{ "faint", "bg" }, { "faint", "surface" }, { "faint", "surface-2" }, { "faint", "surface-3" }, { "faint", "muted-soft" },
|
||||
{ "accent-ink", "accent" }, { "bad-ink", "bad" },
|
||||
{ "accent-text", "surface" }, { "accent-text", "accent-soft" }, { "accent-text", "surface-3" },
|
||||
{ "ok-text", "surface" }, { "ok-text", "ok-soft" },
|
||||
{ "warn-text", "surface" }, { "warn-text", "warn-soft" },
|
||||
{ "bad-text", "surface" }, { "bad-text", "bad-soft" },
|
||||
{ "gold-text", "surface" }, { "gold-text", "gold-soft" }
|
||||
};
|
||||
|
||||
/// <summary>Segni senza testo che portano significato: la stella accesa, i punti, le barre, il bordo attivo.</summary>
|
||||
public static TheoryData<string, string> MarkPairs() => new()
|
||||
{
|
||||
{ "accent", "surface" }, { "ok", "surface" }, { "bad", "surface" }, { "gold", "surface" }
|
||||
};
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(TextPairs))]
|
||||
public void TextIsReadableInBothThemes(string fore, string back)
|
||||
{
|
||||
AssertContrast(fore, back, 4.5);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[MemberData(nameof(MarkPairs))]
|
||||
public void MarksAreVisibleInBothThemes(string fore, string back)
|
||||
{
|
||||
AssertContrast(fore, back, 3.0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ThemeFollowsTheSystemUnlessChosen()
|
||||
{
|
||||
var css = File.ReadAllText(Path.Combine(WebRoot, "css", "tokens.css"));
|
||||
Assert.Matches(@":root\[data-theme=""auto""\]\s*\{\s*color-scheme:\s*light dark;", css);
|
||||
Assert.Matches(@":root\[data-theme=""light""\]\s*\{\s*color-scheme:\s*light;", css);
|
||||
Assert.Matches(@":root\[data-theme=""dark""\]\s*\{\s*color-scheme:\s*dark;", css);
|
||||
Assert.Contains("data-theme=\"auto\"", File.ReadAllText(Path.Combine(WebRoot, "index.html")));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void NoColourOutsideTheTokens()
|
||||
{
|
||||
var offenders = new List<string>();
|
||||
foreach (var file in Directory.EnumerateFiles(Path.Combine(WebRoot, "css"), "*.css"))
|
||||
{
|
||||
if (Path.GetFileName(file) == "tokens.css") continue;
|
||||
var lines = File.ReadAllLines(file);
|
||||
for (var i = 0; i < lines.Length; i++)
|
||||
{
|
||||
var code = CommentRegex().Replace(lines[i], "");
|
||||
if (ColourRegex().IsMatch(code)) offenders.Add($"{Path.GetFileName(file)}:{i + 1}: {lines[i].Trim()}");
|
||||
}
|
||||
}
|
||||
Assert.True(offenders.Count == 0, "Colori scritti fuori da tokens.css:\n" + string.Join('\n', offenders));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void EveryTokenUsedExists()
|
||||
{
|
||||
var defined = new HashSet<string>(StringComparer.Ordinal);
|
||||
var css = File.ReadAllText(Path.Combine(WebRoot, "css", "tokens.css"));
|
||||
foreach (Match m in DefinitionRegex().Matches(css)) defined.Add(m.Groups[1].Value);
|
||||
defined.Add("panel-w"); // la larghezza del pannello, scritta da split.js
|
||||
|
||||
var missing = new SortedSet<string>(StringComparer.Ordinal);
|
||||
foreach (var file in Directory.EnumerateFiles(WebRoot, "*.*", SearchOption.AllDirectories)
|
||||
.Where(f => f.EndsWith(".css", StringComparison.Ordinal) || f.EndsWith(".js", StringComparison.Ordinal)))
|
||||
{
|
||||
foreach (Match m in UseRegex().Matches(File.ReadAllText(file)))
|
||||
if (!defined.Contains(m.Groups[1].Value)) missing.Add($"--{m.Groups[1].Value} ({Path.GetFileName(file)})");
|
||||
}
|
||||
Assert.True(missing.Count == 0, "Token usati ma non definiti in tokens.css:\n" + string.Join('\n', missing));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void FontsAreLocal()
|
||||
{
|
||||
var css = File.ReadAllText(Path.Combine(WebRoot, "css", "tokens.css"));
|
||||
foreach (Match m in Regex.Matches(css, @"url\(([^)]+)\)"))
|
||||
{
|
||||
var rel = m.Groups[1].Value.Trim('"', '\'');
|
||||
Assert.DoesNotContain("://", rel);
|
||||
Assert.True(File.Exists(Path.GetFullPath(Path.Combine(WebRoot, "css", rel))), "Carattere mancante: " + rel);
|
||||
}
|
||||
Assert.True(File.Exists(Path.Combine(WebRoot, "fonts", "Archivo-OFL.txt")), "Manca la licenza del carattere");
|
||||
}
|
||||
|
||||
private static void AssertContrast(string fore, string back, double min)
|
||||
{
|
||||
Assert.True(Tokens.ContainsKey(fore), "Token mancante: --" + fore);
|
||||
Assert.True(Tokens.ContainsKey(back), "Token mancante: --" + back);
|
||||
var light = Ratio(Tokens[fore].Light, Tokens[back].Light);
|
||||
var dark = Ratio(Tokens[fore].Dark, Tokens[back].Dark);
|
||||
Assert.True(light >= min, $"--{fore} su --{back}, tema chiaro: {light:F2}:1 (serve {min}:1)");
|
||||
Assert.True(dark >= min, $"--{fore} su --{back}, tema scuro: {dark:F2}:1 (serve {min}:1)");
|
||||
}
|
||||
|
||||
internal static double Ratio(Rgb a, Rgb b)
|
||||
{
|
||||
var la = a.Luminance;
|
||||
var lb = b.Luminance;
|
||||
return (Math.Max(la, lb) + 0.05) / (Math.Min(la, lb) + 0.05);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RatioMatchesTheWcagExamples()
|
||||
{
|
||||
Assert.Equal(21.0, Ratio(Rgb.Parse("#000000"), Rgb.Parse("#FFFFFF")), 2);
|
||||
Assert.Equal(1.0, Ratio(Rgb.Parse("#777777"), Rgb.Parse("#777777")), 2);
|
||||
Assert.Equal(4.48, Ratio(Rgb.Parse("#777777"), Rgb.Parse("#FFFFFF")), 2);
|
||||
}
|
||||
|
||||
private static Dictionary<string, (Rgb, Rgb)> ReadTokens()
|
||||
{
|
||||
var css = File.ReadAllText(Path.Combine(WebRoot, "css", "tokens.css"));
|
||||
var map = new Dictionary<string, (Rgb, Rgb)>(StringComparer.Ordinal);
|
||||
foreach (Match m in PairRegex().Matches(css)) map[m.Groups[1].Value] = (Rgb.Parse(m.Groups[2].Value), Rgb.Parse(m.Groups[3].Value));
|
||||
foreach (Match m in SingleRegex().Matches(css)) map.TryAdd(m.Groups[1].Value, (Rgb.Parse(m.Groups[2].Value), Rgb.Parse(m.Groups[2].Value)));
|
||||
return map;
|
||||
}
|
||||
|
||||
private static string FindRoot()
|
||||
{
|
||||
for (var d = new DirectoryInfo(AppContext.BaseDirectory); d != null; d = d.Parent)
|
||||
if (File.Exists(Path.Combine(d.FullName, "Mimante.slnx"))) return d.FullName;
|
||||
throw new InvalidOperationException("Mimante.slnx not found above " + AppContext.BaseDirectory);
|
||||
}
|
||||
|
||||
internal readonly record struct Rgb(double R, double G, double B)
|
||||
{
|
||||
public static Rgb Parse(string hex)
|
||||
{
|
||||
var h = hex.TrimStart('#');
|
||||
double C(int i) => int.Parse(h.AsSpan(i, 2), NumberStyles.HexNumber, CultureInfo.InvariantCulture) / 255.0;
|
||||
return new Rgb(C(0), C(2), C(4));
|
||||
}
|
||||
|
||||
public double Luminance => 0.2126 * Lin(R) + 0.7152 * Lin(G) + 0.0722 * Lin(B);
|
||||
|
||||
private static double Lin(double c) => c <= 0.04045 ? c / 12.92 : Math.Pow((c + 0.055) / 1.055, 2.4);
|
||||
}
|
||||
|
||||
[GeneratedRegex(@"--([a-z0-9-]+):\s*light-dark\(\s*(#[0-9A-Fa-f]{6})\s*,\s*(#[0-9A-Fa-f]{6})\s*\)")]
|
||||
private static partial Regex PairRegex();
|
||||
|
||||
[GeneratedRegex(@"--([a-z0-9-]+):\s*(#[0-9A-Fa-f]{6})\s*;")]
|
||||
private static partial Regex SingleRegex();
|
||||
|
||||
[GeneratedRegex(@"(?<![\w-])--([a-z0-9-]+)\s*:")]
|
||||
private static partial Regex DefinitionRegex();
|
||||
|
||||
[GeneratedRegex(@"var\(--([a-z0-9-]+)")]
|
||||
private static partial Regex UseRegex();
|
||||
|
||||
[GeneratedRegex(@"#[0-9A-Fa-f]{3,8}\b|\brgba?\(|\bhsla?\(|\blight-dark\(|:\s*(white|black)\b")]
|
||||
private static partial Regex ColourRegex();
|
||||
|
||||
[GeneratedRegex(@"/\*.*?\*/")]
|
||||
private static partial Regex CommentRegex();
|
||||
}
|
||||
Reference in new issue
Block a user