From 1722e70e7f8fbedee25f26224b66e4283ffb8175 Mon Sep 17 00:00:00 2001 From: Ulas Date: Sun, 5 Apr 2026 13:23:16 +0200 Subject: [PATCH] fix(ux): microinteraction fixes - swipe hint, locale loading, haptics, weather toast, FAB backdrop - tasks.js: add maybeShowSwipeHint (long loop, max 3x) - matches shopping.js pattern - tasks.js: vibrate(15) on task status toggle - oikos-locale-picker: show disabled/loading state for both reload and setLocale paths - dashboard: show success toast after weather refresh (all 4 locales) - dashboard: add semi-transparent FAB backdrop to signal open mode --- public/components/oikos-locale-picker.js | 4 ++-- public/locales/de.json | 1 + public/locales/en.json | 1 + public/locales/it.json | 1 + public/locales/sv.json | 1 + public/pages/dashboard.js | 9 ++++++-- public/pages/tasks.js | 26 ++++++++++++++++++++++++ public/styles/dashboard.css | 15 ++++++++++++++ 8 files changed, 54 insertions(+), 4 deletions(-) diff --git a/public/components/oikos-locale-picker.js b/public/components/oikos-locale-picker.js index 394c07b..fe8fd8c 100644 --- a/public/components/oikos-locale-picker.js +++ b/public/components/oikos-locale-picker.js @@ -54,9 +54,9 @@ class OikosLocalePicker extends HTMLElement { } select.addEventListener('change', () => { + select.disabled = true; + select.style.opacity = '0.5'; if (select.value === 'system') { - select.disabled = true; - select.style.opacity = '0.5'; localStorage.removeItem('oikos-locale'); // Kurze Verzögerung damit der Browser den disabled-Zustand rendert setTimeout(() => location.reload(), 60); diff --git a/public/locales/de.json b/public/locales/de.json index 4d895c0..b3b2f8c 100644 --- a/public/locales/de.json +++ b/public/locales/de.json @@ -65,6 +65,7 @@ "loadError": "Dashboard konnte nicht vollständig geladen werden.", "weatherRefresh": "Wetter aktualisieren", "weatherRefreshTitle": "Aktualisieren", + "weatherUpdated": "Wetter aktualisiert", "weatherFeelsLike": "Gefühlt {{temp}}° · {{humidity}}% · Wind {{wind}} km/h", "fabTaskLabel": "Aufgabe hinzufügen", "fabCalendarLabel": "Termin hinzufügen", diff --git a/public/locales/en.json b/public/locales/en.json index 71891f8..f441e44 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -65,6 +65,7 @@ "loadError": "Dashboard could not be fully loaded.", "weatherRefresh": "Refresh weather", "weatherRefreshTitle": "Refresh", + "weatherUpdated": "Weather updated", "weatherFeelsLike": "Feels like {{temp}}° · {{humidity}}% · Wind {{wind}} km/h", "fabTaskLabel": "Add task", "fabCalendarLabel": "Add event", diff --git a/public/locales/it.json b/public/locales/it.json index fdff221..70818a2 100644 --- a/public/locales/it.json +++ b/public/locales/it.json @@ -65,6 +65,7 @@ "loadError": "Impossibile caricare completamente la dashboard.", "weatherRefresh": "Aggiorna meteo", "weatherRefreshTitle": "Aggiorna", + "weatherUpdated": "Meteo aggiornato", "weatherFeelsLike": "Percepiti {{temp}}° · {{humidity}}% · Vento {{wind}} km/h", "fabTaskLabel": "Aggiungi compito", "fabCalendarLabel": "Aggiungi evento", diff --git a/public/locales/sv.json b/public/locales/sv.json index 3b364c2..a7c43a5 100644 --- a/public/locales/sv.json +++ b/public/locales/sv.json @@ -65,6 +65,7 @@ "loadError": "Instrumentpanelen kunde inte laddas helt.", "weatherRefresh": "Uppdatera vädret", "weatherRefreshTitle": "Uppdatera", + "weatherUpdated": "Väder uppdaterat", "weatherFeelsLike": "Känns som {{temp}}° · {{humidity}}% · Vind {{wind}} km/h", "fabTaskLabel": "Lägg till uppgift", "fabCalendarLabel": "Lägg till händelse", diff --git a/public/pages/dashboard.js b/public/pages/dashboard.js index 90ce761..3d4f195 100644 --- a/public/pages/dashboard.js +++ b/public/pages/dashboard.js @@ -390,6 +390,7 @@ function renderFab() { `).join(''); return ` +