Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: optimize the logout button

Lucas.Xu104851d3308d
diff --git a/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart b/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart
index 49192dda71..0a66c5022b 100644
--- a/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart
+++ b/frontend/appflowy_flutter/lib/workspace/presentation/settings/widgets/settings_user_view.dart
@@ -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);
- },
);
}
diff --git a/frontend/resources/translations/en.json b/frontend/resources/translations/en.json
index 7b8772564c..6c9234d53c 100644
--- a/frontend/resources/translations/en.json
+++ b/frontend/resources/translations/en.json
@@ -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",