mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(mobile): log asyncvalue errors (#5327)
* refactor: scaffoldwhen to log errors during scaffold body render * refactor: onError and onLoading scaffoldbody * refactor: more scaffold body to custom extension * refactor: add skiploadingonrefresh * Snackbar color --------- Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
0fe704c6f9
commit
513f252a0c
26 changed files with 203 additions and 215 deletions
|
|
@ -46,9 +46,11 @@ class SharedLinkItem extends ConsumerWidget {
|
|||
} else if (difference.inHours > 0) {
|
||||
expiresText = "shared_link_expires_hours".plural(difference.inHours);
|
||||
} else if (difference.inMinutes > 0) {
|
||||
expiresText = "shared_link_expires_minutes".plural(difference.inMinutes);
|
||||
expiresText =
|
||||
"shared_link_expires_minutes".plural(difference.inMinutes);
|
||||
} else if (difference.inSeconds > 0) {
|
||||
expiresText = "shared_link_expires_seconds".plural(difference.inSeconds);
|
||||
expiresText =
|
||||
"shared_link_expires_seconds".plural(difference.inSeconds);
|
||||
}
|
||||
}
|
||||
return Text(
|
||||
|
|
@ -85,7 +87,12 @@ class SharedLinkItem extends ConsumerWidget {
|
|||
).then((_) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: const Text("shared_link_clipboard_copied_massage").tr(),
|
||||
content: Text(
|
||||
"shared_link_clipboard_copied_massage",
|
||||
style: context.textTheme.bodyLarge?.copyWith(
|
||||
color: context.primaryColor,
|
||||
),
|
||||
).tr(),
|
||||
duration: const Duration(seconds: 2),
|
||||
),
|
||||
);
|
||||
|
|
@ -162,9 +169,12 @@ class SharedLinkItem extends ConsumerWidget {
|
|||
Widget buildBottomInfo() {
|
||||
return Row(
|
||||
children: [
|
||||
if (sharedLink.allowUpload) buildInfoChip("shared_link_info_chip_upload".tr()),
|
||||
if (sharedLink.allowDownload) buildInfoChip("shared_link_info_chip_download".tr()),
|
||||
if (sharedLink.showMetadata) buildInfoChip("shared_link_info_chip_metadata".tr()),
|
||||
if (sharedLink.allowUpload)
|
||||
buildInfoChip("shared_link_info_chip_upload".tr()),
|
||||
if (sharedLink.allowDownload)
|
||||
buildInfoChip("shared_link_info_chip_download".tr()),
|
||||
if (sharedLink.showMetadata)
|
||||
buildInfoChip("shared_link_info_chip_metadata".tr()),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue