Commit c1ff99ee authored by dev0tion's avatar dev0tion

Add copy button to transaction ID in transaction details

parent c1a9bd3b
......@@ -29,6 +29,8 @@
<ul class="list-inline row">
<li class="list-inline-item col blockLabel">Transaction ID</li>
<li class="list-inline-item col-9 blockText blockID"><code>{{ transaction.id }}</code></li>
<span class="float-right"><a ngxClipboard [cbContent]="transaction.id" (click)="onCopiedClick()">copy</a></span>
<span class="badge badge-success list-inline-item col blockLabel" *ngIf="copied">The transaction ID has been copied to your clipboard.</span>
</ul>
</div>
<div class="modal-footer">
......
......@@ -10,12 +10,15 @@ import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
export class TransactionDetailsComponent implements OnInit {
@Input() transaction;
constructor(public activeModal: NgbActiveModal) {}
constructor(public activeModal: NgbActiveModal) {
private copied: boolean = false;
ngOnInit() {
}
ngOnInit() {
private onCopiedClick() {
this.copied = true;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment