mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-17 13:54:11 +00:00
Hide Viewlet selector for just one element (#581)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
21b2d3e2bd
commit
18613428e5
@ -63,18 +63,19 @@ function onSearch(ev: Event) {
|
||||
<div class="flex-between toolbar">
|
||||
<EditWithIcon icon={IconSearch} placeholder={'Search'} on:change={onSearch}/>
|
||||
|
||||
<div class="flex">
|
||||
{#each viewlets as viewlet, i}
|
||||
<div class="flex-center btn" class:selected={selected === i} on:click={()=>{ selected = i }}>
|
||||
<div class="icon">
|
||||
<Tooltip label={viewlet.$lookup?.descriptor?.label} direction={'top'}>
|
||||
<Icon icon={viewlet.$lookup?.descriptor?.icon} size={'small'}/>
|
||||
</Tooltip>
|
||||
{#if viewlets.length > 1}
|
||||
<div class="flex">
|
||||
{#each viewlets as viewlet, i}
|
||||
<div class="flex-center btn" class:selected={selected === i} on:click={()=>{ selected = i }}>
|
||||
<div class="icon">
|
||||
<Tooltip label={viewlet.$lookup?.descriptor?.label} direction={'top'}>
|
||||
<Icon icon={viewlet.$lookup?.descriptor?.icon} size={'small'}/>
|
||||
</Tooltip>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user