You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-27 05:11:11 +02:00
feat(web): rework context menus: add icons and reorder items (#8090)
This commit is contained in:
@ -23,12 +23,14 @@
|
||||
<div
|
||||
transition:slide={{ duration: 200, easing: quintOut }}
|
||||
bind:this={menuElement}
|
||||
class="absolute z-10 w-[200px] overflow-hidden rounded-lg shadow-lg"
|
||||
class="absolute z-10 min-w-[200px] w-max max-w-[300px] overflow-hidden rounded-lg shadow-lg"
|
||||
style="left: {left}px; top: {top}px;"
|
||||
role="menu"
|
||||
use:clickOutside
|
||||
on:outclick
|
||||
on:escape
|
||||
>
|
||||
<slot />
|
||||
<div class="flex flex-col rounded-lg">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +1,9 @@
|
||||
<script>
|
||||
import Icon from '$lib/components/elements/icon.svelte';
|
||||
|
||||
export let text = '';
|
||||
export let subtitle = '';
|
||||
export let icon = '';
|
||||
</script>
|
||||
|
||||
<button
|
||||
@ -9,7 +12,14 @@
|
||||
role="menuitem"
|
||||
>
|
||||
{#if text}
|
||||
{text}
|
||||
{#if icon}
|
||||
<p class="flex gap-2">
|
||||
<Icon path={icon} size="18" />
|
||||
{text}
|
||||
</p>
|
||||
{:else}
|
||||
{text}
|
||||
{/if}
|
||||
{:else}
|
||||
<slot />
|
||||
{/if}
|
||||
|
Reference in New Issue
Block a user