mirror of
				https://github.com/AppFlowy-IO/AppFlowy.git
				synced 2025-11-03 19:43:52 +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) {
 | 
			
		||||
    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);
 | 
			
		||||
      },
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -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",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user