High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix(mobile/web): album cover buttons consistency (#27213)
Yaros4ddc288cd1d4
diff --git a/mobile/lib/utils/action_button.utils.dart b/mobile/lib/utils/action_button.utils.dartindex 071956392c..2aad2f264a 100644--- a/mobile/lib/utils/action_button.utils.dart+++ b/mobile/lib/utils/action_button.utils.dart@@ -143,8 +143,7 @@ enum ActionButtonType {!context.isInLockedView && //context.currentAlbum != null,ActionButtonType.setAlbumCover =>- context.isOwner && //- !context.isInLockedView && //+ !context.isInLockedView && //context.currentAlbum != null && //context.selectedCount == 1,ActionButtonType.unstack =>diff --git a/mobile/test/utils/action_button_utils_test.dart b/mobile/test/utils/action_button_utils_test.dartindex b5540f9dc7..9956dfa2d0 100644--- a/mobile/test/utils/action_button_utils_test.dart+++ b/mobile/test/utils/action_button_utils_test.dart@@ -727,7 +727,7 @@ void main() {expect(ActionButtonType.setAlbumCover.shouldShow(context), isTrue);});- test('should not show when not owner', () {+ test('should show when not owner', () {final album = createRemoteAlbum();final context = ActionButtonContext(asset: mergedAsset,@@ -742,7 +742,7 @@ void main() {selectedCount: 1,);- expect(ActionButtonType.setAlbumCover.shouldShow(context), isFalse);+ expect(ActionButtonType.setAlbumCover.shouldShow(context), isTrue);});test('should not show when in locked view', () {diff --git a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelteindex 3b366b8ad8..9a2d36ed95 100644--- a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte+++ b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte@@ -476,13 +476,6 @@<ChangeDate menuItem /><ChangeDescription menuItem /><ChangeLocation menuItem />- {#if assetInteraction.selectedAssets.length === 1}- <MenuOption- text={$t('set_as_album_cover')}- icon={mdiImageOutline}- onClick={() => updateThumbnailUsingCurrentSelection()}- />- {/if}<ArchiveActionmenuItemunarchive={assetInteraction.isAllArchived}@@ -490,6 +483,13 @@/><SetVisibilityAction menuItem onVisibilitySet={handleSetVisibility} />{/if}+ {#if assetInteraction.selectedAssets.length === 1}+ <MenuOption+ text={$t('set_as_album_cover')}+ icon={mdiImageOutline}+ onClick={() => updateThumbnailUsingCurrentSelection()}+ />+ {/if}{#if $preferences.tags.enabled && assetInteraction.isAllUserOwned}<TagAction menuItem />