Dumb fleshout of currency listing and buy sell component

This commit is contained in:
GloriousCode
2017-12-14 17:14:43 +11:00
parent 92e8ff790b
commit cf9425a0d7
20 changed files with 255 additions and 15 deletions

View File

@@ -6,6 +6,8 @@ import { WalletComponent } from './pages/wallet/wallet.component';
import { DonateComponent } from './pages/donate/donate.component';
import { HistoryComponent } from './pages/history/history.component';
import { TradingComponent } from './pages/trading/trading.component';
import { ExchangeGridComponent } from './pages/exchange-grid/exchange-grid.component';
import { CurrencyListComponent } from './pages/currency-list/currency-list.component';
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
@@ -43,6 +45,14 @@ const routes: Routes = [
{
path: 'trading',
component: TradingComponent
},
{
path: 'exchange-grid',
component: ExchangeGridComponent
},
{
path: 'currency-list',
component: CurrencyListComponent
}
];

View File

@@ -18,7 +18,6 @@
width: 14%;
position: fixed;
margin-top: 4rem;
}
.navbar {
@@ -36,7 +35,7 @@
}
.history-highlight {
color: blue !important;
color: cornflowerblue !important;
}
.wallet-highlight {

View File

@@ -65,6 +65,9 @@ import { BuySellComponent } from './shared/buy-sell/buy-sell.component';
import { SelectedCurrencyComponent } from './shared/selected-currency/selected-currency.component';
import { TradingComponent } from './pages/trading/trading.component';
import { HistoryComponent } from './pages/history/history.component';
import { BuySellFormComponent } from './shared/buy-sell-form/buy-sell-form.component';
import { ExchangeGridComponent } from './pages/exchange-grid/exchange-grid.component';
import { CurrencyListComponent } from './pages/currency-list/currency-list.component';
@NgModule({
@@ -88,6 +91,9 @@ import { HistoryComponent } from './pages/history/history.component';
SelectedCurrencyComponent,
TradingComponent,
HistoryComponent,
BuySellFormComponent,
ExchangeGridComponent,
CurrencyListComponent,
],
imports: [
BrowserModule,

View File

@@ -0,0 +1,35 @@
<mat-list>
<h3 matSubheader>Poloniex</h3>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>BTC_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>LTC_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>ETH_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
<mat-divider></mat-divider>
<h3 matSubheader>Kraken</h3>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>BTC_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>LTC_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>ETH_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
</mat-list>

View File

@@ -0,0 +1,9 @@
.BTC {
color:orange;
}
.LTC {
color:silver;
}
.ETH {
color:darkslategrey;
}

View File

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CurrencyListComponent } from './currency-list.component';
describe('CurrencyListComponent', () => {
let component: CurrencyListComponent;
let fixture: ComponentFixture<CurrencyListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CurrencyListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CurrencyListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-currency-list',
templateUrl: './currency-list.component.html',
styleUrls: ['./currency-list.component.scss']
})
export class CurrencyListComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@@ -9,5 +9,5 @@
.heart {
margin: 0px auto !important;
display:flex;
display:flex;
}

View File

@@ -0,0 +1,60 @@
<mat-accordion>
<mat-expansion-panel >
<mat-expansion-panel-header>
<mat-panel-title>
Poloniex
</mat-panel-title>
<mat-panel-description>
</mat-panel-description>
</mat-expansion-panel-header>
image and blurb
<form class="form-content">
<mat-list>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>BTC_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>LTC_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>ETH_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
</mat-list>
</form>
</mat-expansion-panel><mat-expansion-panel >
<mat-expansion-panel-header>
<mat-panel-title>
Kraken
</mat-panel-title>
<mat-panel-description>
</mat-panel-description>
</mat-expansion-panel-header>
image and blurb
<form class="form-content">
<mat-list>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>BTC_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>LTC_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
<mat-list-item >
<mat-icon matListIcon>attach_money</mat-icon>
<h4 matLine>ETH_USD</h4>
<button mat-button>SELECT</button>
</mat-list-item>
</mat-list>
</form>
</mat-expansion-panel>
</mat-accordion>

View File

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ExchangeGridComponent } from './exchange-grid.component';
describe('ExchangeGridComponent', () => {
let component: ExchangeGridComponent;
let fixture: ComponentFixture<ExchangeGridComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ExchangeGridComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ExchangeGridComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-exchange-grid',
templateUrl: './exchange-grid.component.html',
styleUrls: ['./exchange-grid.component.scss']
})
export class ExchangeGridComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@@ -1,4 +1,2 @@
<p>
trading works!
</p>
<app-buy-sell></app-buy-sell>
<button matTooltip="Trade" mat-fab color="accent" class="mat-fab mat-fab-bottom-right"><mat-icon >swap_horiz</mat-icon></button>

View File

@@ -0,0 +1,3 @@
<p>
buy-sell-form works!
</p>

View File

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { BuySellFormComponent } from './buy-sell-form.component';
describe('BuySellFormComponent', () => {
let component: BuySellFormComponent;
let fixture: ComponentFixture<BuySellFormComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ BuySellFormComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(BuySellFormComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-buy-sell-form',
templateUrl: './buy-sell-form.component.html',
styleUrls: ['./buy-sell-form.component.scss']
})
export class BuySellFormComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@@ -1,16 +1,14 @@
<mat-tab-group>
<mat-tab>
<ng-template mat-tab-label>
The <em>best</em> pasta
BUY
</ng-template>
<h1>Best pasta restaurants</h1>
<p>...</p>
<app-buy-sell-form></app-buy-sell-form>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon>thumb_down</mat-icon> The worst sushi
SELL
</ng-template>
<h1>Terrible sushi restaurants</h1>
<p>...</p>
<app-buy-sell-form></app-buy-sell-form>
</mat-tab>
</mat-tab-group>

View File

@@ -8,5 +8,7 @@
<app-selected-currency></app-selected-currency>
<div class="flex-spacer"></div>
<theme-picker></theme-picker>
&nbsp;
&nbsp;
</mat-toolbar>
</nav>

View File

@@ -1,10 +1,10 @@
<button mat-button>POLONIEX: BTC_USD </button>
<button mat-icon-button>
<button mat-button routerLink="exchange-grid" matTooltip="Change currency">POLONIEX: BTC_USD (placeholder)</button>
<button mat-icon-button routerLink="currency-list" matTooltip="View currency list">
<mat-icon>
view_list
</mat-icon>
</button>
<button mat-icon-button>
<button mat-icon-button routerLink="exchange-grid" matTooltip="View exchange grid">
<mat-icon>
view_stream
</mat-icon>