fix(oxibadge): accept hostnames and FQDNs for the time clock address
Check, format and test / build (push) Successful in 11m10s

The "Edit address" field in Settings only accepted an IPv4 address
(IPV4.test), rejecting a bare hostname (e.g. "timbratore") or FQDN
(e.g. "timbratore.lan") even though the underlying connection (Rust's
ToSocketAddrs) already resolves those fine. Onboarding had no such
restriction. Replaced the IPv4-only check with isValidHost (IPv4 OR a
standard DNS hostname), dropped the numeric-only keyboard hint on that
field, and reworded the labels/placeholder error to not imply IP-only.

Also makes "Edit address" test the connection before accepting it,
instead of saving unconditionally: ActionButton gained a `disabled`
prop so the confirm/cancel buttons can be locked (with a spinner on
confirm) while the test is in flight, and the edit form now only
closes on a successful test, staying open with the raw error shown
otherwise.

Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 14:05:12 +02:00
parent 0c320c39b0
commit da5daf5bca
5 changed files with 50 additions and 21 deletions
+4 -4
View File
@@ -2,8 +2,8 @@
"loading": "Caricamento...",
"onboarding": {
"title": "Benvenuto!",
"subtitle": "Collega Oxibadge al tuo timbratore inserendo il suo indirizzo IP e la porta.",
"host_label": "Indirizzo IP",
"subtitle": "Collega Oxibadge al tuo timbratore inserendo il suo indirizzo e la porta.",
"host_label": "Indirizzo",
"port_label": "Porta",
"hint": "Trovi l'indirizzo nelle impostazioni di rete del timbratore.",
"button": {
@@ -136,9 +136,9 @@
"status_idle": "Non verificato",
"edit_address": "Modifica indirizzo",
"test_connection": "Testa connessione",
"ip_label": "Indirizzo IP",
"ip_label": "Indirizzo",
"port_label": "Porta",
"ip_invalid": "Formato non valido, es. 192.168.1.100",
"ip_invalid": "Formato non valido, es. 192.168.1.100 o timbratore.lan",
"cancel": "Annulla",
"confirm": "Conferma",
"shifts_title": "Turni previsti",