-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add settings option to show user icons on timeline Hide icons from partner image grid Replace with translatable text Remove partner sharing references in shared albums Minor improvements to phrasing in detail view
- Loading branch information
Showing
18 changed files
with
336 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
mobile/lib/widgets/asset_viewer/detail_panel/asset_state_details.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import 'package:easy_localization/easy_localization.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:hooks_riverpod/hooks_riverpod.dart'; | ||
import 'package:immich_mobile/entities/asset.entity.dart'; | ||
import 'package:immich_mobile/entities/store.entity.dart'; | ||
import 'package:immich_mobile/entities/user.entity.dart'; | ||
import 'package:immich_mobile/extensions/build_context_extensions.dart'; | ||
import 'package:immich_mobile/providers/album/current_album.provider.dart'; | ||
import 'package:immich_mobile/services/user.service.dart'; | ||
import 'package:immich_mobile/utils/storage_indicator.dart'; | ||
import 'package:immich_mobile/widgets/common/user_circle_avatar.dart'; | ||
|
||
class AssetStateInfo extends ConsumerWidget { | ||
final Asset asset; | ||
|
||
const AssetStateInfo({ | ||
super.key, | ||
required this.asset, | ||
}); | ||
|
||
@override | ||
Widget build(BuildContext context, WidgetRef ref) { | ||
final textColor = context.isDarkTheme ? Colors.white : Colors.black; | ||
final userService = ref.watch(userServiceProvider); | ||
final isInAlbum = ref.watch(currentAlbumProvider)?.isRemote ?? false; | ||
final User? user = (asset.ownerId == Store.get(StoreKey.currentUser).isarId) | ||
? null | ||
: userService.lookupUserById(asset.ownerId); | ||
|
||
return ListTile( | ||
contentPadding: const EdgeInsets.all(0), | ||
dense: true, | ||
leading: (user == null) | ||
? Icon( | ||
storageIcon(asset), | ||
color: textColor.withAlpha(200), | ||
) | ||
: UserCircleAvatar( | ||
user: user, | ||
radius: 12, | ||
size: 30, | ||
).build(context), | ||
title: Text( | ||
(user == null) | ||
? storageText(asset) | ||
: isInAlbum | ||
? "album_thumbnail_shared_by".tr(args: [user.name]) | ||
: user.name, | ||
style: context.textTheme.labelLarge, | ||
), | ||
subtitle: (user == null || isInAlbum) | ||
? null | ||
: Text( | ||
"storage_asset_partner".tr(), | ||
style: context.textTheme.bodySmall, | ||
), | ||
); | ||
} | ||
} |
Oops, something went wrong.