Skip to content

Commit

Permalink
default receive amount (#357)
Browse files Browse the repository at this point in the history
better setting name, nano icon, fix small min. receive appearing as 0 NANO, better setting value for automatic receive methods
  • Loading branch information
keerifox committed Mar 30, 2021
1 parent e7a4fa1 commit 614e3cf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
8 changes: 8 additions & 0 deletions src/app/components/configure-app/configure-app.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,11 @@
#node-stats-table td {
padding-right: 20px;
}

.icon-nano-logo {
margin: 13px 11px;
width: 32px;
background-color: currentcolor;
-webkit-mask-image: url('assets/img/nano-mark-simple.svg');
mask-image: url('assets/img/nano-mark-simple.svg');
}
5 changes: 3 additions & 2 deletions src/app/components/configure-app/configure-app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,13 @@ <h3 class="uk-card-title">Wallet Settings</h3>
<div class="uk-form-horizontal">

<div class="uk-margin">
<label class="uk-form-label">Min Receive [NANO] <span uk-icon="icon: info;" uk-tooltip title="Minimum NANO amount to receive. Transactions below this amount will be ignored by the wallet both for receiving and in the transaction list. Set to blank or 0 to accept all transactions."></span></label>
<label class="uk-form-label">Min. Receive Amount <span uk-icon="icon: info;" uk-tooltip title="Minimum NANO amount to receive. Transactions below this amount will be ignored by the wallet both for receiving and in the transaction list. Set to blank or 0 to accept all transactions."></span></label>
<div class="uk-form-controls">
<div uk-grid>
<div class="uk-width-1-1">
<div class="uk-inline uk-width-1-1">
<input [(ngModel)]="minimumReceive" class="uk-input uk-margin-small-bottom" id="form-horizontal-text4" type="text" placeholder="0.000001">
<label class="uk-form-icon uk-link-reset uk-link-muted icon-nano-logo" for="form-horizontal-amount"></label>
<input [(ngModel)]="minimumReceive" class="uk-input" style="padding-left: 52px !important;" id="form-horizontal-text4" type="text" placeholder="Leave blank to accept transactions of any amount">
</div>

</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/configure-app/configure-app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ export class ConfigureAppComponent implements OnInit {
selectedMultiplierOption: number = this.multiplierOptions[0].value;

pendingOptions = [
{ name: 'Largest Amount First', value: 'amount' },
{ name: 'Oldest Transaction First', value: 'date' },
{ name: 'Automatic - Largest Amount First', value: 'amount' },
{ name: 'Automatic - Oldest Transaction First', value: 'date' },
{ name: 'Manual', value: 'manual' },
];
selectedPendingOption = this.pendingOptions[0].value;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/receive/receive.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ <h3 class="uk-margin-remove-bottom">Incoming Transactions</h3>
<table class="uk-table uk-table-striped uk-table-small" *ngIf="settings.settings.minimumReceive">
<thead>
<tr class="uk-alert uk-alert-primary missing-accounts-hint">
<td colspan="4" style="text-align: center;"><span uk-icon="icon: info"></span> Minimum Receive is set to <a class="hint-action" routerLink="/configure-app" routerLinkActive="active">{{ util.nano.mnanoToRaw(this.settings.settings.minimumReceive) | rai: 'mnano,true' | amountsplit: 0 }}{{ util.nano.mnanoToRaw(this.settings.settings.minimumReceive) | rai: 'mnano,true' | amountsplit: 1 }} NANO</a>, transactions below this amount will be hidden.</td>
<td colspan="4" style="text-align: center;"><span uk-icon="icon: info"></span> Minimum Receive is set to <a class="hint-action" routerLink="/configure-app" routerLinkActive="active" *ngIf="( util.nano.mnanoToRaw(this.settings.settings.minimumReceive).toFixed().length > 24 ) else amountInRaw">{{ util.nano.mnanoToRaw(this.settings.settings.minimumReceive).toFixed() | rai: 'mnano,true' | amountsplit: 0 }}{{ util.nano.mnanoToRaw(this.settings.settings.minimumReceive).toFixed() | rai: 'mnano,true' | amountsplit: 1 }} NANO</a><ng-template #amountInRaw><a class="hint-action" routerLink="/configure-app" routerLinkActive="active">{{ util.nano.mnanoToRaw(this.settings.settings.minimumReceive).toFixed() }} raw</a></ng-template>, transactions below this amount will be hidden.</td>
</tr>
</thead>
</table>
Expand Down
4 changes: 2 additions & 2 deletions src/app/services/app-settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class AppSettingsService {
serverAPI: null,
serverWS: null,
serverAuth: null,
minimumReceive: null,
minimumReceive: '0.000001',
walletVersion: 1,
lightModeEnabled: false,
identiconsStyle: 'nanoidenticons',
Expand Down Expand Up @@ -222,7 +222,7 @@ export class AppSettingsService {
serverAPI: null,
serverWS: null,
serverAuth: null,
minimumReceive: null,
minimumReceive: '0.000001',
walletVersion: 1,
lightModeEnabled: false,
identiconsStyle: 'nanoidenticons',
Expand Down

0 comments on commit 614e3cf

Please sign in to comment.