fix(web): missing add photos button in album when viewed as owner (#9183)

This commit is contained in:
Alex 2024-04-30 15:38:25 -05:00 committed by GitHub
parent 926de96ce6
commit 2cf63eeeab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -138,7 +138,10 @@
$: showActivityStatus =
album.sharedUsers.length > 0 && !$showAssetViewer && (album.isActivityEnabled || $numberOfComments > 0);
$: isEditor = album.albumUsers.find(({ user: { id } }) => id === $user.id)?.role === AlbumUserRole.Editor;
$: isEditor =
album.albumUsers.find(({ user: { id } }) => id === $user.id)?.role === AlbumUserRole.Editor ||
album.ownerId === $user.id;
$: albumHasViewers = album.albumUsers.some(({ role }) => role === AlbumUserRole.Viewer);
afterNavigate(({ from }) => {