mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-18 16:55:58 +00:00
CAKE-220. CAKE-241. CAKE-242.
This commit is contained in:
parent
33fb213922
commit
6639d25264
8 changed files with 25 additions and 21 deletions
Binary file not shown.
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 1.2 KiB |
|
@ -39,6 +39,9 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
|
||||||
balance = MoneroBalance(
|
balance = MoneroBalance(
|
||||||
fullBalance: monero_wallet.getFullBalance(accountIndex: 0),
|
fullBalance: monero_wallet.getFullBalance(accountIndex: 0),
|
||||||
unlockedBalance: monero_wallet.getFullBalance(accountIndex: 0));
|
unlockedBalance: monero_wallet.getFullBalance(accountIndex: 0));
|
||||||
|
_lastAutosaveTimestamp = 0;
|
||||||
|
_isSavingAfterSync = false;
|
||||||
|
_isSavingAfterNewTransaction = false;
|
||||||
_onAccountChangeReaction = reaction((_) => account, (Account account) {
|
_onAccountChangeReaction = reaction((_) => account, (Account account) {
|
||||||
balance = MoneroBalance(
|
balance = MoneroBalance(
|
||||||
fullBalance: monero_wallet.getFullBalance(accountIndex: account.id),
|
fullBalance: monero_wallet.getFullBalance(accountIndex: account.id),
|
||||||
|
@ -47,9 +50,6 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance> with Store {
|
||||||
subaddressList.update(accountIndex: account.id);
|
subaddressList.update(accountIndex: account.id);
|
||||||
subaddress = subaddressList.subaddresses.first;
|
subaddress = subaddressList.subaddresses.first;
|
||||||
address = subaddress.address;
|
address = subaddress.address;
|
||||||
_lastAutosaveTimestamp = 0;
|
|
||||||
_isSavingAfterSync = false;
|
|
||||||
_isSavingAfterNewTransaction = false;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ class Palette {
|
||||||
static const Color brightOrange = Color.fromRGBO(255, 102, 0, 1.0);
|
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 dullGray = Color.fromRGBO(98, 98, 98, 1.0);
|
||||||
static const Color protectiveBlue = Color.fromRGBO(33, 148, 255, 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 {
|
class PaletteDark {
|
||||||
|
|
|
@ -24,7 +24,7 @@ class BackupPage extends BasePage {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget trailing(BuildContext context) => TrailButton(
|
Widget trailing(BuildContext context) => TrailButton(
|
||||||
caption: S.of(context).edit,
|
caption: 'Change password',
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
Navigator.of(context).pushNamed(Routes.editBackupPassword));
|
Navigator.of(context).pushNamed(Routes.editBackupPassword));
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ class EditBackupPasswordPage extends BasePage {
|
||||||
autocorrect: false,
|
autocorrect: false,
|
||||||
keyboardType: TextInputType.visiblePassword,
|
keyboardType: TextInputType.visiblePassword,
|
||||||
controller: textEditingController,
|
controller: textEditingController,
|
||||||
style: TextStyle(fontSize: 26, color: Colors.black)))),
|
style: TextStyle(fontSize: 26, color: Theme.of(context).primaryTextTheme.title.color)))),
|
||||||
Positioned(
|
Positioned(
|
||||||
child: Observer(
|
child: Observer(
|
||||||
builder: (_) => PrimaryButton(
|
builder: (_) => PrimaryButton(
|
||||||
|
|
|
@ -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/src/screens/dashboard/wallet_menu_item.dart';
|
||||||
import 'package:cake_wallet/utils/show_pop_up.dart';
|
import 'package:cake_wallet/utils/show_pop_up.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
@ -36,6 +37,12 @@ class WalletMenu {
|
||||||
title: S.current.address_book_menu,
|
title: S.current.address_book_menu,
|
||||||
image: Image.asset('assets/images/open_book_menu.png',
|
image: Image.asset('assets/images/open_book_menu.png',
|
||||||
height: 16, width: 16)),
|
height: 16, width: 16)),
|
||||||
|
WalletMenuItem(
|
||||||
|
title: 'Backup',
|
||||||
|
image: Image.asset('assets/images/restore_wallet.png',
|
||||||
|
height: 16,
|
||||||
|
width: 16,
|
||||||
|
color: Palette.darkBlue)),
|
||||||
WalletMenuItem(
|
WalletMenuItem(
|
||||||
title: S.current.settings_title,
|
title: S.current.settings_title,
|
||||||
image: Image.asset('assets/images/settings_menu.png',
|
image: Image.asset('assets/images/settings_menu.png',
|
||||||
|
@ -81,6 +88,15 @@ class WalletMenu {
|
||||||
Navigator.of(context).pushNamed(Routes.addressBook);
|
Navigator.of(context).pushNamed(Routes.addressBook);
|
||||||
break;
|
break;
|
||||||
case 6:
|
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);
|
Navigator.of(context).pushNamed(Routes.settings);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:cake_wallet/palette.dart';
|
||||||
|
|
||||||
class TrailButton extends StatelessWidget {
|
class TrailButton extends StatelessWidget {
|
||||||
TrailButton({@required this.caption, @required this.onPressed});
|
TrailButton({@required this.caption, @required this.onPressed});
|
||||||
|
@ -17,9 +18,8 @@ class TrailButton extends StatelessWidget {
|
||||||
child: Text(
|
child: Text(
|
||||||
caption,
|
caption,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color:
|
color: Palette.blueCraiola,
|
||||||
Theme.of(context).accentTextTheme.bodyText2.color,
|
fontWeight: FontWeight.w600,
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
fontSize: 14),
|
fontSize: 14),
|
||||||
),
|
),
|
||||||
onPressed: onPressed),
|
onPressed: onPressed),
|
||||||
|
|
|
@ -122,19 +122,6 @@ abstract class SettingsViewModelBase with Store {
|
||||||
onItemSelected: (ThemeBase theme) =>
|
onItemSelected: (ThemeBase theme) =>
|
||||||
_settingsStore.currentTheme = 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(
|
LinkListItem(
|
||||||
title: 'Email',
|
title: 'Email',
|
||||||
|
|
Loading…
Reference in a new issue