Minor theme changes

Moving closer to spawning component dynamically for the purpose of the dashboard and trading
This commit is contained in:
GloriousCode
2017-12-07 20:56:19 +11:00
parent 5e25072a13
commit 0b0c5c0a33
18 changed files with 145 additions and 14 deletions

View File

@@ -4,6 +4,8 @@ import { AboutComponent } from './pages/about/about.component';
import { DashboardComponent } from './pages/dashboard/dashboard.component';
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 { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
@@ -33,6 +35,14 @@ const routes: Routes = [
{
path: 'donate',
component: DonateComponent
},
{
path: 'history',
component: HistoryComponent
},
{
path: 'trading',
component: TradingComponent
}
];

View File

@@ -12,7 +12,7 @@
<h3>Wallet</h3>
</mat-list-item>
<mat-list-item routerLink="trading" routerLinkActive="trading-highlight">
<mat-icon>add_shopping_cart</mat-icon>&nbsp;
<mat-icon>swap_horiz</mat-icon>&nbsp;
<h3>Trading</h3>
</mat-list-item>
<mat-list-item routerLink="history" routerLinkActive="history-highlight">
@@ -27,6 +27,7 @@
<mat-icon>thumb_up</mat-icon>&nbsp;
<h3>Donate</h3>
</mat-list-item>
<mat-divider></mat-divider>
<mat-list-item>
<mat-icon>grade</mat-icon>&nbsp;
<a href="https://github.com/thrasher-/gocryptotrader" target="_blank">

View File

@@ -1,6 +1,6 @@
.container {
min-height: 100vh;
height:100%;
height: 100vh;
min-height:100%;
}
.main {

View File

@@ -24,7 +24,8 @@ import {
MatSortModule,
MatExpansionModule,
MatLineModule,
MatTooltipModule
MatTooltipModule,
MatTabsModule,
} from '@angular/material';
@@ -62,6 +63,8 @@ import { MyOrdersComponent } from './shared/my-orders/my-orders.component';
import { OrdersComponent } from './shared/orders/orders.component';
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';
@NgModule({
@@ -83,6 +86,8 @@ import { SelectedCurrencyComponent } from './shared/selected-currency/selected-c
BuySellComponent,
DonateComponent,
SelectedCurrencyComponent,
TradingComponent,
HistoryComponent,
],
imports: [
BrowserModule,
@@ -106,6 +111,7 @@ import { SelectedCurrencyComponent } from './shared/selected-currency/selected-c
MatExpansionModule,
MatLineModule,
MatTooltipModule,
MatTabsModule,
],
providers: [
ElectronService,

View File

@@ -1,6 +1,6 @@
<button matTooltip="Trade" mat-fab color="accent" class="mat-fab mat-fab-bottom-right"><mat-icon >swap_horiz</mat-icon></button>
<ng-template app-buy-sell></ng-template>
<div style="width:97%;">
<mat-grid-list cols="3" rowHeight="24rem">
<mat-grid-tile [colspan]="tile.columns" [rowspan]="tile.rows" *ngFor="let tile of dashboard.tiles">

View File

@@ -1,5 +1,6 @@
import {Component, OnInit }from '@angular/core';
@Component( {
selector:'app-dashboard',
templateUrl:'./dashboard.component.html',
@@ -9,6 +10,7 @@ styleUrls:['./dashboard.component.scss'],
export class DashboardComponent implements OnInit {
public dashboard:any;
public expanded:boolean = false;
constructor() {
}

View File

@@ -4,9 +4,7 @@
<mat-card-subtitle>We give our thanks</mat-card-subtitle>
</mat-card-header>
<mat-card-content>
<div style="margin: 0px auto" >
<img src="/assets/early-dumb-donate.png"/>
</div>
<img class="heart" src="/assets/early-dumb-donate.png"/>
<p>If this framework helped you in any way, or you would like to support the developers working on it, please donate</p>
<mat-list>
<mat-list-item >

View File

@@ -3,6 +3,11 @@
}
.full-card {
width: 80%;
width: 30%;
margin: 0px auto !important;
}
.heart {
margin: 0px auto !important;
display:flex;
}

View File

@@ -0,0 +1,3 @@
<p>
history works!
</p>

View File

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { HistoryComponent } from './history.component';
describe('HistoryComponent', () => {
let component: HistoryComponent;
let fixture: ComponentFixture<HistoryComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HistoryComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HistoryComponent);
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-history',
templateUrl: './history.component.html',
styleUrls: ['./history.component.scss']
})
export class HistoryComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@@ -0,0 +1,4 @@
<p>
trading works!
</p>
<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,9 @@
.mat-fab {
top: auto;
right: 30px;
bottom: 20px;
left: auto;
position: fixed;
z-index: 3;
}

View File

@@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TradingComponent } from './trading.component';
describe('TradingComponent', () => {
let component: TradingComponent;
let fixture: ComponentFixture<TradingComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ TradingComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(TradingComponent);
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-trading',
templateUrl: './trading.component.html',
styleUrls: ['./trading.component.scss']
})
export class TradingComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}

View File

@@ -1,3 +1,16 @@
<p>
buy-sell works!
</p>
<mat-tab-group>
<mat-tab>
<ng-template mat-tab-label>
The <em>best</em> pasta
</ng-template>
<h1>Best pasta restaurants</h1>
<p>...</p>
</mat-tab>
<mat-tab>
<ng-template mat-tab-label>
<mat-icon>thumb_down</mat-icon> The worst sushi
</ng-template>
<h1>Terrible sushi restaurants</h1>
<p>...</p>
</mat-tab>
</mat-tab-group>

View File

@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import { Component, OnInit,Directive, ViewContainerRef } from '@angular/core';
@Component({
selector: 'app-buy-sell',
@@ -7,7 +7,7 @@ import { Component, OnInit } from '@angular/core';
})
export class BuySellComponent implements OnInit {
constructor() { }
constructor(public viewContainerRef: ViewContainerRef) { }
ngOnInit() {
}