Added mechanism of required password change of new user's first login (#272)

* Deprecate login scenarios that support pre-web era

* refactor and simplify setup

* Added user info to change password form

* change isFistLogin column to shouldChangePassword

* Implemented change user password

* Implement the change password page for mobile

* Change label

* Added changes log and up minor version

* Fixed typo in the release note

* Up server version
This commit is contained in:
Alex
2022-06-27 15:13:07 -05:00
committed by GitHub
parent 2e85e18020
commit 5f00d8b9c6
33 changed files with 738 additions and 562 deletions

View File

@@ -2,6 +2,7 @@ import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:immich_mobile/modules/backup/views/album_preview_page.dart';
import 'package:immich_mobile/modules/backup/views/backup_album_selection_page.dart';
import 'package:immich_mobile/modules/login/views/change_password_page.dart';
import 'package:immich_mobile/modules/login/views/login_page.dart';
import 'package:immich_mobile/modules/home/views/home_page.dart';
import 'package:immich_mobile/modules/search/views/search_page.dart';
@@ -30,6 +31,7 @@ part 'router.gr.dart';
routes: <AutoRoute>[
AutoRoute(page: SplashScreenPage, initial: true),
AutoRoute(page: LoginPage),
AutoRoute(page: ChangePasswordPage),
CustomRoute(
page: TabControllerPage,
guards: [AuthGuard],

View File

@@ -29,6 +29,10 @@ class _$AppRouter extends RootStackRouter {
return MaterialPageX<dynamic>(
routeData: routeData, child: const LoginPage());
},
ChangePasswordRoute.name: (routeData) {
return MaterialPageX<dynamic>(
routeData: routeData, child: const ChangePasswordPage());
},
TabControllerRoute.name: (routeData) {
return CustomPage<dynamic>(
routeData: routeData,
@@ -131,6 +135,7 @@ class _$AppRouter extends RootStackRouter {
List<RouteConfig> get routes => [
RouteConfig(SplashScreenRoute.name, path: '/'),
RouteConfig(LoginRoute.name, path: '/login-page'),
RouteConfig(ChangePasswordRoute.name, path: '/change-password-page'),
RouteConfig(TabControllerRoute.name,
path: '/tab-controller-page',
guards: [
@@ -192,6 +197,15 @@ class LoginRoute extends PageRouteInfo<void> {
static const String name = 'LoginRoute';
}
/// generated route for
/// [ChangePasswordPage]
class ChangePasswordRoute extends PageRouteInfo<void> {
const ChangePasswordRoute()
: super(ChangePasswordRoute.name, path: '/change-password-page');
static const String name = 'ChangePasswordRoute';
}
/// generated route for
/// [TabControllerPage]
class TabControllerRoute extends PageRouteInfo<void> {