Explain migration in wizard

This commit is contained in:
Hillel Coren 2021-06-22 09:50:16 +03:00
parent 1f8faee876
commit 9dba15f20d
4 changed files with 20 additions and 3 deletions

View File

@ -75,7 +75,8 @@ class _DashboardScreenState extends State<DashboardScreen>
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<void>(
context: context,

View File

@ -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),

View File

@ -344,6 +344,11 @@ class _SettingsWizardState extends State<SettingsWizard> {
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<SettingsWizard> {
Expanded(child: currency),
],
),
if (state.isHosted)
Padding(
padding: const EdgeInsets.only(top: 32),
child: Text(localization.subdomainGuide),
),
],
),
),

View File

@ -15,6 +15,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _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);