1
0
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:
Alex
2022-07-24 22:47:12 -05:00
committed by GitHub
parent 9c3f848fa8
commit 969f770df0
6 changed files with 109 additions and 15 deletions

View File

@ -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')}

View File

@ -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}