Don't show "Filter" button when no branhes (#4093)

This commit is contained in:
Pavel Laptev 2024-06-16 15:19:32 +02:00 committed by GitHub
parent 81f683777e
commit c83dec6bca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,22 +24,24 @@
<Badge {count} />
{/if}
</div>
<div class="header__filter-btn" bind:this={filterButton}>
<Button
style="ghost"
outline
icon={filtersActive ? 'filter-applied-small' : 'filter-small'}
on:mousedown={onFilterClick}
>
Filter
</Button>
<div
class="filter-popup-menu"
use:clickOutside={{ trigger: filterButton, handler: () => (visible = false) }}
>
<slot name="context-menu" {visible} />
{#if count && count > 0}
<div class="header__filter-btn" bind:this={filterButton}>
<Button
style="ghost"
outline
icon={filtersActive ? 'filter-applied-small' : 'filter-small'}
on:mousedown={onFilterClick}
>
Filter
</Button>
<div
class="filter-popup-menu"
use:clickOutside={{ trigger: filterButton, handler: () => (visible = false) }}
>
<slot name="context-menu" {visible} />
</div>
</div>
</div>
{/if}
</div>
<style lang="postcss">