diff --git a/web/src/lib/components/admin-page/server-stats/stats-card.svelte b/web/src/lib/components/admin-page/server-stats/stats-card.svelte index 4bb3801375..a3dcdab4b6 100644 --- a/web/src/lib/components/admin-page/server-stats/stats-card.svelte +++ b/web/src/lib/components/admin-page/server-stats/stats-card.svelte @@ -1,8 +1,8 @@ diff --git a/web/src/lib/components/album-page/album-viewer.svelte b/web/src/lib/components/album-page/album-viewer.svelte index a89204517b..10228c1327 100644 --- a/web/src/lib/components/album-page/album-viewer.svelte +++ b/web/src/lib/components/album-page/album-viewer.svelte @@ -330,12 +330,8 @@ } }; - const showAlbumOptionsMenu = (event: CustomEvent) => { - contextMenuPosition = { - x: event.detail.mouseEvent.x, - y: event.detail.mouseEvent.y - }; - + const showAlbumOptionsMenu = ({ x, y }: MouseEvent) => { + contextMenuPosition = { x, y }; isShowAlbumOptions = !isShowAlbumOptions; }; @@ -467,7 +463,7 @@ {#if !isPublicShared} showAlbumOptionsMenu(event)} + on:click={showAlbumOptionsMenu} logo={DotsVertical} /> {/if} diff --git a/web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte b/web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte index 0edf2339fa..b0a479c82e 100644 --- a/web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte +++ b/web/src/lib/components/asset-viewer/asset-viewer-nav-bar.svelte @@ -31,12 +31,8 @@ let contextMenuPosition = { x: 0, y: 0 }; let isShowAssetOptions = false; - const showOptionsMenu = (event: CustomEvent) => { - contextMenuPosition = { - x: event.detail.mouseEvent.x, - y: event.detail.mouseEvent.y - }; - + const showOptionsMenu = ({ x, y }: MouseEvent) => { + contextMenuPosition = { x, y }; isShowAssetOptions = !isShowAssetOptions; }; @@ -101,11 +97,7 @@ {#if isOwner} dispatch('delete')} title="Delete" /> - showOptionsMenu(event)} - title="More" - /> + {/if} diff --git a/web/src/lib/components/shared-components/circle-icon-button.svelte b/web/src/lib/components/shared-components/circle-icon-button.svelte index a2ef07682b..6e85890e15 100644 --- a/web/src/lib/components/shared-components/circle-icon-button.svelte +++ b/web/src/lib/components/shared-components/circle-icon-button.svelte @@ -2,31 +2,21 @@ /** * This is the circle icon component. */ - import { createEventDispatcher } from 'svelte'; + import type Icon from 'svelte-material-icons/AbTesting.svelte'; - // TODO: why any here? - // eslint-disable-next-line @typescript-eslint/no-explicit-any - export let logo: any; + export let logo: typeof Icon; export let backgroundColor = 'transparent'; export let hoverColor = '#e2e7e9'; export let size = '24'; export let title = ''; - let iconButton: HTMLButtonElement; - const dispatch = createEventDispatcher(); - - $: { - if (iconButton) { - iconButton.style.backgroundColor = backgroundColor; - iconButton.style.setProperty('--immich-icon-button-hover-color', hoverColor); - } - } diff --git a/web/src/lib/components/shared-components/side-bar/side-bar-button.svelte b/web/src/lib/components/shared-components/side-bar/side-bar-button.svelte index d5247112cf..18c03301a1 100644 --- a/web/src/lib/components/shared-components/side-bar/side-bar-button.svelte +++ b/web/src/lib/components/shared-components/side-bar/side-bar-button.svelte @@ -1,8 +1,8 @@