forked from lthn/blockchain
fix update status wallet (#259)
* add disabled btn setting_wallet * add build html * fix update status wallet
This commit is contained in:
parent
e02c269c17
commit
1e0d085727
4 changed files with 25 additions and 3 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -16,7 +16,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button [routerLink]="['/details']" routerLinkActive="active" tooltip="{{ 'WALLET.TOOLTIPS.SETTINGS' | translate }}" placement="left" tooltipClass="table-tooltip account-tooltip" [delay]="500" [timeDelay]="500" [disabled]="variablesService.daemon_state !== 2">
|
||||
<button [routerLink]="['/details']" routerLinkActive="active" tooltip="{{ 'WALLET.TOOLTIPS.SETTINGS' | translate }}" placement="left" tooltipClass="table-tooltip account-tooltip" [delay]="500" [timeDelay]="500" [disabled]="variablesService.daemon_state !== 2 || !walletLoaded">
|
||||
<i class="icon details"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ export class WalletComponent implements OnInit, OnDestroy {
|
|||
copyAnimation = false;
|
||||
copyAnimationTimeout;
|
||||
balanceTooltip;
|
||||
walletLoaded;
|
||||
activeTab = 'history';
|
||||
public mining = false;
|
||||
public currentPage = 1;
|
||||
|
|
@ -203,6 +204,7 @@ export class WalletComponent implements OnInit, OnDestroy {
|
|||
this.variablesService.currentWallet.wakeAlias = false;
|
||||
}
|
||||
});
|
||||
this.updateWalletStatus();
|
||||
}
|
||||
resetPaginationValues() {
|
||||
this.ngZone.run(() => {
|
||||
|
|
@ -369,4 +371,13 @@ export class WalletComponent implements OnInit, OnDestroy {
|
|||
clearTimeout(this.copyAnimationTimeout);
|
||||
}
|
||||
|
||||
updateWalletStatus() {
|
||||
this.backend.eventSubscribe('update_wallet_status', (data) => {
|
||||
const wallet_state = data.wallet_state;
|
||||
this.walletLoaded = false;
|
||||
if (wallet_state === 2) {
|
||||
this.walletLoaded = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue