mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat: open latest release when tapping "Update" on server out of date message
This commit is contained in:
parent
261f6578d3
commit
a3bbb746f1
1 changed files with 9 additions and 1 deletions
|
|
@ -40,6 +40,14 @@ class AppBarServerInfo extends HookConsumerWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
void openUpdateLink() {
|
void openUpdateLink() {
|
||||||
|
if (serverInfoState.isServerOutOfDate) {
|
||||||
|
launchUrl(
|
||||||
|
Uri.parse("https://github.com/immich-app/immich/releases/latest"),
|
||||||
|
mode: LaunchMode.externalApplication,
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (Platform.isIOS) {
|
if (Platform.isIOS) {
|
||||||
launchUrl(Uri.parse("https://apps.apple.com/app/id1613945652"), mode: LaunchMode.externalApplication);
|
launchUrl(Uri.parse("https://apps.apple.com/app/id1613945652"), mode: LaunchMode.externalApplication);
|
||||||
} else if (Platform.isAndroid) {
|
} else if (Platform.isAndroid) {
|
||||||
|
|
@ -92,7 +100,7 @@ class AppBarServerInfo extends HookConsumerWidget {
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (serverInfoState.isClientOutOfDate)
|
if (serverInfoState.isClientOutOfDate || serverInfoState.isServerOutOfDate)
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: openUpdateLink,
|
onPressed: openUpdateLink,
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue