fix(web): accountinfopanel not closing on button press (#2276)

* fix accountinfopanel not closing on button press

* remove overcomplicated logic
replace with simpler logic and only one outside listener

* remove keydown

---------

Co-authored-by: faupau03 <paul.paffe@gmx.net>
This commit is contained in:
faupau 2023-04-18 17:02:51 +02:00 committed by GitHub
parent 137d246d6a
commit d45ff72c9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 24 deletions

View file

@ -1,5 +1,4 @@
<script lang="ts">
import { clickOutside } from '$lib/utils/click-outside';
import { UserResponseDto } from '@api';
import { createEventDispatcher } from 'svelte';
import { page } from '$app/stores';
@ -26,8 +25,6 @@
out:fade={{ duration: 100 }}
id="account-info-panel"
class="absolute right-[25px] top-[75px] bg-gray-200 dark:bg-immich-dark-gray dark:border dark:border-immich-dark-gray shadow-lg rounded-3xl w-[360px] text-center z-[100]"
use:clickOutside
on:outclick={() => dispatch('close')}
>
<div class="bg-white dark:bg-immich-dark-primary/10 rounded-3xl mx-4 mt-4 pb-4">
<div class="flex place-items-center place-content-center">