fix: wrap auth views in AuthLayout and remove duplicate logo from PhoneLoginView
- admin_handlers: wrap PhoneLoginView, LoginView, RegisterView in AuthLayout so the gradient split panel / header renders correctly - phone_login_view: remove standalone logo block (AuthLayout provides it) and remove unused phone_form_provider import Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
bf3c380e8e
commit
1ae5b72ed7
@@ -1,4 +1,5 @@
|
||||
import 'package:prosapp_web_app/providers/auth_provider.dart';
|
||||
import 'package:prosapp_web_app/ui/layouts/auth/auth_layout.dart';
|
||||
import 'package:prosapp_web_app/ui/views/dashboard_view.dart';
|
||||
import 'package:prosapp_web_app/ui/views/login_view.dart';
|
||||
import 'package:prosapp_web_app/ui/views/phone_login_view.dart';
|
||||
@@ -9,9 +10,8 @@ import 'package:provider/provider.dart';
|
||||
class AdminHandlers {
|
||||
static Handler phone = Handler(handlerFunc: (context, params) {
|
||||
final authProvider = Provider.of<AuthProvider>(context!);
|
||||
|
||||
if (authProvider.authStatus == AuthStatus.notAuthenticated) {
|
||||
return const PhoneLoginView();
|
||||
return const AuthLayout(child: PhoneLoginView());
|
||||
} else {
|
||||
return const DashboardView();
|
||||
}
|
||||
@@ -19,9 +19,8 @@ class AdminHandlers {
|
||||
|
||||
static Handler login = Handler(handlerFunc: (context, params) {
|
||||
final authProvider = Provider.of<AuthProvider>(context!);
|
||||
|
||||
if (authProvider.authStatus == AuthStatus.notAuthenticated) {
|
||||
return const LoginView();
|
||||
return const AuthLayout(child: LoginView());
|
||||
} else {
|
||||
return const DashboardView();
|
||||
}
|
||||
@@ -29,9 +28,8 @@ class AdminHandlers {
|
||||
|
||||
static Handler register = Handler(handlerFunc: (context, params) {
|
||||
final authProvider = Provider.of<AuthProvider>(context!);
|
||||
|
||||
if (authProvider.authStatus == AuthStatus.notAuthenticated) {
|
||||
return const RegisterView();
|
||||
return const AuthLayout(child: RegisterView());
|
||||
} else {
|
||||
return const DashboardView();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user