From 8e4c963df18e692bec5e07ab01872e00855f77c0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 12 Mar 2026 22:01:04 +0000 Subject: [PATCH] De-emphasize Visit OpenStreetMap button and add prominent login FilledButton Co-authored-by: dougborg <1261222+dougborg@users.noreply.github.com> --- lib/screens/osm_account_screen.dart | 50 +++++++++++++++++++---------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/lib/screens/osm_account_screen.dart b/lib/screens/osm_account_screen.dart index 1e25488..42efbe2 100644 --- a/lib/screens/osm_account_screen.dart +++ b/lib/screens/osm_account_screen.dart @@ -82,6 +82,22 @@ class _OSMAccountScreenState extends State { }, ), + if (!appState.isLoggedIn) ...[ + Padding( + padding: const EdgeInsets.fromLTRB(16, 0, 16, 16), + child: SizedBox( + width: double.infinity, + child: FilledButton.icon( + onPressed: () async { + await appState.forceLogin(); + }, + icon: const Icon(Icons.login), + label: Text(locService.t('auth.loginToOSM')), + ), + ), + ), + ], + if (appState.isLoggedIn) ...[ const Divider(), ListTile( @@ -214,24 +230,24 @@ class _OSMAccountScreenState extends State { locService.t('auth.aboutOSMDescription'), style: Theme.of(context).textTheme.bodyMedium, ), - const SizedBox(height: 16), - SizedBox( - width: double.infinity, - child: OutlinedButton.icon( - onPressed: () async { - final url = Uri.parse('https://openstreetmap.org'); - if (await canLaunchUrl(url)) { - await launchUrl(url, mode: LaunchMode.externalApplication); - } else { - if (context.mounted) { - ScaffoldMessenger.of(context).showSnackBar( - SnackBar(content: Text(locService.t('advancedEdit.couldNotOpenOSMWebsite'))), - ); - } + TextButton.icon( + onPressed: () async { + final url = Uri.parse('https://openstreetmap.org'); + if (await canLaunchUrl(url)) { + await launchUrl(url, mode: LaunchMode.externalApplication); + } else { + if (context.mounted) { + ScaffoldMessenger.of(context).showSnackBar( + SnackBar(content: Text(locService.t('advancedEdit.couldNotOpenOSMWebsite'))), + ); } - }, - icon: const Icon(Icons.open_in_new), - label: Text(locService.t('auth.visitOSM')), + } + }, + icon: const Icon(Icons.open_in_new, size: 16), + label: Text(locService.t('auth.visitOSM')), + style: TextButton.styleFrom( + padding: const EdgeInsets.symmetric(horizontal: 4), + tapTargetSize: MaterialTapTargetSize.shrinkWrap, ), ), ],