mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
CAKE-15 | implemented new design to dashboard page; created balance page; applied sync indicator to balance page; applied action buttons, page view and dots indicator to dashboard page; added colors of dashboard page to palette
This commit is contained in:
@@ -9,6 +9,7 @@ import 'package:cake_wallet/core/wallet_base.dart';
|
||||
import 'package:cake_wallet/src/domain/common/sync_status.dart';
|
||||
import 'package:cake_wallet/src/domain/common/wallet_type.dart';
|
||||
import 'package:cake_wallet/store/app_store.dart';
|
||||
import 'package:cake_wallet/generated/i18n.dart';
|
||||
|
||||
part 'dashboard_view_model.g.dart';
|
||||
|
||||
@@ -35,6 +36,8 @@ abstract class DashboardViewModelBase with Store {
|
||||
if (_wallet is MoneroWallet) {
|
||||
subname = _wallet.account?.label;
|
||||
}
|
||||
|
||||
currentPage = 0;
|
||||
}
|
||||
|
||||
@observable
|
||||
@@ -43,12 +46,34 @@ abstract class DashboardViewModelBase with Store {
|
||||
@observable
|
||||
String name;
|
||||
|
||||
@observable
|
||||
double currentPage;
|
||||
|
||||
@computed
|
||||
String get address => wallet.address;
|
||||
|
||||
@computed
|
||||
SyncStatus get status => wallet.syncStatus;
|
||||
|
||||
@computed
|
||||
String get syncStatusText {
|
||||
var statusText = '';
|
||||
|
||||
if (status is SyncingSyncStatus) {
|
||||
statusText = S.current
|
||||
.Blocks_remaining(
|
||||
status.toString());
|
||||
}
|
||||
|
||||
if (status is FailedSyncStatus) {
|
||||
statusText = S
|
||||
.current
|
||||
.please_try_to_connect_to_another_node;
|
||||
}
|
||||
|
||||
return statusText;
|
||||
}
|
||||
|
||||
@computed
|
||||
WalletBalace get balance {
|
||||
final wallet = this.wallet;
|
||||
|
||||
Reference in New Issue
Block a user