1
0
mirror of https://github.com/immich-app/immich.git synced 2025-07-03 05:46:58 +02:00

refactor(web): added types and some small changes (#1722)

This commit is contained in:
Michel Heusschen
2023-02-10 23:17:39 +01:00
committed by GitHub
parent c90dcde7cc
commit bd71e087d4
6 changed files with 20 additions and 49 deletions

View File

@ -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}
<CircleIconButton logo={DeleteOutline} on:click={() => dispatch('delete')} title="Delete" />
<CircleIconButton
logo={DotsVertical}
on:click={(event) => showOptionsMenu(event)}
title="More"
/>
<CircleIconButton logo={DotsVertical} on:click={showOptionsMenu} title="More" />
{/if}
</div>
</div>