fixed lint warnings; renamed action sheet title
This commit is contained in:
parent
5a551a5e3b
commit
ac656802c9
@ -26,16 +26,11 @@ export class HeadNavComponent {
|
|||||||
constructor(private navCtrl: NavController, private http: Http, private api: ApiProvider, public currency: CurrencyProvider, public actionSheetCtrl: ActionSheetController) {
|
constructor(private navCtrl: NavController, private http: Http, private api: ApiProvider, public currency: CurrencyProvider, public actionSheetCtrl: ActionSheetController) {
|
||||||
}
|
}
|
||||||
|
|
||||||
private resetSearch(): void {
|
|
||||||
this.q = '';
|
|
||||||
this.loading = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public search(): void {
|
public search(): void {
|
||||||
let apiPrefix: string = this.api.apiPrefix;
|
let apiPrefix: string = this.api.apiPrefix;
|
||||||
|
|
||||||
this.http.get(apiPrefix + 'block/' + this.q).subscribe(
|
this.http.get(apiPrefix + 'block/' + this.q).subscribe(
|
||||||
function (data: any) {
|
function (data: any): void {
|
||||||
this.resetSearch();
|
this.resetSearch();
|
||||||
console.log('block', data);
|
console.log('block', data);
|
||||||
let parsedData: any = JSON.parse(data._body);
|
let parsedData: any = JSON.parse(data._body);
|
||||||
@ -45,7 +40,7 @@ export class HeadNavComponent {
|
|||||||
}.bind(this),
|
}.bind(this),
|
||||||
() => {
|
() => {
|
||||||
this.http.get(apiPrefix + 'tx/' + this.q).subscribe(
|
this.http.get(apiPrefix + 'tx/' + this.q).subscribe(
|
||||||
function (data: any) {
|
function (data: any): void {
|
||||||
this.resetSearch();
|
this.resetSearch();
|
||||||
console.log('tx', data);
|
console.log('tx', data);
|
||||||
let parsedData: any = JSON.parse(data._body);
|
let parsedData: any = JSON.parse(data._body);
|
||||||
@ -55,7 +50,7 @@ export class HeadNavComponent {
|
|||||||
}.bind(this),
|
}.bind(this),
|
||||||
() => {
|
() => {
|
||||||
this.http.get(apiPrefix + 'addr/' + this.q).subscribe(
|
this.http.get(apiPrefix + 'addr/' + this.q).subscribe(
|
||||||
function (data: any) {
|
function (data: any): void {
|
||||||
this.resetSearch();
|
this.resetSearch();
|
||||||
console.log('addr', data);
|
console.log('addr', data);
|
||||||
let parsedData: any = JSON.parse(data._body);
|
let parsedData: any = JSON.parse(data._body);
|
||||||
@ -98,16 +93,16 @@ export class HeadNavComponent {
|
|||||||
2000
|
2000
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private resetSearch(): void {
|
||||||
|
this.q = '';
|
||||||
|
this.loading = false;
|
||||||
|
}
|
||||||
/* tslint:enable:no-unused-variable */
|
/* tslint:enable:no-unused-variable */
|
||||||
|
|
||||||
public changeCurrency() {
|
public changeCurrency(): void {
|
||||||
console.log('changeCurrency');
|
let actionSheet: any = this.actionSheetCtrl.create({
|
||||||
this.presentActionSheet();
|
title: 'Change Denomination',
|
||||||
}
|
|
||||||
|
|
||||||
presentActionSheet() {
|
|
||||||
let actionSheet = this.actionSheetCtrl.create({
|
|
||||||
title: 'Change Currency',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: 'USD',
|
text: 'USD',
|
||||||
@ -135,10 +130,7 @@ export class HeadNavComponent {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
role: 'cancel',
|
role: 'cancel'
|
||||||
handler: () => {
|
|
||||||
console.log('Cancel clicked');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user