[ui] don't show groups unless there are some

feat/vaults
Tomáš Mládek 2022-02-04 23:03:05 +01:00
parent 2f664ce820
commit 6d25de5b56
No known key found for this signature in database
GPG Key ID: ED21612889E75EC5
1 changed files with 27 additions and 25 deletions

View File

@ -180,32 +180,34 @@
<Spinner /> <Spinner />
{/if} {/if}
</h2> </h2>
<section class="groups labelborder"> {#if groups?.length}
<header><h3>Groups</h3></header> <section class="groups labelborder">
<div class="content"> <header><h3>Groups</h3></header>
{#each groups as [entryAddress, address]} <div class="content">
<div class="group"> {#each groups as [entryAddress, address]}
<UpObject {address} link /> <div class="group">
{#if editable} <UpObject {address} link />
<IconButton {#if editable}
name="x-circle" <IconButton
on:click={() => removeGroup(entryAddress)} name="x-circle"
on:click={() => removeGroup(entryAddress)}
/>
{/if}
</div>
{/each}
{#if editable}
<div class="selector">
<Selector
type="entity"
bind:value={groupToAdd}
on:input={addGroup}
placeholder="Choose an entity..."
/> />
{/if} </div>
</div> {/if}
{/each} </div>
{#if editable} </section>
<div class="selector"> {/if}
<Selector
type="entity"
bind:value={groupToAdd}
on:input={addGroup}
placeholder="Choose an entity..."
/>
</div>
{/if}
</div>
</section>
</header> </header>
<BlobPreview {address} /> <BlobPreview {address} />
<NotesEditor {address} {editable} on:change={onChange} /> <NotesEditor {address} {editable} on:change={onChange} />