From 3d40283a702df9c271efc04f37d0e6418c47b9da Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 15 May 2022 18:20:15 +0300 Subject: [PATCH] Adjust login screen --- lib/constants.dart | 2 +- lib/ui/app/menu_drawer.dart | 2 +- lib/ui/auth/login_view.dart | 49 +++++++++++++++++++++++++------------ 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/lib/constants.dart b/lib/constants.dart index 1831784fc..e08df9a1e 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -45,7 +45,7 @@ const String kYouTubeUrl = const String kReleaseNotesUrl = 'https://github.com/invoiceninja/invoiceninja/wiki/Release-notes'; -const String kDocsUrl = 'https://invoiceninja.github.io/docs'; +const String kDocsUrl = 'https://invoiceninja.github.io'; const String kDocsCustomDomainUrl = 'https://invoiceninja.github.io/docs/hosted-custom-domain'; const String kDocsCustomFieldsUrl = diff --git a/lib/ui/app/menu_drawer.dart b/lib/ui/app/menu_drawer.dart index 5691b78e3..dd0e7a9a7 100644 --- a/lib/ui/app/menu_drawer.dart +++ b/lib/ui/app/menu_drawer.dart @@ -895,7 +895,7 @@ class SidebarFooter extends StatelessWidget { IconButton( icon: Icon(Icons.help_outline), onPressed: () { - String url = kDocsUrl; + String url = kDocsUrl + '/docs'; final uiState = state.uiState; final subRoute = uiState.baseSubRoute; diff --git a/lib/ui/auth/login_view.dart b/lib/ui/auth/login_view.dart index a4607fe9e..ceb7554e1 100644 --- a/lib/ui/auth/login_view.dart +++ b/lib/ui/auth/login_view.dart @@ -600,7 +600,7 @@ class _LoginState extends State { !isApple() && (!kIsWeb || !state.authState.isSelfHost)) Padding( - padding: const EdgeInsets.only(top: 10, bottom: 8), + padding: const EdgeInsets.only(top: 6, bottom: 10), child: TextButton( child: Text( _createAccount @@ -673,22 +673,39 @@ class _LoginState extends State { ), ), ), - if (!_recoverPassword && kIsWeb) - InkWell( - onTap: () => launch(getNativeAppUrl(platform)), - child: Padding( - padding: const EdgeInsets.all(14), - child: Row( - mainAxisSize: MainAxisSize.max, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Icon(getNativeAppIcon(platform), size: 16), - SizedBox(width: 8), - Text('$platform ${localization.app}') - ], + if (!_recoverPassword) + if (kIsWeb) + InkWell( + onTap: () => launch(getNativeAppUrl(platform)), + child: Padding( + padding: const EdgeInsets.all(14), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(getNativeAppIcon(platform), size: 16), + SizedBox(width: 8), + Text('$platform ${localization.app}') + ], + ), ), - ), - ), + ) + else + InkWell( + onTap: () => launch(kDocsUrl), + child: Padding( + padding: const EdgeInsets.all(14), + child: Row( + mainAxisSize: MainAxisSize.max, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon(Icons.book, size: 16), + SizedBox(width: 8), + Text(localization.documentation) + ], + ), + ), + ) ], ), ],