replace actionsheet with popover
This commit is contained in:
parent
bcf5c54121
commit
66e8cbc911
@ -7,6 +7,6 @@
|
|||||||
},
|
},
|
||||||
"proxies": [{
|
"proxies": [{
|
||||||
"path": "/api",
|
"path": "/api",
|
||||||
"proxyUrl": "http://localhost:3000/api"
|
"proxyUrl": "https://bch-insight.bitpay.com/api"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
|
|||||||
4
app/src/components/denomination/denomination.html
Normal file
4
app/src/components/denomination/denomination.html
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<!-- Generated template for the DenominationComponent component -->
|
||||||
|
<div>
|
||||||
|
{{text}}
|
||||||
|
</div>
|
||||||
19
app/src/components/denomination/denomination.module.ts
Normal file
19
app/src/components/denomination/denomination.module.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { IonicModule } from 'ionic-angular';
|
||||||
|
import { DenominationComponent } from './denomination';
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
DenominationComponent
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
IonicModule
|
||||||
|
],
|
||||||
|
exports: [
|
||||||
|
DenominationComponent
|
||||||
|
],
|
||||||
|
entryComponents: [
|
||||||
|
DenominationComponent
|
||||||
|
]
|
||||||
|
})
|
||||||
|
export class DenominationComponentModule {}
|
||||||
3
app/src/components/denomination/denomination.scss
Normal file
3
app/src/components/denomination/denomination.scss
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
denomination {
|
||||||
|
|
||||||
|
}
|
||||||
22
app/src/components/denomination/denomination.ts
Normal file
22
app/src/components/denomination/denomination.ts
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generated class for the DenominationComponent component.
|
||||||
|
*
|
||||||
|
* See https://angular.io/docs/ts/latest/api/core/index/ComponentMetadata-class.html
|
||||||
|
* for more info on Angular Components.
|
||||||
|
*/
|
||||||
|
@Component({
|
||||||
|
selector: 'denomination',
|
||||||
|
templateUrl: 'denomination.html'
|
||||||
|
})
|
||||||
|
export class DenominationComponent {
|
||||||
|
|
||||||
|
public text: string;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
console.log('Hello DenominationComponent Component');
|
||||||
|
this.text = 'Hello World';
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -4,7 +4,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<ion-title>{{title}}</ion-title>
|
<ion-title>{{title}}</ion-title>
|
||||||
<ion-buttons end>
|
<ion-buttons end>
|
||||||
<button ion-button (click)="changeCurrency()">
|
<button ion-button (click)="changeCurrency($event)">
|
||||||
<ion-icon name="logo-bitcoin" *ngIf="currency.currencySymbol !== 'USD'"></ion-icon><ion-icon name="logo-usd" *ngIf="currency.currencySymbol === 'USD'"></ion-icon> {{ currency.currencySymbol }}
|
<ion-icon name="logo-bitcoin" *ngIf="currency.currencySymbol !== 'USD'"></ion-icon><ion-icon name="logo-usd" *ngIf="currency.currencySymbol === 'USD'"></ion-icon> {{ currency.currencySymbol }}
|
||||||
</button>
|
</button>
|
||||||
<button ion-button icon-only (click)="toggleSearch()">
|
<button ion-button icon-only (click)="toggleSearch()">
|
||||||
|
|||||||
@ -1,13 +1,15 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { IonicModule } from 'ionic-angular';
|
import { IonicModule } from 'ionic-angular';
|
||||||
import { HeadNavComponent } from './head-nav';
|
import { HeadNavComponent } from './head-nav';
|
||||||
|
import { DenominationComponentModule } from '../denomination/denomination.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
HeadNavComponent
|
HeadNavComponent
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicModule
|
IonicModule,
|
||||||
|
DenominationComponentModule
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
HeadNavComponent
|
HeadNavComponent
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import { Http } from '@angular/http';
|
|||||||
import { ApiProvider } from '../../providers/api/api';
|
import { ApiProvider } from '../../providers/api/api';
|
||||||
import { CurrencyProvider } from '../../providers/currency/currency';
|
import { CurrencyProvider } from '../../providers/currency/currency';
|
||||||
import { ActionSheetController } from 'ionic-angular';
|
import { ActionSheetController } from 'ionic-angular';
|
||||||
|
import { PopoverController } from 'ionic-angular';
|
||||||
|
import { DenominationComponent } from '../denomination/denomination';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generated class for the HeadNavComponent component.
|
* Generated class for the HeadNavComponent component.
|
||||||
@ -24,7 +26,14 @@ export class HeadNavComponent {
|
|||||||
public q: string;
|
public q: string;
|
||||||
public badQuery: boolean = false;
|
public badQuery: boolean = false;
|
||||||
|
|
||||||
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,
|
||||||
|
public popoverCtrl: PopoverController
|
||||||
|
) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public search(): void {
|
public search(): void {
|
||||||
@ -102,7 +111,8 @@ export class HeadNavComponent {
|
|||||||
}
|
}
|
||||||
/* tslint:enable:no-unused-variable */
|
/* tslint:enable:no-unused-variable */
|
||||||
|
|
||||||
public changeCurrency(): void {
|
public changeCurrency(myEvent: any): void {
|
||||||
|
/*
|
||||||
let actionSheet: any = this.actionSheetCtrl.create({
|
let actionSheet: any = this.actionSheetCtrl.create({
|
||||||
title: 'Change Denomination',
|
title: 'Change Denomination',
|
||||||
buttons: [
|
buttons: [
|
||||||
@ -137,6 +147,12 @@ export class HeadNavComponent {
|
|||||||
]
|
]
|
||||||
});
|
});
|
||||||
actionSheet.present();
|
actionSheet.present();
|
||||||
|
*/
|
||||||
|
|
||||||
|
let popover: any = this.popoverCtrl.create(DenominationComponent);
|
||||||
|
popover.present({
|
||||||
|
ev: myEvent
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public toggleSearch(): void {
|
public toggleSearch(): void {
|
||||||
|
|||||||
@ -16,16 +16,18 @@
|
|||||||
<latest-blocks [numBlocks]="6" [showTimeAs]="'age'" [showAllBlocksButton]="true"></latest-blocks>
|
<latest-blocks [numBlocks]="6" [showTimeAs]="'age'" [showAllBlocksButton]="true"></latest-blocks>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
<div>
|
<div>
|
||||||
<h1>Latest Transactions</h1>
|
<h1>Latest Transactions</h1>
|
||||||
<latest-transactions [refreshSeconds]="8"></latest-transactions>
|
<latest-transactions [refreshSeconds]="8"></latest-transactions>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
|
|
||||||
<div class="about">
|
<div class="about">
|
||||||
<h2>About</h2>
|
<h2>About</h2>
|
||||||
<p><strong>insight</strong> is an <a href="https://insight.is/"
|
<p><strong>insight</strong> is an <a href="https://insight.is/"
|
||||||
target="_blank">open-source Bitcoin blockchain explorer</a> with complete REST and websocket APIs that can be used for writing web wallets and other apps that need more advanced blockchain queries than provided by bitcoind RPC. Check out the <a href="https://github.com/bitpay/insight-ui" target="_blank">source code</a>.</p>
|
target="_blank">open-source Bitcoin blockchain explorer</a> with complete REST and websocket APIs that can be used for writing web wallets and other apps that need more advanced blockchain queries than provided by bitcoind RPC. Check out the <a href="https://github.com/bitpay/insight-ui" target="_blank">source code</a>.</p>
|
||||||
<p><strong>insight</strong> is still in development, so be sure to report any bugs and provide feedback for improvement at our <a href="https://github.com/bitpay/insight-ui/issues" target="_blank">github issue tracker</a>.</p>
|
<p><strong>insight</strong> is still in development, so be sure to report any bugs and provide feedback for improvement at our <a href="https://github.com/bitpay/insight/issues" target="_blank">github issue tracker</a>.</p>
|
||||||
<div id="powered" class="row">
|
<div id="powered" class="row">
|
||||||
<div class="powered-text">
|
<div class="powered-text">
|
||||||
<small class="text-muted">Powered by</small>
|
<small class="text-muted">Powered by</small>
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export class CurrencyProvider {
|
|||||||
private loading: boolean;
|
private loading: boolean;
|
||||||
|
|
||||||
constructor(public http: Http, private api: ApiProvider) {
|
constructor(public http: Http, private api: ApiProvider) {
|
||||||
this.defaultCurrency = 'BTC';
|
this.defaultCurrency = 'BCH';
|
||||||
this.currencySymbol = this.defaultCurrency;
|
this.currencySymbol = this.defaultCurrency;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user