[ui] don't show groups unless there are some
parent
2f664ce820
commit
6d25de5b56
|
@ -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} />
|
||||
|
|
Loading…
Reference in New Issue