diff --git a/assets/images/settings_menu.png b/assets/images/settings_menu.png index 35ef51aee..eef0ce0d2 100644 Binary files a/assets/images/settings_menu.png and b/assets/images/settings_menu.png differ diff --git a/lib/monero/monero_wallet.dart b/lib/monero/monero_wallet.dart index 048ca952e..df83bdb1b 100644 --- a/lib/monero/monero_wallet.dart +++ b/lib/monero/monero_wallet.dart @@ -39,6 +39,9 @@ abstract class MoneroWalletBase extends WalletBase with Store { balance = MoneroBalance( fullBalance: monero_wallet.getFullBalance(accountIndex: 0), unlockedBalance: monero_wallet.getFullBalance(accountIndex: 0)); + _lastAutosaveTimestamp = 0; + _isSavingAfterSync = false; + _isSavingAfterNewTransaction = false; _onAccountChangeReaction = reaction((_) => account, (Account account) { balance = MoneroBalance( fullBalance: monero_wallet.getFullBalance(accountIndex: account.id), @@ -47,9 +50,6 @@ abstract class MoneroWalletBase extends WalletBase with Store { subaddressList.update(accountIndex: account.id); subaddress = subaddressList.subaddresses.first; address = subaddress.address; - _lastAutosaveTimestamp = 0; - _isSavingAfterSync = false; - _isSavingAfterNewTransaction = false; }); } diff --git a/lib/palette.dart b/lib/palette.dart index 5f18ac62f..336f7b7f9 100644 --- a/lib/palette.dart +++ b/lib/palette.dart @@ -43,6 +43,7 @@ class Palette { static const Color brightOrange = Color.fromRGBO(255, 102, 0, 1.0); static const Color dullGray = Color.fromRGBO(98, 98, 98, 1.0); static const Color protectiveBlue = Color.fromRGBO(33, 148, 255, 1.0); + static const Color darkBlue = Color.fromRGBO(109, 128, 178, 1.0); } class PaletteDark { diff --git a/lib/src/screens/backup/backup_page.dart b/lib/src/screens/backup/backup_page.dart index 3d88acc50..158815205 100644 --- a/lib/src/screens/backup/backup_page.dart +++ b/lib/src/screens/backup/backup_page.dart @@ -24,7 +24,7 @@ class BackupPage extends BasePage { @override Widget trailing(BuildContext context) => TrailButton( - caption: S.of(context).edit, + caption: 'Change password', onPressed: () => Navigator.of(context).pushNamed(Routes.editBackupPassword)); diff --git a/lib/src/screens/backup/edit_backup_password_page.dart b/lib/src/screens/backup/edit_backup_password_page.dart index d0f4c8fd1..2eeb9b149 100644 --- a/lib/src/screens/backup/edit_backup_password_page.dart +++ b/lib/src/screens/backup/edit_backup_password_page.dart @@ -37,7 +37,7 @@ class EditBackupPasswordPage extends BasePage { autocorrect: false, keyboardType: TextInputType.visiblePassword, controller: textEditingController, - style: TextStyle(fontSize: 26, color: Colors.black)))), + style: TextStyle(fontSize: 26, color: Theme.of(context).primaryTextTheme.title.color)))), Positioned( child: Observer( builder: (_) => PrimaryButton( diff --git a/lib/src/screens/dashboard/wallet_menu.dart b/lib/src/screens/dashboard/wallet_menu.dart index 273cdd9bf..936a7e629 100644 --- a/lib/src/screens/dashboard/wallet_menu.dart +++ b/lib/src/screens/dashboard/wallet_menu.dart @@ -1,3 +1,4 @@ +import 'package:cake_wallet/palette.dart'; import 'package:cake_wallet/src/screens/dashboard/wallet_menu_item.dart'; import 'package:cake_wallet/utils/show_pop_up.dart'; import 'package:flutter/material.dart'; @@ -36,6 +37,12 @@ class WalletMenu { title: S.current.address_book_menu, image: Image.asset('assets/images/open_book_menu.png', height: 16, width: 16)), + WalletMenuItem( + title: 'Backup', + image: Image.asset('assets/images/restore_wallet.png', + height: 16, + width: 16, + color: Palette.darkBlue)), WalletMenuItem( title: S.current.settings_title, image: Image.asset('assets/images/settings_menu.png', @@ -81,6 +88,15 @@ class WalletMenu { Navigator.of(context).pushNamed(Routes.addressBook); break; case 6: + Navigator.of(context).pushNamed(Routes.auth, + arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) { + if (isAuthenticatedSuccessfully) { + auth.close(); + Navigator.of(auth.context).pushNamed(Routes.backup); + } + }); + break; + case 7: Navigator.of(context).pushNamed(Routes.settings); break; default: diff --git a/lib/src/widgets/trail_button.dart b/lib/src/widgets/trail_button.dart index 73d8d39b2..dcd0703d2 100644 --- a/lib/src/widgets/trail_button.dart +++ b/lib/src/widgets/trail_button.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:cake_wallet/palette.dart'; class TrailButton extends StatelessWidget { TrailButton({@required this.caption, @required this.onPressed}); @@ -17,9 +18,8 @@ class TrailButton extends StatelessWidget { child: Text( caption, style: TextStyle( - color: - Theme.of(context).accentTextTheme.bodyText2.color, - fontWeight: FontWeight.w500, + color: Palette.blueCraiola, + fontWeight: FontWeight.w600, fontSize: 14), ), onPressed: onPressed), diff --git a/lib/view_model/settings/settings_view_model.dart b/lib/view_model/settings/settings_view_model.dart index eb2623f75..9da79b19b 100644 --- a/lib/view_model/settings/settings_view_model.dart +++ b/lib/view_model/settings/settings_view_model.dart @@ -122,19 +122,6 @@ abstract class SettingsViewModelBase with Store { onItemSelected: (ThemeBase theme) => _settingsStore.currentTheme = theme) ], - [ - RegularListItem( - title: 'Backup', - handler: (BuildContext context) { - Navigator.of(context).pushNamed(Routes.auth, arguments: - (bool isAuthenticatedSuccessfully, AuthPageState auth) { - auth.close(); - if (isAuthenticatedSuccessfully) { - Navigator.of(context).pushNamed(Routes.backup); - } - }); - }), - ], [ LinkListItem( title: 'Email',