Skip to main content
Sign in
Snippets Groups Projects
Commit 5d0fd672 authored by Dorine Lambinet's avatar Dorine Lambinet Committed by David Smadja
Browse files

Laisse les boutons en sticky quand on scroll

parent c8507f77
No related branches found
No related tags found
1 merge request!329Permettre d'ouvrir / fermer tous les paramètres
...@@ -224,18 +224,33 @@ ...@@ -224,18 +224,33 @@
</div> </div>
{/if} {/if}
<div <div
class="border-t px-2 pt-4 sm:px-3" class="border-t pt-4"
class:mt-5={billDecomposition?.children !== undefined} class:mt-5={billDecomposition?.children !== undefined}
></div> ></div>
<div class="pl-4 pr-2 sm:px-4"> <div class="relative bg-white pl-12 pr-2 sm:px-4">
<div class="flex items-center"> <!-- Pictos absolus + sticky -->
<div class="absolute left-0 top-2 h-full pl-1.5 pr-2">
<div class="sticky top-2 flex flex-col items-start gap-1">
{#if loadingAllParameters}
<!-- Loader unique à la place des deux pictos -->
<button
class="flex items-center text-xs uppercase tracking-wide text-neutral-400"
disabled
>
<!-- svelte-ignore element_invalid_self_closing_tag -->
<iconify-icon
icon="ri-loader-4-line"
class="mr-1 animate-spin text-base"
/>
</button>
{:else}
<!-- Bouton "Ouvrir tout" --> <!-- Bouton "Ouvrir tout" -->
<button <button
aria-label="Ouvrir tout" aria-label="Ouvrir tout"
title="Ouvrir tout" title="Ouvrir tout"
class="flex items-center text-xs uppercase tracking-wide text-neutral-500 hover:text-le-gris-dispositif-dark" class="flex cursor-pointer items-center bg-white text-xs uppercase tracking-wide text-neutral-500 hover:text-le-gris-dispositif-dark"
disabled={loadingAllParameters || openAllParameters} disabled={openAllParameters}
onclick={async () => { onclick={async () => {
loadingAllParameters = true loadingAllParameters = true
await new Promise((resolve) => setTimeout(resolve, 500)) await new Promise((resolve) => setTimeout(resolve, 500))
...@@ -243,18 +258,16 @@ ...@@ -243,18 +258,16 @@
loadingAllParameters = false loadingAllParameters = false
}} }}
> >
{#if !loadingAllParameters}
<iconify-icon icon="ri-folder-open-line" class="mr-1 text-base" <iconify-icon icon="ri-folder-open-line" class="mr-1 text-base"
></iconify-icon> ></iconify-icon>
{/if}
</button> </button>
<!-- Bouton "Fermer tout" --> <!-- Bouton "Fermer tout" -->
<button <button
aria-label="Fermer tout" aria-label="Fermer tout"
title="Fermer tout" title="Fermer tout"
class="flex items-center text-xs uppercase tracking-wide text-neutral-500 hover:text-le-gris-dispositif-dark" class="flex cursor-pointer items-center bg-white text-xs uppercase tracking-wide text-neutral-500 hover:text-le-gris-dispositif-dark"
disabled={loadingAllParameters || !openAllParameters} disabled={!openAllParameters}
onclick={async () => { onclick={async () => {
loadingAllParameters = true loadingAllParameters = true
await new Promise((resolve) => setTimeout(resolve, 500)) await new Promise((resolve) => setTimeout(resolve, 500))
...@@ -262,21 +275,12 @@ ...@@ -262,21 +275,12 @@
loadingAllParameters = false loadingAllParameters = false
}} }}
> >
{#if !loadingAllParameters}
<iconify-icon icon="ri-folder-reduce-line" class="mr-1 text-base" <iconify-icon icon="ri-folder-reduce-line" class="mr-1 text-base"
></iconify-icon> ></iconify-icon>
{/if}
</button> </button>
<!-- Loader commun -->
{#if loadingAllParameters}
<iconify-icon
icon="ri-loader-4-line"
class="animate-spin text-base text-neutral-400"
></iconify-icon>
{/if} {/if}
</div> </div>
</div>
{#if Object.keys(bothRootDirectParameterById).length > 0} {#if Object.keys(bothRootDirectParameterById).length > 0}
<section class="mb-2 border-b pb-4"> <section class="mb-2 border-b pb-4">
<ul> <ul>
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment