From 0b0c5c0a332e9b23e0465969d204902484760faa Mon Sep 17 00:00:00 2001 From: GloriousCode Date: Thu, 7 Dec 2017 20:56:19 +1100 Subject: [PATCH] Minor theme changes Moving closer to spawning component dynamically for the purpose of the dashboard and trading --- web/src/app/app-routing.module.ts | 10 ++++++++ web/src/app/app.component.html | 3 ++- web/src/app/app.component.scss | 4 +-- web/src/app/app.module.ts | 8 +++++- .../pages/dashboard/dashboard.component.html | 2 +- .../pages/dashboard/dashboard.component.ts | 2 ++ .../app/pages/donate/donate.component.html | 4 +-- .../app/pages/donate/donate.component.scss | 7 +++++- .../app/pages/history/history.component.html | 3 +++ .../app/pages/history/history.component.scss | 0 .../pages/history/history.component.spec.ts | 25 +++++++++++++++++++ .../app/pages/history/history.component.ts | 15 +++++++++++ .../app/pages/trading/trading.component.html | 4 +++ .../app/pages/trading/trading.component.scss | 9 +++++++ .../pages/trading/trading.component.spec.ts | 25 +++++++++++++++++++ .../app/pages/trading/trading.component.ts | 15 +++++++++++ .../shared/buy-sell/buy-sell.component.html | 19 +++++++++++--- .../app/shared/buy-sell/buy-sell.component.ts | 4 +-- 18 files changed, 145 insertions(+), 14 deletions(-) create mode 100644 web/src/app/pages/history/history.component.html create mode 100644 web/src/app/pages/history/history.component.scss create mode 100644 web/src/app/pages/history/history.component.spec.ts create mode 100644 web/src/app/pages/history/history.component.ts create mode 100644 web/src/app/pages/trading/trading.component.html create mode 100644 web/src/app/pages/trading/trading.component.scss create mode 100644 web/src/app/pages/trading/trading.component.spec.ts create mode 100644 web/src/app/pages/trading/trading.component.ts diff --git a/web/src/app/app-routing.module.ts b/web/src/app/app-routing.module.ts index e052dfa8..36a33adc 100644 --- a/web/src/app/app-routing.module.ts +++ b/web/src/app/app-routing.module.ts @@ -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 } ]; diff --git a/web/src/app/app.component.html b/web/src/app/app.component.html index 68453880..849b01e6 100644 --- a/web/src/app/app.component.html +++ b/web/src/app/app.component.html @@ -12,7 +12,7 @@

Wallet

- add_shopping_cart  + swap_horiz 

Trading

@@ -27,6 +27,7 @@ thumb_up 

Donate

+ grade  diff --git a/web/src/app/app.component.scss b/web/src/app/app.component.scss index 6df782bd..ae2f8824 100644 --- a/web/src/app/app.component.scss +++ b/web/src/app/app.component.scss @@ -1,6 +1,6 @@ .container { - min-height: 100vh; - height:100%; + height: 100vh; + min-height:100%; } .main { diff --git a/web/src/app/app.module.ts b/web/src/app/app.module.ts index 7bf57ff9..e59d770e 100644 --- a/web/src/app/app.module.ts +++ b/web/src/app/app.module.ts @@ -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, diff --git a/web/src/app/pages/dashboard/dashboard.component.html b/web/src/app/pages/dashboard/dashboard.component.html index 2e22b349..309e3f03 100644 --- a/web/src/app/pages/dashboard/dashboard.component.html +++ b/web/src/app/pages/dashboard/dashboard.component.html @@ -1,6 +1,6 @@ - +
diff --git a/web/src/app/pages/dashboard/dashboard.component.ts b/web/src/app/pages/dashboard/dashboard.component.ts index 488a04e5..22923aa9 100644 --- a/web/src/app/pages/dashboard/dashboard.component.ts +++ b/web/src/app/pages/dashboard/dashboard.component.ts @@ -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() { } diff --git a/web/src/app/pages/donate/donate.component.html b/web/src/app/pages/donate/donate.component.html index 6308e679..90cd5da2 100644 --- a/web/src/app/pages/donate/donate.component.html +++ b/web/src/app/pages/donate/donate.component.html @@ -4,9 +4,7 @@ We give our thanks -
- -
+

If this framework helped you in any way, or you would like to support the developers working on it, please donate

diff --git a/web/src/app/pages/donate/donate.component.scss b/web/src/app/pages/donate/donate.component.scss index 5dfe9673..13f14a65 100644 --- a/web/src/app/pages/donate/donate.component.scss +++ b/web/src/app/pages/donate/donate.component.scss @@ -3,6 +3,11 @@ } .full-card { - width: 80%; + width: 30%; margin: 0px auto !important; +} + +.heart { + margin: 0px auto !important; +display:flex; } \ No newline at end of file diff --git a/web/src/app/pages/history/history.component.html b/web/src/app/pages/history/history.component.html new file mode 100644 index 00000000..c0470d21 --- /dev/null +++ b/web/src/app/pages/history/history.component.html @@ -0,0 +1,3 @@ +

