mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-11-16 09:34:06 +01:00
Cw 865 create new seed UI for show seed keys page to match onboarding seed verification UI (#1961)
* update wallet keys page UI * localisation * hide keys tab for electrum wallets * Fix padding for tab view * Fix more padding * add height box for isLegacySeedOnly * revert adding tar.gz files [skip ci] --------- Co-authored-by: tuxpizza <tuxsudo@tux.pizza>
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SeedPhraseGridWidget extends StatelessWidget {
|
||||
const SeedPhraseGridWidget({
|
||||
super.key,
|
||||
required this.list,
|
||||
});
|
||||
|
||||
final List<String> list;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return GridView.builder(
|
||||
itemCount: list.length,
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
childAspectRatio: 2.8,
|
||||
mainAxisSpacing: 8.0,
|
||||
crossAxisSpacing: 8.0,
|
||||
),
|
||||
itemBuilder: (context, index) {
|
||||
final item = list[index];
|
||||
final numberCount = index + 1;
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).cardColor,
|
||||
),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
child: Text(
|
||||
//maxLines: 1,
|
||||
numberCount.toString(),
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
height: 1,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.buttonTextColor
|
||||
.withOpacity(0.5)),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'${item[0].toLowerCase()}${item.substring(1)}',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
height: 0.8,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import 'package:cake_wallet/themes/extensions/cake_text_theme.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class TextInfoBox extends StatelessWidget {
|
||||
const TextInfoBox({Key? key, required this.title, required this.value, this.onCopy})
|
||||
: super(key: key);
|
||||
|
||||
final String title;
|
||||
final String value;
|
||||
final void Function(BuildContext context)? onCopy;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
color: Theme.of(context).cardColor,
|
||||
),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(title,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context)
|
||||
.extension<CakeTextTheme>()!
|
||||
.buttonTextColor
|
||||
.withOpacity(0.5))),
|
||||
GestureDetector(
|
||||
onTap: onCopy != null ? () => onCopy!(context) : null,
|
||||
child: Icon(Icons.copy,
|
||||
size: 13,
|
||||
color: Theme.of(context).textTheme.bodyLarge?.color?.withOpacity(0.7))),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(value,
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Theme.of(context).extension<CakeTextTheme>()!.buttonTextColor)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import 'package:cake_wallet/themes/theme_base.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class WarningBox extends StatelessWidget {
|
||||
const WarningBox({required this.content, required this.currentTheme, Key? key})
|
||||
: super(key: key);
|
||||
|
||||
final String content;
|
||||
final ThemeBase currentTheme;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: currentTheme.type == ThemeType.dark
|
||||
? Color.fromRGBO(132, 110, 64, 1)
|
||||
: Color.fromRGBO(194, 165, 94, 1),
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
border: Border.all(
|
||||
color: currentTheme.type == ThemeType.dark
|
||||
? Color.fromRGBO(177, 147, 41, 1)
|
||||
: Color.fromRGBO(125, 122, 15, 1),
|
||||
width: 2.0,
|
||||
)),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.warning_amber_rounded,
|
||||
size: 64,
|
||||
color: Colors.white.withOpacity(0.75),
|
||||
),
|
||||
SizedBox(width: 6),
|
||||
Expanded(
|
||||
child: Text(
|
||||
content,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w800,
|
||||
color: currentTheme.type == ThemeType.dark
|
||||
? Colors.white.withOpacity(0.75)
|
||||
: Colors.white.withOpacity(0.85),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user