diff --git a/assets/i18n/en-US.json b/assets/i18n/en-US.json index 02f49001..b6128601 100644 --- a/assets/i18n/en-US.json +++ b/assets/i18n/en-US.json @@ -470,6 +470,7 @@ "pronouns": "Pronouns", "location": "Location", "timeZone": "Time Zone", + "timezoneNotFound": "Time zone not found", "birthday": "Birthday", "selectADate": "Select a date", "checkInResultT0": "Worst", diff --git a/lib/screens/account/profile.dart b/lib/screens/account/profile.dart index 9f91179e..e0cb2d17 100644 --- a/lib/screens/account/profile.dart +++ b/lib/screens/account/profile.dart @@ -332,30 +332,34 @@ class _AccountProfileDetail extends StatelessWidget { children: _buildSubcolumn(), ), if (data.profile.timeZone.isNotEmpty && !kIsWeb) - Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('timeZone').tr().bold(), - Row( - crossAxisAlignment: CrossAxisAlignment.baseline, - textBaseline: TextBaseline.alphabetic, - spacing: 6, - children: [ - Text(data.profile.timeZone), - Text( - getTzInfo( - data.profile.timeZone, - ).$2.formatCustomGlobal('HH:mm'), - ), - Text( - getTzInfo(data.profile.timeZone).$1.formatOffsetLocal(), - ).fontSize(11), - Text( - 'UTC${getTzInfo(data.profile.timeZone).$1.formatOffset()}', - ).fontSize(11).opacity(0.75), - ], - ), - ], + Builder( + builder: (context) { + try { + final tzInfo = getTzInfo(data.profile.timeZone); + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('timeZone').tr().bold(), + Row( + crossAxisAlignment: CrossAxisAlignment.baseline, + textBaseline: TextBaseline.alphabetic, + spacing: 6, + children: [ + Text(data.profile.timeZone), + Text(tzInfo.$2.formatCustomGlobal('HH:mm')), + Text(tzInfo.$1.formatOffsetLocal()).fontSize(11), + Text( + 'UTC${tzInfo.$1.formatOffset()}', + ).fontSize(11).opacity(0.75), + ], + ), + ], + ); + } catch (e) { + // Hide timezone section if timezone is invalid + return const SizedBox.shrink(); + } + }, ), ], ).padding(horizontal: 24, vertical: 16), diff --git a/lib/screens/developers/hub.dart b/lib/screens/developers/hub.dart index 4a10970b..1add2b07 100644 --- a/lib/screens/developers/hub.dart +++ b/lib/screens/developers/hub.dart @@ -21,7 +21,6 @@ import 'package:island/widgets/response.dart'; import 'package:material_symbols_icons/symbols.dart'; import 'package:riverpod_annotation/riverpod_annotation.dart'; import 'package:styled_widget/styled_widget.dart'; -import 'package:url_launcher/url_launcher_string.dart'; part 'hub.g.dart'; @@ -190,13 +189,7 @@ class _ConsoleAppBar extends StatelessWidget implements PreferredSizeWidget { currentProject: currentProject, onProjectChanged: onProjectChanged, ), - IconButton( - icon: const Icon(Symbols.help, color: Color(0xFF5F6368)), - onPressed: () { - launchUrlString('https://kb.solsynth.dev'); - }, - ), - const Gap(12), + const Gap(8), ], ); }