feat(web): rework context menus: add icons and reorder items (#8090)

This commit is contained in:
Ethan Margaillan
2024-03-21 19:39:33 +01:00
committed by GitHub
parent 1abb0bdae8
commit 8ed6ed4d2b
23 changed files with 204 additions and 84 deletions
@@ -11,6 +11,7 @@
import { createAlbum, type AlbumResponseDto } from '@immich/sdk';
import { getMenuContext } from '../asset-select-context-menu.svelte';
import { getAssetControlContext } from '../asset-select-control-bar.svelte';
import { mdiImageAlbum, mdiShareVariantOutline } from '@mdi/js';
export let shared = false;
let showAlbumPicker = false;
@@ -53,7 +54,11 @@
};
</script>
<MenuOption on:click={() => (showAlbumPicker = true)} text={shared ? 'Add to Shared Album' : 'Add to Album'} />
<MenuOption
on:click={() => (showAlbumPicker = true)}
text={shared ? 'Add to shared album' : 'Add to album'}
icon={shared ? mdiShareVariantOutline : mdiImageAlbum}
/>
{#if showAlbumPicker}
<AlbumSelectionModal