chore: optimize the logout button

This commit is contained in:
Lucas.Xu 2023-08-08 10:58:14 +08:00
parent a1db5bff5c
commit 104851d330
2 changed files with 19 additions and 14 deletions

View File

@ -109,20 +109,24 @@ class SettingsUserView extends StatelessWidget {
}
Widget _renderLogoutButton(BuildContext context) {
return FlowyButton(
useIntrinsicWidth: true,
text: FlowyText(
LocaleKeys.settings_menu_logout.tr(),
return Tooltip(
message: LocaleKeys.settings_user_clickToLogout.tr(),
child: FlowyButton(
margin: const EdgeInsets.symmetric(vertical: 8.0, horizontal: 2.0),
text: FlowyText.medium(
LocaleKeys.settings_menu_logout.tr(),
fontSize: 13,
),
onTap: () async {
NavigatorAlertDialog(
title: LocaleKeys.settings_menu_logoutPrompt.tr(),
confirm: () async {
await getIt<AuthService>().signOut();
didLogout();
},
).show(context);
},
),
onTap: () async {
NavigatorAlertDialog(
title: LocaleKeys.settings_menu_logoutPrompt.tr(),
confirm: () async {
await getIt<AuthService>().signOut();
didLogout();
},
).show(context);
},
);
}

View File

@ -296,7 +296,8 @@
"name": "Name",
"icon": "Icon",
"selectAnIcon": "Select an icon",
"pleaseInputYourOpenAIKey": "please input your OpenAI key"
"pleaseInputYourOpenAIKey": "please input your OpenAI key",
"clickToLogout": "Click to logout the current user"
},
"shortcuts": {
"shortcutsLabel": "Shortcuts",