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