From a9dd013daf4dced6a82152b3e3b5ca33db1825fc Mon Sep 17 00:00:00 2001 From: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> Date: Thu, 18 Jul 2024 20:13:45 +0200 Subject: [PATCH] fix(web): hide license popup after mouse leave (#11193) --- .../side-bar/license-info.svelte | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/web/src/lib/components/shared-components/side-bar/license-info.svelte b/web/src/lib/components/shared-components/side-bar/license-info.svelte index 62e793a27f..eaa099b2a4 100644 --- a/web/src/lib/components/shared-components/side-bar/license-info.svelte +++ b/web/src/lib/components/shared-components/side-bar/license-info.svelte @@ -10,15 +10,31 @@ import { goto } from '$app/navigation'; import { AppRoute } from '$lib/constants'; import { getAccountAge } from '$lib/utils/auth'; + import { fade } from 'svelte/transition'; let showMessage = false; let isOpen = false; + let hoverMessage = false; + let hoverButton = false; const { isLicenseActivated } = licenseStore; const openLicenseModal = () => { isOpen = true; showMessage = false; }; + + const onButtonHover = () => { + showMessage = true; + hoverButton = true; + }; + + $: if (showMessage && !hoverMessage && !hoverButton) { + setTimeout(() => { + if (!hoverMessage && !hoverButton) { + showMessage = false; + } + }, 300); + } {#if isOpen} @@ -41,7 +57,10 @@