1
0
Fork 0
forked from lthn/blockchain

GUI fixes: made disable 'Hide your wallet address from recipient' checkbox, hide 'register an alias' for auditable wallets

This commit is contained in:
arthurest 2020-06-29 14:31:19 +04:00 committed by GitHub
parent f74d327848
commit 209d9df676
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 16 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -76,8 +76,8 @@
</div>
</div>
<div class="checkbox-block">
<input type="checkbox" id="send-hide" class="style-checkbox" formControlName="hide">
<div class="checkbox-block" [ngClass]="{'disabled-checkbox-block': hideWalletAddress}">
<input type="checkbox" id="send-hide" class="style-checkbox" formControlName="hide" [checked]= "hideWalletAddress">
<label for="send-hide">{{ 'SEND.HIDE' | translate }}</label>
</div>

View file

@ -73,6 +73,15 @@
> label {
top: 3.5rem;
}
&.disabled-checkbox-block {
label {
cursor: not-allowed;
&:before {
background-color: #556576;
border: 0.1rem solid #556576;
}
}
}
}
}

View file

@ -17,6 +17,7 @@ export class SendComponent implements OnInit, OnDestroy {
isOpen = false;
localAliases = [];
isModalDialogVisible = false;
hideWalletAddress = false;
mixin: number;
currentWalletId = null;
@ -123,6 +124,10 @@ export class SendComponent implements OnInit, OnDestroy {
this.mixin = 0;
this.sendForm.controls['mixin'].disable();
}
this.hideWalletAddress = this.variablesService.currentWallet.is_auditable && !this.variablesService.currentWallet.is_watch_only;
if (this.hideWalletAddress) {
this.sendForm.controls['hide'].disable();
}
this.sendForm.reset({
address: this.variablesService.currentWallet.send_data['address'],
amount: this.variablesService.currentWallet.send_data['amount'],

View file

@ -1,16 +1,18 @@
<div class="header">
<div>
<h3 tooltip="{{ variablesService.currentWallet.name }}" placement="bottom-left" tooltipClass="table-tooltip" [delay]="500" [showWhenNoOverflow]="false">{{variablesService.currentWallet.name}}</h3>
<button [routerLink]="['/assign-alias']" *ngIf="!variablesService.currentWallet.alias.hasOwnProperty('name') && variablesService.currentWallet.loaded && variablesService.daemon_state === 2 && variablesService.currentWallet.alias_available">
<i class="icon account"></i>
<span>{{ 'WALLET.REGISTER_ALIAS' | translate }}</span>
</button>
<div class="alias" *ngIf="variablesService.currentWallet.alias.hasOwnProperty('name') && variablesService.currentWallet.loaded && variablesService.daemon_state === 2">
<span>{{variablesService.currentWallet.alias['name']}}</span>
<ng-container *ngIf="variablesService.currentWallet.alias_available">
<i class="icon edit" [routerLink]="['/edit-alias']" tooltip="{{ 'WALLET.TOOLTIPS.EDIT_ALIAS' | translate }}" placement="bottom-right" tooltipClass="table-tooltip account-tooltip" [delay]="500" [timeDelay]="500"></i>
<i class="icon transfer" [routerLink]="['/transfer-alias']" tooltip="{{ 'WALLET.TOOLTIPS.TRANSFER_ALIAS' | translate }}" placement="right" tooltipClass="table-tooltip account-tooltip" [delay]="500" [timeDelay]="500"></i>
</ng-container>
<div *ngIf="!variablesService.currentWallet.is_auditable">
<button [routerLink]="['/assign-alias']" *ngIf="!variablesService.currentWallet.alias.hasOwnProperty('name') && variablesService.currentWallet.loaded && variablesService.daemon_state === 2 && variablesService.currentWallet.alias_available">
<i class="icon account"></i>
<span>{{ 'WALLET.REGISTER_ALIAS' | translate }}</span>
</button>
<div class="alias" *ngIf="variablesService.currentWallet.alias.hasOwnProperty('name') && variablesService.currentWallet.loaded && variablesService.daemon_state === 2">
<span>{{variablesService.currentWallet.alias['name']}}</span>
<ng-container *ngIf="variablesService.currentWallet.alias_available">
<i class="icon edit" [routerLink]="['/edit-alias']" tooltip="{{ 'WALLET.TOOLTIPS.EDIT_ALIAS' | translate }}" placement="bottom-right" tooltipClass="table-tooltip account-tooltip" [delay]="500" [timeDelay]="500"></i>
<i class="icon transfer" [routerLink]="['/transfer-alias']" tooltip="{{ 'WALLET.TOOLTIPS.TRANSFER_ALIAS' | translate }}" placement="right" tooltipClass="table-tooltip account-tooltip" [delay]="500" [timeDelay]="500"></i>
</ng-container>
</div>
</div>
</div>
<div>