mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
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>
This commit is contained in:
parent
489a409bea
commit
e21cf7113d
2 changed files with 21 additions and 14 deletions
|
@ -1,6 +1,5 @@
|
||||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
|
||||||
import 'package:cake_wallet/themes/extensions/pin_code_theme.dart';
|
|
||||||
import 'package:cake_wallet/themes/theme_base.dart';
|
import 'package:cake_wallet/themes/theme_base.dart';
|
||||||
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
import 'package:cake_wallet/src/widgets/alert_with_two_actions.dart';
|
||||||
import 'package:cake_wallet/utils/clipboard_util.dart';
|
import 'package:cake_wallet/utils/clipboard_util.dart';
|
||||||
|
@ -190,17 +189,22 @@ class WalletSeedPage extends BasePage {
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor.withOpacity(0.5)
|
color: Theme.of(context)
|
||||||
),
|
.extension<CakeTextTheme>()!
|
||||||
|
.buttonTextColor
|
||||||
|
.withOpacity(0.5)),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Text(
|
Expanded(
|
||||||
|
child: Text(
|
||||||
'${item[0].toUpperCase()}${item.substring(1)}',
|
'${item[0].toUpperCase()}${item.substring(1)}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w700,
|
fontWeight: FontWeight.w700,
|
||||||
color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor
|
color: Theme.of(context)
|
||||||
|
.extension<CakeTextTheme>()!
|
||||||
|
.buttonTextColor),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -16,7 +16,10 @@ abstract class WalletSeedViewModelBase with Store {
|
||||||
@observable
|
@observable
|
||||||
String seed;
|
String seed;
|
||||||
|
|
||||||
List<String> get seedSplit => seed.split(' ');
|
/// The Regex split the words based on any whitespace character.
|
||||||
|
///
|
||||||
|
/// Either standard ASCII space (U+0020) or the full-width space character (U+3000) used by the Japanese.
|
||||||
|
List<String> get seedSplit => seed.split(RegExp(r'\s+'));
|
||||||
|
|
||||||
int get columnCount => seedSplit.length <= 16 ? 2 : 3;
|
int get columnCount => seedSplit.length <= 16 ? 2 : 3;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue