From 9dba15f20d927c014539c8f36bd810295cf9667b Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 22 Jun 2021 09:50:16 +0300 Subject: [PATCH] Explain migration in wizard --- lib/ui/dashboard/dashboard_screen.dart | 3 ++- lib/ui/settings/account_management.dart | 2 +- lib/ui/settings/settings_wizard.dart | 10 ++++++++++ lib/utils/i18n.dart | 8 +++++++- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/ui/dashboard/dashboard_screen.dart b/lib/ui/dashboard/dashboard_screen.dart index 6cf3b6483..899f21419 100644 --- a/lib/ui/dashboard/dashboard_screen.dart +++ b/lib/ui/dashboard/dashboard_screen.dart @@ -75,7 +75,8 @@ class _DashboardScreenState extends State ScrollController(initialScrollOffset: index * kDashboardPanelHeight) ..addListener(onScrollListener); - if (!state.isDemo && (state.company.settings.name ?? '').isEmpty) { + if (!kReleaseMode || + !state.isDemo && (state.company.settings.name ?? '').isEmpty) { WidgetsBinding.instance.addPostFrameCallback((duration) { showDialog( context: context, diff --git a/lib/ui/settings/account_management.dart b/lib/ui/settings/account_management.dart index 9b7e0a093..84d9a2297 100644 --- a/lib/ui/settings/account_management.dart +++ b/lib/ui/settings/account_management.dart @@ -251,7 +251,7 @@ class _AccountOverview extends StatelessWidget { ), if (state.userCompany.ninjaPortalUrl.isNotEmpty) Padding( - padding: const EdgeInsets.only(left: 20, top: 16, right: 20), + padding: const EdgeInsets.only(left: 16, top: 16, right: 16), child: OutlinedButton( child: Padding( padding: const EdgeInsets.all(8.0), diff --git a/lib/ui/settings/settings_wizard.dart b/lib/ui/settings/settings_wizard.dart index 42f6f3c34..389647b48 100644 --- a/lib/ui/settings/settings_wizard.dart +++ b/lib/ui/settings/settings_wizard.dart @@ -344,6 +344,11 @@ class _SettingsWizardState extends State { currency, SizedBox(height: 16), darkMode, + if (state.isHosted) + Padding( + padding: const EdgeInsets.only(top: 32), + child: Text(localization.subdomainGuide), + ) ] : [ Row( @@ -388,6 +393,11 @@ class _SettingsWizardState extends State { Expanded(child: currency), ], ), + if (state.isHosted) + Padding( + padding: const EdgeInsets.only(top: 32), + child: Text(localization.subdomainGuide), + ), ], ), ), diff --git a/lib/utils/i18n.dart b/lib/utils/i18n.dart index ae64e481f..df3205c69 100644 --- a/lib/utils/i18n.dart +++ b/lib/utils/i18n.dart @@ -15,6 +15,8 @@ mixin LocalizationsProvider on LocaleCodeAware { static final Map> _localizedValues = { 'en': { // STARTER: lang key - do not remove comment + 'subdomain_guide': + 'The subdomain is used in the client portal to personalize links to match your brand. ie, https://your-brand.invoicing.co', 'send_time': 'Send Time', 'import_data': 'Import Data', 'import_settings': 'Import Settings', @@ -39,7 +41,7 @@ mixin LocalizationsProvider on LocaleCodeAware { 'account_id': 'Account ID', 'migration_not_yet_completed': 'The migration has not yet completed', 'wizard_warning': - 'If you are migrating from the legacy version stop here and begin the migration. Once the migration completes click \'Refresh\' and use the dropdown in the top left corner to switch companies.', + 'If you are migrating from the legacy version stop here and begin the migration on Settings > Account Management. Once the migration completes click \'Refresh\' and use the dropdown in the top left corner to switch companies.', 'activity_100': ':user created recurring invoice', 'activity_101': ':user updated recurring invoice', 'activity_102': ':user archived recurring invoice', @@ -62371,6 +62373,10 @@ mixin LocalizationsProvider on LocaleCodeAware { _localizedValues[localeCode]['send_time'] ?? _localizedValues['en']['send_time']; + String get subdomainGuide => + _localizedValues[localeCode]['subdomain_guide'] ?? + _localizedValues['en']['subdomain_guide']; + String lookup(String key) { final lookupKey = toSnakeCase(key);