mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
Delete album on web (#373)
* Show context menu * Show context menu at the correct location * Implement delete album button * Delete album within album viewer
This commit is contained in:
parent
9c3f848fa8
commit
969f770df0
6 changed files with 109 additions and 15 deletions
|
|
@ -4,10 +4,20 @@
|
|||
import { quintOut } from 'svelte/easing';
|
||||
import { slide } from 'svelte/transition';
|
||||
|
||||
/**
|
||||
* x coordiante of the context menu.
|
||||
* @type {number}
|
||||
*/
|
||||
export let x: number = 0;
|
||||
|
||||
/**
|
||||
* x coordiante of the context menu.
|
||||
* @type {number}
|
||||
*/
|
||||
export let y: number = 0;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
let menuEl: HTMLElement;
|
||||
|
||||
$: (() => {
|
||||
|
|
@ -24,7 +34,7 @@
|
|||
<div
|
||||
transition:slide={{ duration: 200, easing: quintOut }}
|
||||
bind:this={menuEl}
|
||||
class="absolute bg-white w-[150px] z-[99999] rounded-lg shadow-md"
|
||||
class="absolute bg-white w-[175px] z-[99999] rounded-lg shadow-md"
|
||||
style={`top: ${y}px; left: ${x}px;`}
|
||||
use:clickOutside
|
||||
on:out-click={() => dispatch('clickoutside')}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<button
|
||||
class:disabled={isDisabled}
|
||||
on:click={handleClick}
|
||||
class="bg-white hover:bg-immich-bg transition-all p-4 w-full text-left rounded-lg"
|
||||
class="bg-white hover:bg-immich-bg transition-all p-4 w-full text-left rounded-lg text-sm"
|
||||
>
|
||||
{#if text}
|
||||
{text}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue