From 26c38e5ed3a6dfc6d14cf14b8c6ad7764543c792 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 19 Jun 2023 12:38:34 +0300 Subject: [PATCH] Always show logout option --- lib/ui/app/menu_drawer.dart | 57 +++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/lib/ui/app/menu_drawer.dart b/lib/ui/app/menu_drawer.dart index 160fe1238..173401dd6 100644 --- a/lib/ui/app/menu_drawer.dart +++ b/lib/ui/app/menu_drawer.dart @@ -1150,12 +1150,11 @@ class SidebarFooter extends StatelessWidget { }, tooltip: prefState.enableTooltips ? localization.userGuide : '', ), - if (state.userCompany.isAdmin) - IconButton( - icon: Icon(Icons.info_outline), - onPressed: () => _showAbout(context), - tooltip: prefState.enableTooltips ? localization.about : '', - ), + IconButton( + icon: Icon(Icons.info_outline), + onPressed: () => _showAbout(context), + tooltip: prefState.enableTooltips ? localization.about : '', + ), /* if (kDebugMode) IconButton( @@ -1568,30 +1567,32 @@ void _showAbout(BuildContext context) async { color: Colors.cyan, onPressed: () => launchUrl(Uri.parse(kReleaseNotesUrl)), ), - if (state.isSelfHosted || !kReleaseMode) ...[ - AppButton( - label: localization.healthCheck.toUpperCase(), - iconData: MdiIcons.shieldHalfFull, - color: Colors.green, - onPressed: () { - showDialog( - context: context, - builder: (BuildContext context) { - return HealthCheckDialog(); - }); - }, - ), - if (!state.account.disableAutoUpdate && - (!state.account.isDocker || state.isUpdateAvailable)) + if (state.userCompany.isAdmin) ...[ + if (state.isSelfHosted || !kReleaseMode) ...[ AppButton( - label: (state.isUpdateAvailable - ? localization.updateApp - : localization.forceUpdate) - .toUpperCase(), - iconData: MdiIcons.cloudDownload, - color: Colors.orange, - onPressed: () => _showUpdate(context), + label: localization.healthCheck.toUpperCase(), + iconData: MdiIcons.shieldHalfFull, + color: Colors.green, + onPressed: () { + showDialog( + context: 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) AppButton(