mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: optimize the logout button
This commit is contained in:
parent
a1db5bff5c
commit
104851d330
@ -109,20 +109,24 @@ class SettingsUserView extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _renderLogoutButton(BuildContext context) {
|
Widget _renderLogoutButton(BuildContext context) {
|
||||||
return FlowyButton(
|
return Tooltip(
|
||||||
useIntrinsicWidth: true,
|
message: LocaleKeys.settings_user_clickToLogout.tr(),
|
||||||
text: FlowyText(
|
child: FlowyButton(
|
||||||
LocaleKeys.settings_menu_logout.tr(),
|
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);
|
|
||||||
},
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -296,7 +296,8 @@
|
|||||||
"name": "Name",
|
"name": "Name",
|
||||||
"icon": "Icon",
|
"icon": "Icon",
|
||||||
"selectAnIcon": "Select an 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": {
|
"shortcuts": {
|
||||||
"shortcutsLabel": "Shortcuts",
|
"shortcutsLabel": "Shortcuts",
|
||||||
|
Loading…
Reference in New Issue
Block a user