UX: filterview: move 'enable all' and 'disable all' into header by request of user

This commit is contained in:
Pieter Vander Vennet 2024-07-21 10:33:44 +02:00
parent 2739bc4460
commit 09f531d308
2 changed files with 34 additions and 29 deletions

View file

@ -993,6 +993,10 @@ video {
margin-right: 4rem; margin-right: 4rem;
} }
.mb-4 {
margin-bottom: 1rem;
}
.mt-4 { .mt-4 {
margin-top: 1rem; margin-top: 1rem;
} }
@ -1025,10 +1029,6 @@ video {
margin-right: 0.25rem; margin-right: 0.25rem;
} }
.mb-4 {
margin-bottom: 1rem;
}
.ml-1 { .ml-1 {
margin-left: 0.25rem; margin-left: 0.25rem;
} }
@ -1041,6 +1041,10 @@ video {
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
} }
.mr-10 {
margin-right: 2.5rem;
}
.mb-1\.5 { .mb-1\.5 {
margin-bottom: 0.375rem; margin-bottom: 0.375rem;
} }
@ -1217,14 +1221,14 @@ video {
height: 6rem; height: 6rem;
} }
.h-full {
height: 100%;
}
.h-screen { .h-screen {
height: 100vh; height: 100vh;
} }
.h-full {
height: 100%;
}
.h-fit { .h-fit {
height: -webkit-fit-content; height: -webkit-fit-content;
height: -moz-fit-content; height: -moz-fit-content;
@ -2019,6 +2023,10 @@ video {
row-gap: 0.5rem; row-gap: 0.5rem;
} }
.gap-x-2 {
column-gap: 0.5rem;
}
.gap-x-1 { .gap-x-1 {
column-gap: 0.25rem; column-gap: 0.25rem;
} }
@ -2031,10 +2039,6 @@ video {
column-gap: 0px; column-gap: 0px;
} }
.gap-x-2 {
column-gap: 0.5rem;
}
.gap-y-8 { .gap-y-8 {
row-gap: 2rem; row-gap: 2rem;
} }
@ -3461,18 +3465,14 @@ video {
padding-right: 1rem; padding-right: 1rem;
} }
.pl-5 { .pl-3 {
padding-left: 1.25rem; padding-left: 0.75rem;
} }
.pr-3 { .pr-3 {
padding-right: 0.75rem; padding-right: 0.75rem;
} }
.pl-3 {
padding-left: 0.75rem;
}
.pl-1 { .pl-1 {
padding-left: 0.25rem; padding-left: 0.25rem;
} }

View file

@ -48,11 +48,24 @@
</script> </script>
<TitledPanel> <TitledPanel>
<div class="flex" slot="title"> <div class="flex items-center justify-between w-full mr-10" slot="title">
<div class="flex">
<Filter class="h-6 w-6 pr-2" /> <Filter class="h-6 w-6 pr-2" />
<Tr t={Translations.t.general.menu.filter} /> <Tr t={Translations.t.general.menu.filter} />
</div> </div>
<div class="flex self-end text-sm gap-x-2">
<button class="small as-link" class:disabled={allEnabled} on:click={() => enableAll(true)}>
<Tr t={Translations.t.general.filterPanel.enableAll} />
</button>
<button class="small as-link" class:disabled={allDisabled} on:click={() => enableAll(false)}>
<Tr t={Translations.t.general.filterPanel.disableAll} />
</button>
</div>
</div>
{#each layout.layers as layer} {#each layout.layers as layer}
<Filterview <Filterview
zoomlevel={state.mapProperties.zoom} zoomlevel={state.mapProperties.zoom}
@ -60,14 +73,6 @@
highlightedLayer={state.guistate.highlightedLayerInFilters} highlightedLayer={state.guistate.highlightedLayerInFilters}
/> />
{/each} {/each}
<div class="mt-1 flex self-end">
<button class="small" class:disabled={allEnabled} on:click={() => enableAll(true)}>
<Tr t={Translations.t.general.filterPanel.enableAll} />
</button>
<button class="small" class:disabled={allDisabled} on:click={() => enableAll(false)}>
<Tr t={Translations.t.general.filterPanel.disableAll} />
</button>
</div>
{#each layout.tileLayerSources as tilesource} {#each layout.tileLayerSources as tilesource}
<OverlayToggle <OverlayToggle