1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

Fix: Disable 'As profile picture' option for videos in context menu a… (#7830)

* Fix: Disable 'As profile picture' option for videos in context menu asset-viewer-nav-bar.svelte

This commit modifies the context menu behavior to disable the "As profile picture" option when interacting with video assets. Previously, the option was available for all asset types, including videos, which could lead to confusion when this displayed an error.

With this change, the "As profile picture" option is conditionally rendered based on the asset type. If the asset is a video, the option is not displayed in the context menu.

This adjustment enhances the web experience by preventing users from attempting to set a video as their profile picture, which is not supported by the system.

Fixes: #7724

* Switched to check if photo instead of video
This commit is contained in:
DeclanE 2024-03-10 22:32:27 +00:00 committed by GitHub
parent d257cdcbbf
commit e5978981f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -186,7 +186,9 @@
on:click={() => dispatch('toggleArchive')}
text={asset.isArchived ? 'Unarchive' : 'Archive'}
/>
<MenuOption on:click={() => onMenuClick('asProfileImage')} text="As profile picture" />
{#if asset.type === AssetTypeEnum.Image}
<MenuOption on:click={() => onMenuClick('asProfileImage')} text="As profile picture" />
{/if}
{#if hasStackChildren}
<MenuOption on:click={() => onMenuClick('unstack')} text="Un-Stack" />