diff --git a/lib/redux/app/app_state.dart b/lib/redux/app/app_state.dart index 8ac45f538..78c63fa92 100644 --- a/lib/redux/app/app_state.dart +++ b/lib/redux/app/app_state.dart @@ -229,7 +229,7 @@ abstract class AppState implements Built { version += '-'; } - version += isSelfHosted ? 'S' : 'H'; + //version += isSelfHosted ? 'S' : 'H'; version += getPlatformLetter(); version += kClientVersion.split('.').last; diff --git a/lib/ui/app/menu_drawer.dart b/lib/ui/app/menu_drawer.dart index cbe6c1350..1f606b617 100644 --- a/lib/ui/app/menu_drawer.dart +++ b/lib/ui/app/menu_drawer.dart @@ -1329,6 +1329,16 @@ void _showAbout(BuildContext context) async { height: 40.0, ); + final userCompany = state.userCompany; + String subtitle = state.appVersion + '\n'; + subtitle += + state.isSelfHosted ? localization.selfhosted : localization.hosted; + if (userCompany.isOwner) { + subtitle += ' • ' + localization.owner; + } else if (userCompany.isAdmin) { + subtitle += ' • ' + localization.admin; + } + showDialog( context: context, builder: (BuildContext context) { @@ -1364,7 +1374,7 @@ void _showAbout(BuildContext context) async { 'Invoice Ninja', style: Theme.of(context).textTheme.titleMedium, ), - subtitle: Text(state.appVersion), + subtitle: Text(subtitle), onTap: () { Clipboard.setData(ClipboardData(text: state.appVersion)); showToast(localization.copiedToClipboard diff --git a/lib/utils/i18n.dart b/lib/utils/i18n.dart index a5709e25d..c7c964358 100644 --- a/lib/utils/i18n.dart +++ b/lib/utils/i18n.dart @@ -18,6 +18,8 @@ mixin LocalizationsProvider on LocaleCodeAware { static final Map> _localizedValues = { 'en': { // STARTER: lang key - do not remove comment + 'admin': 'Admin', + 'owner': 'Owner', 'link_expenses': 'Link Expenses', 'converted_client_balance': 'Converted Client Balance', 'converted_payment_balance': 'Converted Payment Balance', @@ -98299,6 +98301,14 @@ mixin LocalizationsProvider on LocaleCodeAware { _localizedValues[localeCode]['total_hours'] ?? _localizedValues['en']['total_hours']; + String get owner => + _localizedValues[localeCode]['owner'] ?? + _localizedValues['en']['owner']; + + String get admin => + _localizedValues[localeCode]['admin'] ?? + _localizedValues['en']['admin']; + // STARTER: lang field - do not remove comment String lookup(String key) {