From 3b0e7f9c08cd12d1ebbd83203a4b6e6e27893da1 Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Sun, 8 Mar 2026 23:37:32 -0700 Subject: [PATCH] use FrostyDialog for web session info dialog Co-Authored-By: Claude Opus 4.6 --- .../account/widgets/profile_card.dart | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/lib/screens/settings/account/widgets/profile_card.dart b/lib/screens/settings/account/widgets/profile_card.dart index 8592dcaa..bd3de82b 100644 --- a/lib/screens/settings/account/widgets/profile_card.dart +++ b/lib/screens/settings/account/widgets/profile_card.dart @@ -5,6 +5,7 @@ import 'package:frosty/screens/onboarding/login_webview.dart'; import 'package:frosty/screens/settings/account/account_options.dart'; import 'package:frosty/screens/settings/stores/auth_store.dart'; import 'package:frosty/utils/modal_bottom_sheet.dart'; +import 'package:frosty/widgets/frosty_dialog.dart'; import 'package:frosty/widgets/profile_picture.dart'; class ProfileCard extends StatelessWidget { @@ -58,16 +59,19 @@ class ProfileCard extends StatelessWidget { onTap: () { showDialog( context: context, - builder: (context) => AlertDialog( - title: const Text('Web session'), - content: Text( - hasToken - ? 'Your Twitch web session is linked. When using the native player, ads will be avoided on channels where you have a subscription or Twitch Turbo.' - : 'Your Twitch web session is not linked. Log in again to avoid ads when using the native player on channels where you have a subscription or Twitch Turbo.', - ), + builder: (context) => FrostyDialog( + title: 'Web session', + message: hasToken + ? 'Your Twitch web session is linked. When using the native player, ads will be avoided on channels where you have a subscription or Twitch Turbo.' + : 'Your Twitch web session is not linked. Log in again to avoid ads when using the native player on channels where you have a subscription or Twitch Turbo.', actions: [ if (!hasToken) TextButton( + onPressed: Navigator.of(context).pop, + child: const Text('Cancel'), + ), + if (!hasToken) + FilledButton( onPressed: () { Navigator.pop(context); Navigator.push( @@ -79,10 +83,11 @@ class ProfileCard extends StatelessWidget { }, child: const Text('Log in'), ), - TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('OK'), - ), + if (hasToken) + TextButton( + onPressed: Navigator.of(context).pop, + child: const Text('OK'), + ), ], ), );