2023-06-17 21:04:23 +02:00
|
|
|
<div class="container-xl">
|
|
|
|
<div class="text-center">
|
2023-11-25 17:49:37 +09:00
|
|
|
<h2 i18n="shared.calculator">Calculator</h2>
|
2023-06-17 21:04:23 +02:00
|
|
|
</div>
|
|
|
|
|
2023-06-18 00:16:47 +02:00
|
|
|
<ng-container *ngIf="price$ | async; else loading">
|
|
|
|
|
|
|
|
<div class="row justify-content-center">
|
2023-06-17 21:04:23 +02:00
|
|
|
|
|
|
|
<form [formGroup]="form">
|
|
|
|
<div class="input-group input-group-lg mb-1">
|
|
|
|
<div class="input-group-prepend">
|
|
|
|
<span class="input-group-text">{{ currency$ | async }}</span>
|
|
|
|
</div>
|
2024-09-13 23:23:22 +08:00
|
|
|
<input type="text" inputmode="numeric" class="form-control" formControlName="fiat" (input)="transformInput('fiat')" (click)="selectAll($event)">
|
2023-06-17 21:04:23 +02:00
|
|
|
<app-clipboard [button]="true" [text]="form.get('fiat').value" [class]="'btn btn-lg btn-secondary ml-1'"></app-clipboard>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input-group input-group-lg mb-1">
|
|
|
|
<div class="input-group-prepend">
|
2023-06-18 02:09:06 +02:00
|
|
|
<span class="input-group-text">BTC</span>
|
2023-06-17 21:04:23 +02:00
|
|
|
</div>
|
2024-09-13 23:23:22 +08:00
|
|
|
<input type="text" inputmode="numeric" class="form-control" formControlName="bitcoin" (input)="transformInput('bitcoin')" (click)="selectAll($event)">
|
2023-06-17 21:04:23 +02:00
|
|
|
<app-clipboard [button]="true" [text]="form.get('bitcoin').value" [class]="'btn btn-lg btn-secondary ml-1'"></app-clipboard>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="input-group input-group-lg mb-1">
|
|
|
|
<div class="input-group-prepend">
|
2023-11-26 15:48:44 +09:00
|
|
|
<span class="input-group-text" i18n="shared.sats">sats</span>
|
2023-06-17 21:04:23 +02:00
|
|
|
</div>
|
2024-09-13 23:23:22 +08:00
|
|
|
<input type="text" inputmode="numeric" class="form-control" formControlName="satoshis" (input)="transformInput('satoshis')" (click)="selectAll($event)">
|
2023-06-17 21:04:23 +02:00
|
|
|
<app-clipboard [button]="true" [text]="form.get('satoshis').value" [class]="'btn btn-lg btn-secondary ml-1'"></app-clipboard>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
2023-06-18 00:16:47 +02:00
|
|
|
|
|
|
|
<br>
|
|
|
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="bitcoin-satoshis-text">
|
2023-06-18 02:09:06 +02:00
|
|
|
₿
|
2023-06-18 00:16:47 +02:00
|
|
|
<span [innerHTML]="form.get('bitcoin').value | bitcoinsatoshis"></span>
|
2023-11-26 15:48:44 +09:00
|
|
|
<span class="sats" i18n="shared.sats">sats</span>
|
2023-06-18 00:16:47 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="fiat-text">
|
|
|
|
<app-fiat [value]="form.get('satoshis').value" digitsInfo="1.0-0"></app-fiat>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="row justify-content-center mt-3">
|
|
|
|
<div class="symbol">
|
|
|
|
Fiat price last updated <app-time kind="since" [time]="lastFiatPrice$ | async" [fastRender]="true"></app-time>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</ng-container>
|
2023-06-17 21:04:23 +02:00
|
|
|
|
|
|
|
<ng-template #loading>
|
|
|
|
<div class="text-center">
|
|
|
|
Waiting for price feed...
|
|
|
|
</div>
|
|
|
|
</ng-template>
|
|
|
|
|
|
|
|
</div>
|