feat: FAB auch auf der Einkaufsseite hinzufügen
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -555,6 +555,9 @@ export async function render(container, { user }) {
|
|||||||
<div class="shopping-page">
|
<div class="shopping-page">
|
||||||
<div class="list-tabs-bar" id="list-tabs-bar"></div>
|
<div class="list-tabs-bar" id="list-tabs-bar"></div>
|
||||||
<div id="list-content" style="flex:1;display:flex;flex-direction:column;overflow:hidden"></div>
|
<div id="list-content" style="flex:1;display:flex;flex-direction:column;overflow:hidden"></div>
|
||||||
|
<button class="page-fab" id="fab-new-item" aria-label="Artikel hinzufügen">
|
||||||
|
<i data-lucide="plus" style="width:24px;height:24px"></i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@@ -562,4 +565,15 @@ export async function render(container, { user }) {
|
|||||||
wireTabBar(container);
|
wireTabBar(container);
|
||||||
renderListContent(container);
|
renderListContent(container);
|
||||||
wireListContentEvents(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();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -12,9 +12,9 @@
|
|||||||
* API: Immer Netzwerk (kein Caching von Nutzerdaten)
|
* API: Immer Netzwerk (kein Caching von Nutzerdaten)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const SHELL_CACHE = 'oikos-shell-v13';
|
const SHELL_CACHE = 'oikos-shell-v14';
|
||||||
const PAGES_CACHE = 'oikos-pages-v13';
|
const PAGES_CACHE = 'oikos-pages-v14';
|
||||||
const ASSETS_CACHE = 'oikos-assets-v13';
|
const ASSETS_CACHE = 'oikos-assets-v14';
|
||||||
const ALL_CACHES = [SHELL_CACHE, PAGES_CACHE, ASSETS_CACHE];
|
const ALL_CACHES = [SHELL_CACHE, PAGES_CACHE, ASSETS_CACHE];
|
||||||
|
|
||||||
// App-Shell: sofort benötigt für ersten Render
|
// App-Shell: sofort benötigt für ersten Render
|
||||||
|
|||||||
Reference in New Issue
Block a user