+ history works! +

diff --git a/web/src/app/pages/history/history.component.scss b/web/src/app/pages/history/history.component.scss new file mode 100644 index 00000000..e69de29b diff --git a/web/src/app/pages/history/history.component.spec.ts b/web/src/app/pages/history/history.component.spec.ts new file mode 100644 index 00000000..f68be4f2 --- /dev/null +++ b/web/src/app/pages/history/history.component.spec.ts @@ -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; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ HistoryComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(HistoryComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/web/src/app/pages/history/history.component.ts b/web/src/app/pages/history/history.component.ts new file mode 100644 index 00000000..92c80aa8 --- /dev/null +++ b/web/src/app/pages/history/history.component.ts @@ -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() { + } + +} diff --git a/web/src/app/pages/trading/trading.component.html b/web/src/app/pages/trading/trading.component.html new file mode 100644 index 00000000..826064a5 --- /dev/null +++ b/web/src/app/pages/trading/trading.component.html @@ -0,0 +1,4 @@ +

+ trading works! +

+ diff --git a/web/src/app/pages/trading/trading.component.scss b/web/src/app/pages/trading/trading.component.scss new file mode 100644 index 00000000..66903595 --- /dev/null +++ b/web/src/app/pages/trading/trading.component.scss @@ -0,0 +1,9 @@ + +.mat-fab { + top: auto; + right: 30px; + bottom: 20px; + left: auto; + position: fixed; + z-index: 3; +} \ No newline at end of file diff --git a/web/src/app/pages/trading/trading.component.spec.ts b/web/src/app/pages/trading/trading.component.spec.ts new file mode 100644 index 00000000..da3ae01d --- /dev/null +++ b/web/src/app/pages/trading/trading.component.spec.ts @@ -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; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ TradingComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TradingComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/web/src/app/pages/trading/trading.component.ts b/web/src/app/pages/trading/trading.component.ts new file mode 100644 index 00000000..446023a7 --- /dev/null +++ b/web/src/app/pages/trading/trading.component.ts @@ -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() { + } + +} diff --git a/web/src/app/shared/buy-sell/buy-sell.component.html b/web/src/app/shared/buy-sell/buy-sell.component.html index 40a5d1ef..a2e2fdc5 100644 --- a/web/src/app/shared/buy-sell/buy-sell.component.html +++ b/web/src/app/shared/buy-sell/buy-sell.component.html @@ -1,3 +1,16 @@ -

- buy-sell works! -

+ + + + The best pasta + +

Best pasta restaurants

+

...

+
+ + + thumb_down The worst sushi + +

Terrible sushi restaurants

+

...

+
+
\ No newline at end of file diff --git a/web/src/app/shared/buy-sell/buy-sell.component.ts b/web/src/app/shared/buy-sell/buy-sell.component.ts index c0b2e2af..e9d0bbd7 100644 --- a/web/src/app/shared/buy-sell/buy-sell.component.ts +++ b/web/src/app/shared/buy-sell/buy-sell.component.ts @@ -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() { }