Skip to content

High performance self-hosted photo and video management solution.

175 Fixed issue back button android return to login page (#193)

Alexa3b45d62b650
diff --git a/mobile/android/fastlane/metadata/android/en-US/changelogs/16.txt b/mobile/android/fastlane/metadata/android/en-US/changelogs/16.txt
new file mode 100644
index 0000000000..0b65255d5c
--- /dev/null
+++ b/mobile/android/fastlane/metadata/android/en-US/changelogs/16.txt
@@ -0,0 +1,2 @@
+* Update to Material Design 3
+* Fixed back button navigation - no longer return back to the home page
\ No newline at end of file
diff --git a/mobile/ios/fastlane/Fastfile b/mobile/ios/fastlane/Fastfile
index 9d004b0a42..d6cd6ee4ca 100644
--- a/mobile/ios/fastlane/Fastfile
+++ b/mobile/ios/fastlane/Fastfile
@@ -19,7 +19,7 @@ platform :ios do
desc "iOS Beta"
lane :beta do
increment_version_number(
- version_number: "1.10.0"
+ version_number: "1.10.1"
)
increment_build_number(
build_number: latest_testflight_build_number + 1,
diff --git a/mobile/lib/main.dart b/mobile/lib/main.dart
index 9597930587..7249c71222 100644
--- a/mobile/lib/main.dart
+++ b/mobile/lib/main.dart
@@ -103,6 +103,7 @@ class _ImmichAppState extends ConsumerState<ImmichApp> with WidgetsBindingObserv
title: 'Immich',
debugShowCheckedModeBanner: false,
theme: ThemeData(
+ useMaterial3: true,
brightness: Brightness.light,
primarySwatch: Colors.indigo,
fontFamily: 'WorkSans',
diff --git a/mobile/lib/modules/backup/views/backup_controller_page.dart b/mobile/lib/modules/backup/views/backup_controller_page.dart
index 028273e0d4..4c8db78a97 100644
--- a/mobile/lib/modules/backup/views/backup_controller_page.dart
+++ b/mobile/lib/modules/backup/views/backup_controller_page.dart
@@ -96,6 +96,12 @@ class BackupControllerPage extends HookConsumerWidget {
Padding(
padding: const EdgeInsets.only(top: 8.0),
child: OutlinedButton(
+ style: OutlinedButton.styleFrom(
+ side: const BorderSide(
+ width: 1,
+ color: Color.fromARGB(255, 220, 220, 220),
+ ),
+ ),
onPressed: () {
isAutoBackup
? ref.watch(authenticationProvider.notifier).setAutoBackup(false)
@@ -191,6 +197,13 @@ class BackupControllerPage extends HookConsumerWidget {
),
),
trailing: OutlinedButton(
+ style: OutlinedButton.styleFrom(
+ enableFeedback: true,
+ side: const BorderSide(
+ width: 1,
+ color: Color.fromARGB(255, 220, 220, 220),
+ ),
+ ),
onPressed: () {
AutoRouter.of(context).push(const BackupAlbumSelectionRoute());
},
@@ -278,13 +291,20 @@ class BackupControllerPage extends HookConsumerWidget {
child: Container(
child: backupState.backupProgress == BackUpProgressEnum.inProgress
? ElevatedButton(
- style: ElevatedButton.styleFrom(primary: Colors.red[300]),
+ style: ElevatedButton.styleFrom(
+ primary: Colors.red[300],
+ onPrimary: Colors.grey[50],
+ ),
onPressed: () {
ref.read(backupProvider.notifier).cancelBackup();
},
child: const Text("Cancel"),
)
: ElevatedButton(
+ style: ElevatedButton.styleFrom(
+ primary: Theme.of(context).primaryColor,
+ onPrimary: Colors.grey[50],
+ ),
onPressed: shouldBackup
? () {
ref.read(backupProvider.notifier).startBackupProcess();
diff --git a/mobile/lib/modules/home/ui/immich_sliver_appbar.dart b/mobile/lib/modules/home/ui/immich_sliver_appbar.dart
index 09584b2b7d..0e5978ea45 100644
--- a/mobile/lib/modules/home/ui/immich_sliver_appbar.dart
+++ b/mobile/lib/modules/home/ui/immich_sliver_appbar.dart
@@ -109,7 +109,7 @@ class ImmichSliverAppBar extends ConsumerWidget {
? const Icon(Icons.backup_rounded)
: Badge(
padding: const EdgeInsets.all(4),
- elevation: 1,
+ elevation: 2,
position: BadgePosition.bottomEnd(bottom: -4, end: -4),
badgeColor: Colors.white,
badgeContent: const Icon(
@@ -117,7 +117,6 @@ class ImmichSliverAppBar extends ConsumerWidget {
size: 8,
),
child: const Icon(Icons.backup_rounded)),
- tooltip: 'Backup Controller',
onPressed: () async {
var onPop = await AutoRouter.of(context).push(const BackupControllerRoute());
diff --git a/mobile/lib/modules/home/ui/profile_drawer.dart b/mobile/lib/modules/home/ui/profile_drawer.dart
index 391529413c..46866605c7 100644
--- a/mobile/lib/modules/home/ui/profile_drawer.dart
+++ b/mobile/lib/modules/home/ui/profile_drawer.dart
@@ -153,7 +153,6 @@ class ProfileDrawer extends HookConsumerWidget {
),
],
),
- const Padding(padding: EdgeInsets.all(8)),
Text(
"${_authState.firstName} ${_authState.lastName}",
style: TextStyle(
@@ -162,12 +161,9 @@ class ProfileDrawer extends HookConsumerWidget {
fontSize: 24,
),
),
- Padding(
- padding: const EdgeInsets.only(top: 4.0),
- child: Text(
- _authState.userEmail,
- style: TextStyle(color: Colors.grey[800], fontSize: 12),
- ),
+ Text(
+ _authState.userEmail,
+ style: TextStyle(color: Colors.grey[800], fontSize: 12),
)
],
),
diff --git a/mobile/lib/modules/login/ui/login_form.dart b/mobile/lib/modules/login/ui/login_form.dart
index 851338b38d..c485ce4ae9 100644
--- a/mobile/lib/modules/login/ui/login_form.dart
+++ b/mobile/lib/modules/login/ui/login_form.dart
@@ -153,9 +153,12 @@ class LoginButton extends ConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
return ElevatedButton(
- style: ButtonStyle(
+ style: ElevatedButton.styleFrom(
visualDensity: VisualDensity.standard,
- padding: MaterialStateProperty.all<EdgeInsets>(const EdgeInsets.symmetric(vertical: 10, horizontal: 25)),
+ primary: Theme.of(context).primaryColor,
+ onPrimary: Colors.grey[50],
+ elevation: 2,
+ padding: const EdgeInsets.symmetric(vertical: 10, horizontal: 25),
),
onPressed: () async {
// This will remove current cache asset state of previous user login.
diff --git a/mobile/lib/modules/search/views/search_result_page.dart b/mobile/lib/modules/search/views/search_result_page.dart
index 456db879ef..38c8595421 100644
--- a/mobile/lib/modules/search/views/search_result_page.dart
+++ b/mobile/lib/modules/search/views/search_result_page.dart
@@ -79,14 +79,14 @@ class SearchResultPage extends HookConsumerWidget {
return Chip(
label: Wrap(
spacing: 5,
+ runAlignment: WrapAlignment.center,
+ crossAxisAlignment: WrapCrossAlignment.center,
+ alignment: WrapAlignment.center,
children: [
- Padding(
- padding: const EdgeInsets.only(top: 2.0),
- child: Text(
- currentSearchTerm.value,
- style: TextStyle(color: Theme.of(context).primaryColor),
- maxLines: 1,
- ),
+ Text(
+ currentSearchTerm.value,
+ style: TextStyle(color: Theme.of(context).primaryColor, fontSize: 13, fontWeight: FontWeight.bold),
+ maxLines: 1,
),
Icon(
Icons.close_rounded,
diff --git a/mobile/lib/modules/sharing/ui/album_action_outlined_button.dart b/mobile/lib/modules/sharing/ui/album_action_outlined_button.dart
index 62be8e8552..f694349a34 100644
--- a/mobile/lib/modules/sharing/ui/album_action_outlined_button.dart
+++ b/mobile/lib/modules/sharing/ui/album_action_outlined_button.dart
@@ -13,15 +13,14 @@ class AlbumActionOutlinedButton extends StatelessWidget {
return Padding(
padding: const EdgeInsets.only(right: 8.0),
child: OutlinedButton.icon(
- style: ButtonStyle(
- padding: MaterialStateProperty.all<EdgeInsets>(const EdgeInsets.symmetric(vertical: 0, horizontal: 10)),
- shape: MaterialStateProperty.resolveWith<OutlinedBorder>(
- (_) => RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(25),
- ),
+ style: OutlinedButton.styleFrom(
+ padding: const EdgeInsets.symmetric(vertical: 0, horizontal: 10),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(25),
),
- side: MaterialStateProperty.resolveWith<BorderSide>(
- (_) => const BorderSide(width: 1, color: Color.fromARGB(255, 158, 158, 158)),
+ side: const BorderSide(
+ width: 1,
+ color: Color.fromARGB(255, 215, 215, 215),
),
),
icon: Icon(iconData, size: 15),
diff --git a/mobile/lib/modules/sharing/views/create_shared_album_page.dart b/mobile/lib/modules/sharing/views/create_shared_album_page.dart
index 747ee8e9b4..1da6312ed2 100644
--- a/mobile/lib/modules/sharing/views/create_shared_album_page.dart
+++ b/mobile/lib/modules/sharing/views/create_shared_album_page.dart
@@ -82,11 +82,11 @@ class CreateSharedAlbumPage extends HookConsumerWidget {
child: Padding(
padding: const EdgeInsets.only(top: 16, left: 18, right: 18),
child: OutlinedButton.icon(
- style: ButtonStyle(
- alignment: Alignment.centerLeft,
- padding:
- MaterialStateProperty.all<EdgeInsets>(const EdgeInsets.symmetric(vertical: 22, horizontal: 16)),
- ),
+ style: OutlinedButton.styleFrom(
+ alignment: Alignment.centerLeft,
+ padding: const EdgeInsets.symmetric(vertical: 22, horizontal: 16),
+ side: const BorderSide(color: Color.fromARGB(255, 206, 206, 206)),
+ shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5))),
onPressed: _onSelectPhotosButtonPressed,
icon: const Icon(Icons.add_rounded),
label: Padding(
diff --git a/mobile/lib/shared/views/tab_controller_page.dart b/mobile/lib/shared/views/tab_controller_page.dart
index 2ff1d04de3..2c303c39af 100644
--- a/mobile/lib/shared/views/tab_controller_page.dart
+++ b/mobile/lib/shared/views/tab_controller_page.dart
@@ -19,26 +19,32 @@ class TabControllerPage extends ConsumerWidget {
],
builder: (context, child, animation) {
final tabsRouter = AutoTabsRouter.of(context);
- return Scaffold(
- body: FadeTransition(
- opacity: animation,
- child: child,
+ return WillPopScope(
+ onWillPop: () async {
+ tabsRouter.setActiveIndex(0);
+ return false;
+ },
+ child: Scaffold(
+ body: FadeTransition(
+ opacity: animation,
+ child: child,
+ ),
+ bottomNavigationBar: isMultiSelectEnable
+ ? null
+ : BottomNavigationBar(
+ selectedLabelStyle: const TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
+ unselectedLabelStyle: const TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
+ currentIndex: tabsRouter.activeIndex,
+ onTap: (index) {
+ tabsRouter.setActiveIndex(index);
+ },
+ items: const [
+ BottomNavigationBarItem(label: 'Photos', icon: Icon(Icons.photo)),
+ BottomNavigationBarItem(label: 'Search', icon: Icon(Icons.search)),
+ BottomNavigationBarItem(label: 'Sharing', icon: Icon(Icons.group_outlined)),
+ ],
+ ),
),
- bottomNavigationBar: isMultiSelectEnable
- ? null
- : BottomNavigationBar(
- selectedLabelStyle: const TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
- unselectedLabelStyle: const TextStyle(fontSize: 15, fontWeight: FontWeight.w600),
- currentIndex: tabsRouter.activeIndex,
- onTap: (index) {
- tabsRouter.setActiveIndex(index);
- },
- items: const [
- BottomNavigationBarItem(label: 'Photos', icon: Icon(Icons.photo)),
- BottomNavigationBarItem(label: 'Search', icon: Icon(Icons.search)),
- BottomNavigationBarItem(label: 'Sharing', icon: Icon(Icons.group_outlined)),
- ],
- ),
);
},
);
diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml
index c0c840bbc8..eec9e7e41d 100644
--- a/mobile/pubspec.yaml
+++ b/mobile/pubspec.yaml
@@ -2,7 +2,7 @@ name: immich_mobile
description: Immich - selfhosted backup media file on mobile phone
publish_to: "none"
-version: 1.10.0+15
+version: 1.10.1+16
environment:
sdk: ">=2.15.1 <3.0.0"