CAKE-220. CAKE-241. CAKE-242.
M committed
Jan 18, 2021 at 22:52 UTC
6639d25264b54bed0144823ba42735f6e448a31c
8 files changed
+25
-21
assets/images/settings_menu.png
Binary files a/assets/images/settings_menu.png and b/assets/images/settings_menu.png differ
lib/monero/monero_wallet.dart
+3
-3
@@ -39,6 +39,9 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
39
balance = MoneroBalance(
40
fullBalance: monero_wallet.getFullBalance(accountIndex: 0),
41
unlockedBalance: monero_wallet.getFullBalance(accountIndex: 0));
42
+ _lastAutosaveTimestamp = 0;
43
+ _isSavingAfterSync = false;
44
+ _isSavingAfterNewTransaction = false;
45
_onAccountChangeReaction = reaction((_) => account, (Account account) {
46
balance = MoneroBalance(
47
fullBalance: monero_wallet.getFullBalance(accountIndex: account.id),
@@ -47,9 +50,6 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
50
subaddressList.update(accountIndex: account.id);
51
subaddress = subaddressList.subaddresses.first;
52
address = subaddress.address;
50
- _lastAutosaveTimestamp = 0;
51
- _isSavingAfterSync = false;
52
- _isSavingAfterNewTransaction = false;
53
});
54
}
55
lib/palette.dart
+1
@@ -43,6 +43,7 @@ class Palette {
43
static const Color brightOrange = Color.fromRGBO(255, 102, 0, 1.0);
44
static const Color dullGray = Color.fromRGBO(98, 98, 98, 1.0);
45
static const Color protectiveBlue = Color.fromRGBO(33, 148, 255, 1.0);
46
+ static const Color darkBlue = Color.fromRGBO(109, 128, 178, 1.0);
47
}
48
49
class PaletteDark {
lib/src/screens/backup/backup_page.dart
+1
-1
@@ -24,7 +24,7 @@ class BackupPage extends BasePage {
24
25
@override
26
Widget trailing(BuildContext context) => TrailButton(
27
- caption: S.of(context).edit,
27
+ caption: 'Change password',
28
onPressed: () =>
29
Navigator.of(context).pushNamed(Routes.editBackupPassword));
30
lib/src/screens/backup/edit_backup_password_page.dart
+1
-1
@@ -37,7 +37,7 @@ class EditBackupPasswordPage extends BasePage {
37
autocorrect: false,
38
keyboardType: TextInputType.visiblePassword,
39
controller: textEditingController,
40
- style: TextStyle(fontSize: 26, color: Colors.black)))),
40
+ style: TextStyle(fontSize: 26, color: Theme.of(context).primaryTextTheme.title.color)))),
41
Positioned(
42
child: Observer(
43
builder: (_) => PrimaryButton(
lib/src/screens/dashboard/wallet_menu.dart
+16
@@ -1,3 +1,4 @@
1
+import 'package:cake_wallet/palette.dart';
2
import 'package:cake_wallet/src/screens/dashboard/wallet_menu_item.dart';
3
import 'package:cake_wallet/utils/show_pop_up.dart';
4
import 'package:flutter/material.dart';
@@ -36,6 +37,12 @@ class WalletMenu {
37
title: S.current.address_book_menu,
38
image: Image.asset('assets/images/open_book_menu.png',
39
height: 16, width: 16)),
40
+ WalletMenuItem(
41
+ title: 'Backup',
42
+ image: Image.asset('assets/images/restore_wallet.png',
43
+ height: 16,
44
+ width: 16,
45
+ color: Palette.darkBlue)),
46
WalletMenuItem(
47
title: S.current.settings_title,
48
image: Image.asset('assets/images/settings_menu.png',
@@ -81,6 +88,15 @@ class WalletMenu {
88
Navigator.of(context).pushNamed(Routes.addressBook);
89
break;
90
case 6:
91
+ Navigator.of(context).pushNamed(Routes.auth,
92
+ arguments: (bool isAuthenticatedSuccessfully, AuthPageState auth) {
93
+ if (isAuthenticatedSuccessfully) {
94
+ auth.close();
95
+ Navigator.of(auth.context).pushNamed(Routes.backup);
96
+ }
97
+ });
98
+ break;
99
+ case 7:
100
Navigator.of(context).pushNamed(Routes.settings);
101
break;
102
default:
lib/src/widgets/trail_button.dart
+3
-3
@@ -1,4 +1,5 @@
1
import 'package:flutter/material.dart';
2
+import 'package:cake_wallet/palette.dart';
3
4
class TrailButton extends StatelessWidget {
5
TrailButton({@required this.caption, @required this.onPressed});
@@ -17,9 +18,8 @@ class TrailButton extends StatelessWidget {
18
child: Text(
19
caption,
20
style: TextStyle(
20
- color:
21
- Theme.of(context).accentTextTheme.bodyText2.color,
22
- fontWeight: FontWeight.w500,
21
+ color: Palette.blueCraiola,
22
+ fontWeight: FontWeight.w600,
23
fontSize: 14),
24
),
25
onPressed: onPressed),
lib/view_model/settings/settings_view_model.dart
-13
@@ -122,19 +122,6 @@ abstract class SettingsViewModelBase with Store {
122
onItemSelected: (ThemeBase theme) =>
123
_settingsStore.currentTheme = theme)
124
],
125
- [
126
- RegularListItem(
127
- title: 'Backup',
128
- handler: (BuildContext context) {
129
- Navigator.of(context).pushNamed(Routes.auth, arguments:
130
- (bool isAuthenticatedSuccessfully, AuthPageState auth) {
131
- auth.close();
132
- if (isAuthenticatedSuccessfully) {
133
- Navigator.of(context).pushNamed(Routes.backup);
134
- }
135
- });
136
- }),
137
- ],
125
[
126
LinkListItem(
127
title: 'Email',