mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web): better context menu position (#4271)
* feat(web): better context menu position * fix: album context menu * fix: add middle variant * fix: rest of context menus * fix: linting error
This commit is contained in:
parent
3e73cfb71a
commit
68d6d89a3b
8 changed files with 40 additions and 29 deletions
|
|
@ -18,6 +18,7 @@
|
|||
import Portal from '../shared-components/portal/portal.svelte';
|
||||
import ContextMenu from '../shared-components/context-menu/context-menu.svelte';
|
||||
import MenuOption from '../shared-components/context-menu/menu-option.svelte';
|
||||
import { getContextMenuPosition } from '$lib/utils/context-menu';
|
||||
|
||||
let libraries: LibraryResponseDto[] = [];
|
||||
|
||||
|
|
@ -60,8 +61,8 @@
|
|||
}
|
||||
};
|
||||
|
||||
const showMenu = ({ x, y }: MouseEvent, type: LibraryType) => {
|
||||
contextMenuPosition = { x, y };
|
||||
const showMenu = (event: MouseEvent, type: LibraryType) => {
|
||||
contextMenuPosition = getContextMenuPosition(event);
|
||||
showContextMenu = !showContextMenu;
|
||||
libraryType = type;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue