Commit abc46180 authored by dev0tion's avatar dev0tion

Add copy to clipboard at receive component

parent 1f09b6fa
......@@ -37,6 +37,7 @@
"angular2-material-datepicker": "^0.5.0",
"bootstrap": "^4.0.0-alpha.6",
"core-js": "^2.4.1",
"ngx-clipboard": "^8.0.2",
"rxjs": "^5.4.0",
"zone.js": "^0.8.10"
},
......
......@@ -3,7 +3,8 @@ import { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { HttpModule } from '@angular/http';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { ClipboardModule } from 'ngx-clipboard';
import { SharedModule } from './shared/shared.module';
......@@ -24,6 +25,7 @@ import { ReceiveComponent } from './wallet/receive/receive.component';
AppRoutingModule,
BrowserModule,
BrowserAnimationsModule,
ClipboardModule,
ReactiveFormsModule,
FormsModule,
HttpModule,
......
......@@ -12,6 +12,7 @@
</thead>
<tr>
<td>{{ address }}</td>
<td><button class="btn" type="button" ngxClipboard [cbContent]="address" (cbOnSuccess)="isCopied1=true" [class.btn-success]= "isCopied1">Copy</button>
</tr>
</table>
</div>
......
......@@ -16,13 +16,17 @@ import {NgbModal, NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';
export class ReceiveComponent {
constructor(private apiService: ApiService, private globalService: GlobalService, public activeModal: NgbActiveModal) {}
private address: any;
private address: any = "";
private errorMessage: string;
ngOnInit() {
this.getUnusedReceiveAddresses();
}
private copyAddress() {
}
private getUnusedReceiveAddresses() {
let walletInfo = new WalletInfo(this.globalService.getWalletName(), this.globalService.getCoinType())
this.apiService.getUnusedReceiveAddress(walletInfo)
......
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