Skip to content
Snippets Groups Projects
Commit c8507f77 authored by Dorine Lambinet's avatar Dorine Lambinet Committed by David Smadja
Browse files

Affiche deux boutons au lieu d'un seul, pour le cas où une personne a tout...

Affiche deux boutons au lieu d'un seul, pour le cas où une personne a tout ouvert et souhaite tout refermer
parent 767e598a
No related branches found
No related tags found
1 merge request!329Permettre d'ouvrir / fermer tous les paramètres
......@@ -229,26 +229,53 @@
></div>
<div class="pl-4 pr-2 sm:px-4">
<!-- Bouton toggle "Ouvrir tout / Fermer tout" -->
<div class="flex items-center">
<!-- Bouton "Ouvrir tout" -->
<button
aria-label={openAllParameters ? "Fermer tout" : "Ouvrir tout"}
class="mb-2 ml-2 flex items-center text-xs uppercase tracking-wide text-neutral-500 hover:text-le-gris-dispositif-dark"
onclick={toggleOpenAllParameters}
aria-label="Ouvrir tout"
title="Ouvrir tout"
class="flex items-center text-xs uppercase tracking-wide text-neutral-500 hover:text-le-gris-dispositif-dark"
disabled={loadingAllParameters || openAllParameters}
onclick={async () => {
loadingAllParameters = true
await new Promise((resolve) => setTimeout(resolve, 500))
openAllParameters = true
loadingAllParameters = false
}}
>
{#if !loadingAllParameters}
<iconify-icon icon="ri-folder-open-line" class="mr-1 text-base"
></iconify-icon>
{/if}
</button>
<!-- Bouton "Fermer tout" -->
<button
aria-label="Fermer tout"
title="Fermer tout"
class="flex items-center text-xs uppercase tracking-wide text-neutral-500 hover:text-le-gris-dispositif-dark"
disabled={loadingAllParameters || !openAllParameters}
onclick={async () => {
loadingAllParameters = true
await new Promise((resolve) => setTimeout(resolve, 500))
openAllParameters = false
loadingAllParameters = false
}}
>
{#if !loadingAllParameters}
<iconify-icon icon="ri-folder-reduce-line" class="mr-1 text-base"
></iconify-icon>
{/if}
</button>
<!-- Loader commun -->
{#if loadingAllParameters}
<iconify-icon
icon="ri-loader-4-line"
class="mr-1 animate-spin text-base text-neutral-400"
></iconify-icon>
{:else}
<iconify-icon
icon={openAllParameters
? "ri-folder-reduce-line"
: "ri-folder-open-line"}
class="mr-1 text-base"
class="animate-spin text-base text-neutral-400"
></iconify-icon>
{/if}
</button>
</div>
{#if Object.keys(bothRootDirectParameterById).length > 0}
<section class="mb-2 border-b pb-4">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment