From 7e9d4349af4300c7aa7b6684fde008450aa210ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 21 Apr 2024 22:02:24 +0200 Subject: [PATCH] feat(webui): upload to groups via EntityList (finishes #21) --- webui/src/lib/components/AddModal.svelte | 7 +++ .../lib/components/widgets/EntityList.svelte | 60 ++++++++++++------- 2 files changed, 47 insertions(+), 20 deletions(-) diff --git a/webui/src/lib/components/AddModal.svelte b/webui/src/lib/components/AddModal.svelte index 3d7220e..d443de7 100644 --- a/webui/src/lib/components/AddModal.svelte +++ b/webui/src/lib/components/AddModal.svelte @@ -1,10 +1,12 @@ @@ -44,6 +46,10 @@ }); }); + addEmitter.on('destination', (ev) => { + destination = ev; + }); + function onDestinationSelected(ev: CustomEvent) { if (ev.detail?.t === 'Address') { destination = ev.detail.c; @@ -180,6 +186,7 @@
{$i18n.t('Destination')}
{#if adding} - { - if (!ev.detail) { - adding = false; - } - }} - /> +
+ { + if (!ev.detail) { + adding = false; + } + }} + /> +
{:else} - { - adding = true; - }} - /> +
+ { + adding = true; + }} + /> +
+ {#if address} + addEmitter.emit('destination', address || '')} + /> + {/if} {/if}
{/if} @@ -318,7 +332,13 @@ .add { display: flex; - flex-direction: column; + gap: 0.5em; + + & .main { + display: flex; + flex-direction: column; + flex-grow: 1; + } } .entitylist.style-grid .add {