diff --git a/ka-note/VERSION b/ka-note/VERSION index ea34ceb..be2b557 100644 --- a/ka-note/VERSION +++ b/ka-note/VERSION @@ -1 +1 @@ -1.2.26 \ No newline at end of file +1.2.28 \ No newline at end of file diff --git a/ka-note/client/src/routes/+layout.svelte b/ka-note/client/src/routes/+layout.svelte index 96cf42d..3904d0b 100644 --- a/ka-note/client/src/routes/+layout.svelte +++ b/ka-note/client/src/routes/+layout.svelte @@ -11,6 +11,8 @@ import { refreshLockStatus } from "$lib/stores/aiLock"; import { onMount, onDestroy } from "svelte"; import { afterNavigate } from "$app/navigation"; + import { page } from "$app/state"; + const isCaptureMode = $derived(page.url.pathname.startsWith('/inventory/capture')); import type { Snippet } from "svelte"; import { handleRedirect, @@ -199,7 +201,7 @@ -
+
- - {#if !sidebarOpen} + + {#if !sidebarOpen && !isCaptureMode} {/if} diff --git a/ka-note/client/src/routes/inventory/capture/photo/+page.svelte b/ka-note/client/src/routes/inventory/capture/photo/+page.svelte index 3308fac..8373130 100644 --- a/ka-note/client/src/routes/inventory/capture/photo/+page.svelte +++ b/ka-note/client/src/routes/inventory/capture/photo/+page.svelte @@ -29,6 +29,14 @@ let pendingImageId = $state(null); let capturedPreview = $state(null); let error = $state(''); + let snackbar = $state(''); + let snackbarTimer: ReturnType | null = null; + + function showSnackbar(msg: string) { + snackbar = msg; + if (snackbarTimer) clearTimeout(snackbarTimer); + snackbarTimer = setTimeout(() => { snackbar = ''; }, 2500); + } // Camera stream let videoEl = $state(null); @@ -121,6 +129,11 @@ captureState = 'shooting'; // ready for more photos of same item } + async function saveAndNextWithFeedback() { + await saveAndNext(); + showSnackbar('✓ Gespeichert — bereit für nächsten Gegenstand'); + } + async function saveAndNext() { if (!pendingItem && !(captureState === 'confirm' && recognized)) return; const label = pendingItem?.label ?? recognized!.label; @@ -214,7 +227,7 @@ {:else}
-
+
@@ -306,12 +319,19 @@ {/if}
+ + {#if snackbar} +
+ {snackbar} +
+ {/if} + -
+