Always show logout option

This commit is contained in:
Hillel Coren 2023-06-19 12:38:34 +03:00
parent f35e199116
commit 26c38e5ed3
1 changed files with 29 additions and 28 deletions

View File

@ -1150,12 +1150,11 @@ class SidebarFooter extends StatelessWidget {
}, },
tooltip: prefState.enableTooltips ? localization.userGuide : '', tooltip: prefState.enableTooltips ? localization.userGuide : '',
), ),
if (state.userCompany.isAdmin) IconButton(
IconButton( icon: Icon(Icons.info_outline),
icon: Icon(Icons.info_outline), onPressed: () => _showAbout(context),
onPressed: () => _showAbout(context), tooltip: prefState.enableTooltips ? localization.about : '',
tooltip: prefState.enableTooltips ? localization.about : '', ),
),
/* /*
if (kDebugMode) if (kDebugMode)
IconButton( IconButton(
@ -1568,30 +1567,32 @@ void _showAbout(BuildContext context) async {
color: Colors.cyan, color: Colors.cyan,
onPressed: () => launchUrl(Uri.parse(kReleaseNotesUrl)), onPressed: () => launchUrl(Uri.parse(kReleaseNotesUrl)),
), ),
if (state.isSelfHosted || !kReleaseMode) ...[ if (state.userCompany.isAdmin) ...[
AppButton( if (state.isSelfHosted || !kReleaseMode) ...[
label: localization.healthCheck.toUpperCase(),
iconData: MdiIcons.shieldHalfFull,
color: Colors.green,
onPressed: () {
showDialog<HealthCheckDialog>(
context: context,
builder: (BuildContext context) {
return HealthCheckDialog();
});
},
),
if (!state.account.disableAutoUpdate &&
(!state.account.isDocker || state.isUpdateAvailable))
AppButton( AppButton(
label: (state.isUpdateAvailable label: localization.healthCheck.toUpperCase(),
? localization.updateApp iconData: MdiIcons.shieldHalfFull,
: localization.forceUpdate) color: Colors.green,
.toUpperCase(), onPressed: () {
iconData: MdiIcons.cloudDownload, showDialog<HealthCheckDialog>(
color: Colors.orange, context: context,
onPressed: () => _showUpdate(context), builder: (BuildContext context) {
return HealthCheckDialog();
});
},
), ),
if (!state.account.disableAutoUpdate &&
(!state.account.isDocker || state.isUpdateAvailable))
AppButton(
label: (state.isUpdateAvailable
? localization.updateApp
: localization.forceUpdate)
.toUpperCase(),
iconData: MdiIcons.cloudDownload,
color: Colors.orange,
onPressed: () => _showUpdate(context),
),
],
], ],
if (state.company.daysActive > 30) if (state.company.daysActive > 30)
AppButton( AppButton(