Show owner/admin in about modal version
This commit is contained in:
parent
75ea62abdc
commit
b583714509
|
|
@ -229,7 +229,7 @@ abstract class AppState implements Built<AppState, AppStateBuilder> {
|
|||
version += '-';
|
||||
}
|
||||
|
||||
version += isSelfHosted ? 'S' : 'H';
|
||||
//version += isSelfHosted ? 'S' : 'H';
|
||||
version += getPlatformLetter();
|
||||
version += kClientVersion.split('.').last;
|
||||
|
||||
|
|
|
|||
|
|
@ -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<Null>(
|
||||
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
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
|
|||
static final Map<String, Map<String, String>> _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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue