From c8c39930b5bc47051bc28226b1c904e0e71cafe2 Mon Sep 17 00:00:00 2001 From: ulsklyc Date: Thu, 26 Mar 2026 07:23:15 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20FAB=20auch=20auf=20der=20Einkaufsseite?= =?UTF-8?q?=20hinzuf=C3=BCgen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Blauer Plus-FAB unten rechts auf Mobile - Fokussiert das Quick-Add-Eingabefeld und scrollt es ins Sichtfeld - Erstellt eine neue Liste, wenn noch keine vorhanden ist - Service Worker Cache v14 Co-Authored-By: Claude Opus 4.6 --- public/pages/shopping.js | 14 ++++++++++++++ public/sw.js | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/public/pages/shopping.js b/public/pages/shopping.js index c81636e..ae405ba 100644 --- a/public/pages/shopping.js +++ b/public/pages/shopping.js @@ -555,6 +555,9 @@ export async function render(container, { user }) {
+
`; @@ -562,4 +565,15 @@ export async function render(container, { user }) { wireTabBar(container); renderListContent(container); wireListContentEvents(container); + + container.querySelector('#fab-new-item')?.addEventListener('click', () => { + const input = container.querySelector('#item-name-input'); + if (input) { + input.scrollIntoView({ behavior: 'smooth', block: 'center' }); + input.focus(); + } else { + // Keine Liste aktiv → neue Liste erstellen + container.querySelector('[data-action="new-list"]')?.click(); + } + }); } diff --git a/public/sw.js b/public/sw.js index fd5eecb..b80d983 100644 --- a/public/sw.js +++ b/public/sw.js @@ -12,9 +12,9 @@ * API: Immer Netzwerk (kein Caching von Nutzerdaten) */ -const SHELL_CACHE = 'oikos-shell-v13'; -const PAGES_CACHE = 'oikos-pages-v13'; -const ASSETS_CACHE = 'oikos-assets-v13'; +const SHELL_CACHE = 'oikos-shell-v14'; +const PAGES_CACHE = 'oikos-pages-v14'; +const ASSETS_CACHE = 'oikos-assets-v14'; const ALL_CACHES = [SHELL_CACHE, PAGES_CACHE, ASSETS_CACHE]; // App-Shell: sofort benötigt für ersten Render