From ea4f05dc118ced62b69152b4702ccffa5397f1ed Mon Sep 17 00:00:00 2001 From: Till JS Date: Fri, 10 Apr 2026 17:40:28 +0200 Subject: [PATCH] feat(inventory): add quick item creation to workbench ListView MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds a "Gegenstand hinzufügen" button that expands into an inline form with a collection picker dropdown and name input. Items are created directly via itemsStore.create() without leaving the workbench panel. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/lib/modules/inventory/ListView.svelte | 151 +++++++++++++++++- 1 file changed, 150 insertions(+), 1 deletion(-) diff --git a/apps/mana/apps/web/src/lib/modules/inventory/ListView.svelte b/apps/mana/apps/web/src/lib/modules/inventory/ListView.svelte index 2e0deaf9f..c0e65ff25 100644 --- a/apps/mana/apps/web/src/lib/modules/inventory/ListView.svelte +++ b/apps/mana/apps/web/src/lib/modules/inventory/ListView.svelte @@ -1,13 +1,15 @@ c.id} emptyTitle="Keine Sammlungen"> @@ -39,6 +63,43 @@ {/if} {/snippet} + {#snippet listHeader()} + {#if collections.length > 0} + {#if showAdd} +
{ + e.preventDefault(); + addItem(); + }} + class="quick-add" + > + + + + +
+ {:else} + + {/if} + {/if} + {/snippet} + {#snippet item(collection)} {/snippet}
+ +