You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-23 04:38:12 +02: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:
@ -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}
|
||||
|
Reference in New Issue
Block a user