CW-703: Better Seed UI/UX - Fix for Japanese PolySeeds (#1875)

* feat: Switch UI for seeds display * feat: Add localization for disclaimer text * fix: Modify color for warning on seeds screen * Fix: Adjust UI styling for seed page * chore: Revert podfile.lock * Fix column colors * Fix more colors * Fix more colors and update strings * fix: Error extracting seed words in Japanese because of spacing type used --------- Co-authored-by: tuxpizza <tuxsudo@tux.pizza>

David Adegoke committed Dec 13, 2024 at 20:44 UTC e21cf7113d613c77287d59f5068fb9f80e2d7cf4
2 files changed +21 -14
lib/src/screens/seed/wallet_seed_page.dart
+17 -13
@@ -1,6 +1,5 @@
1 import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
2 import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
3 -import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
3 import 'package:cake_wallet/themes/theme_base.dart';
4 import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
5 import 'package:cake_wallet/utils/clipboard_util.dart';
@@ -139,8 +138,8 @@ class WalletSeedPage extends BasePage {
138 fontSize: 12,
139 fontWeight: FontWeight.w800,
140 color: currentTheme.type == ThemeType.dark
142 - ? Colors.white.withOpacity(0.75)
143 - : Colors.white.withOpacity(0.85),
141 + ? Colors.white.withOpacity(0.75)
142 + : Colors.white.withOpacity(0.85),
143 ),
144 ),
145 ),
@@ -188,19 +187,24 @@ class WalletSeedPage extends BasePage {
187 numberCount.toString(),
188 textAlign: TextAlign.right,
189 style: TextStyle(
191 - fontSize: 14,
192 - fontWeight: FontWeight.w700,
193 - color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor.withOpacity(0.5)
194 - ),
190 + fontSize: 14,
191 + fontWeight: FontWeight.w700,
192 + color: Theme.of(context)
193 + .extension<CakeTextTheme>()!
194 + .buttonTextColor
195 + .withOpacity(0.5)),
196 ),
197 ),
198 const SizedBox(width: 8),
198 - Text(
199 - '${item[0].toUpperCase()}${item.substring(1)}',
200 - style: TextStyle(
201 - fontSize: 14,
202 - fontWeight: FontWeight.w700,
203 - color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor
199 + Expanded(
200 + child: Text(
201 + '${item[0].toUpperCase()}${item.substring(1)}',
202 + style: TextStyle(
203 + fontSize: 14,
204 + fontWeight: FontWeight.w700,
205 + color: Theme.of(context)
206 + .extension<CakeTextTheme>()!
207 + .buttonTextColor),
208 ),
209 ),
210 ],
lib/view_model/wallet_seed_view_model.dart
+4 -1
@@ -16,7 +16,10 @@ abstract class WalletSeedViewModelBase with Store {
16 @observable
17 String seed;
18
19 - List<String> get seedSplit => seed.split(' ');
19 + /// The Regex split the words based on any whitespace character.
20 + ///
21 + /// Either standard ASCII space (U+0020) or the full-width space character (U+3000) used by the Japanese.
22 + List<String> get seedSplit => seed.split(RegExp(r'\s+'));
23
24 int get columnCount => seedSplit.length <= 16 ? 2 : 3;
25 }