This commit is contained in:
M 2020-10-12 11:47:20 +03:00
parent 9cb7e77a5e
commit 9a169254a6
5 changed files with 163 additions and 96 deletions

View file

@ -0,0 +1 @@
4dc2ef1ba73deeed13cd85894dacb10b

View file

@ -354,7 +354,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = 32J6BB6VUS; DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -493,7 +493,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = 32J6BB6VUS; DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (
@ -526,7 +526,7 @@
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 7;
DEVELOPMENT_TEAM = 32J6BB6VUS; DEVELOPMENT_TEAM = 32J6BB6VUS;
ENABLE_BITCODE = NO; ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = ( FRAMEWORK_SEARCH_PATHS = (

View file

@ -29,7 +29,8 @@ Future<void> migrate_android_v1() async {
await android_migrate_wallets(appDocDir: appDocDir); await android_migrate_wallets(appDocDir: appDocDir);
} }
Future<void> ios_migrate_v1(Box<WalletInfo> walletInfoSource, Box<Trade> tradeSource, Box<Contact> contactSource) async { Future<void> ios_migrate_v1(Box<WalletInfo> walletInfoSource,
Box<Trade> tradeSource, Box<Contact> contactSource) async {
final prefs = await SharedPreferences.getInstance(); final prefs = await SharedPreferences.getInstance();
if (prefs.getBool('ios_migration_v1_completed') ?? false) { if (prefs.getBool('ios_migration_v1_completed') ?? false) {
@ -137,6 +138,11 @@ Future<void> ios_migrate_wallet_passwords() async {
final walletsDir = Directory('${appDocDir.path}/wallets'); final walletsDir = Directory('${appDocDir.path}/wallets');
final moneroWalletsDir = Directory('${walletsDir.path}/monero'); final moneroWalletsDir = Directory('${walletsDir.path}/monero');
if (!moneroWalletsDir.existsSync() || moneroWalletsDir.listSync().isEmpty) {
await prefs.setBool('ios_migration_wallet_passwords_completed', true);
return;
}
moneroWalletsDir.listSync().forEach((item) async { moneroWalletsDir.listSync().forEach((item) async {
try { try {
if (item is Directory) { if (item is Directory) {

View file

@ -58,7 +58,7 @@ class Router {
return CupertinoPageRoute<void>( return CupertinoPageRoute<void>(
builder: (_) => getIt.get<SetupPinCodePage>( builder: (_) => getIt.get<SetupPinCodePage>(
param1: (BuildContext context, dynamic _) => param1: (BuildContext context, dynamic _) =>
Navigator.pushNamed(context, Routes.newWalletType)), Navigator.pushNamed(context, Routes.newWallet)),
fullscreenDialog: true); fullscreenDialog: true);
case Routes.newWalletType: case Routes.newWalletType:
@ -128,7 +128,7 @@ class Router {
return CupertinoPageRoute<void>( return CupertinoPageRoute<void>(
builder: (_) => getIt.get<SetupPinCodePage>( builder: (_) => getIt.get<SetupPinCodePage>(
param1: (BuildContext context, dynamic _) => param1: (BuildContext context, dynamic _) =>
Navigator.pushNamed(context, Routes.restoreWalletType)), Navigator.pushNamed(context, Routes.restoreWalletOptions)),
fullscreenDialog: true); fullscreenDialog: true);
case Routes.seed: case Routes.seed:

View file

@ -14,26 +14,38 @@ class WelcomePage extends BasePage {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Scaffold( return Scaffold(
backgroundColor: Theme.of(context).backgroundColor, backgroundColor: Theme
.of(context)
.backgroundColor,
resizeToAvoidBottomPadding: false, resizeToAvoidBottomPadding: false,
body: SafeArea(child: body(context))); body: SafeArea(child: body(context)));
} }
@override @override
Widget body(BuildContext context) { Widget body(BuildContext context) {
final welcomeImage = getIt.get<SettingsStore>().isDarkTheme final welcomeImage = getIt
.get<SettingsStore>()
.isDarkTheme
? welcomeImageDark : welcomeImageLight; ? welcomeImageDark : welcomeImageLight;
final newWalletImage = Image.asset('assets/images/new_wallet.png', final newWalletImage = Image.asset('assets/images/new_wallet.png',
height: 12, height: 12,
width: 12, width: 12,
color: Theme.of(context).accentTextTheme.headline.decorationColor); color: Theme
.of(context)
.accentTextTheme
.headline
.decorationColor);
final restoreWalletImage = Image.asset('assets/images/restore_wallet.png', final restoreWalletImage = Image.asset('assets/images/restore_wallet.png',
height: 12, height: 12,
width: 12, width: 12,
color: Theme.of(context).primaryTextTheme.title.color); color: Theme
.of(context)
.primaryTextTheme
.title
.color);
return Container( return WillPopScope(onWillPop: () async =>, child: Container(
padding: EdgeInsets.all(24), padding: EdgeInsets.all(24),
child: Column( child: Column(
children: <Widget>[ children: <Widget>[
@ -54,11 +66,17 @@ class WelcomePage extends BasePage {
Padding( Padding(
padding: EdgeInsets.only(top: 24), padding: EdgeInsets.only(top: 24),
child: Text( child: Text(
S.of(context).welcome, S
.of(context)
.welcome,
style: TextStyle( style: TextStyle(
fontSize: 18, fontSize: 18,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme.display3.color, color: Theme
.of(context)
.accentTextTheme
.display3
.color,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -66,11 +84,17 @@ class WelcomePage extends BasePage {
Padding( Padding(
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: Text( child: Text(
S.of(context).cake_wallet, S
.of(context)
.cake_wallet,
style: TextStyle( style: TextStyle(
fontSize: 36, fontSize: 36,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
color: Theme.of(context).primaryTextTheme.title.color, color: Theme
.of(context)
.primaryTextTheme
.title
.color,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -78,11 +102,17 @@ class WelcomePage extends BasePage {
Padding( Padding(
padding: EdgeInsets.only(top: 5), padding: EdgeInsets.only(top: 5),
child: Text( child: Text(
S.of(context).first_wallet_text, S
.of(context)
.first_wallet_text,
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
fontWeight: FontWeight.w500, fontWeight: FontWeight.w500,
color: Theme.of(context).accentTextTheme.display3.color, color: Theme
.of(context)
.accentTextTheme
.display3
.color,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@ -92,32 +122,62 @@ class WelcomePage extends BasePage {
Column( Column(
children: <Widget>[ children: <Widget>[
Text( Text(
S.of(context).please_make_selection, S
.of(context)
.please_make_selection,
style: TextStyle( style: TextStyle(
fontSize: 12, fontSize: 12,
fontWeight: FontWeight.normal, fontWeight: FontWeight.normal,
color: Theme.of(context).accentTextTheme.display3.color, color: Theme
.of(context)
.accentTextTheme
.display3
.color,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 24), padding: EdgeInsets.only(top: 24),
child: PrimaryImageButton( child: PrimaryImageButton(
onPressed: () => Navigator.pushNamed(context, Routes.newWallet), onPressed: () =>
Navigator.pushNamed(context,
Routes.newWalletFromWelcome),
image: newWalletImage, image: newWalletImage,
text: S.of(context).create_new, text: S
color: Theme.of(context).accentTextTheme.subtitle.decorationColor, .of(context)
textColor: Theme.of(context).accentTextTheme.headline.decorationColor, .create_new,
color: Theme
.of(context)
.accentTextTheme
.subtitle
.decorationColor,
textColor: Theme
.of(context)
.accentTextTheme
.headline
.decorationColor,
), ),
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 10), padding: EdgeInsets.only(top: 10),
child: PrimaryImageButton( child: PrimaryImageButton(
onPressed: () => Navigator.pushNamed(context, Routes.restoreWalletOptions), onPressed: () =>
Navigator.pushNamed(context,
Routes.restoreWalletOptionsFromWelcome),
image: restoreWalletImage, image: restoreWalletImage,
text: S.of(context).restore_wallet, text: S
color: Theme.of(context).accentTextTheme.caption.color, .of(context)
textColor: Theme.of(context).primaryTextTheme.title.color), .restore_wallet,
color: Theme
.of(context)
.accentTextTheme
.caption
.color,
textColor: Theme
.of(context)
.primaryTextTheme
.title
.color),
) )
], ],
) )
@ -126,6 +186,6 @@ class WelcomePage extends BasePage {
) )
], ],
) )
); ));
} }
} }