mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Minor theme changes
Moving closer to spawning component dynamically for the purpose of the dashboard and trading
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
@@ -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>
|
||||
<mat-icon>swap_horiz</mat-icon>
|
||||
<h3>Trading</h3>
|
||||
</mat-list-item>
|
||||
<mat-list-item routerLink="history" routerLinkActive="history-highlight">
|
||||
@@ -27,6 +27,7 @@
|
||||
<mat-icon>thumb_up</mat-icon>
|
||||
<h3>Donate</h3>
|
||||
</mat-list-item>
|
||||
<mat-divider></mat-divider>
|
||||
<mat-list-item>
|
||||
<mat-icon>grade</mat-icon>
|
||||
<a href="https://github.com/thrasher-/gocryptotrader" target="_blank">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.container {
|
||||
min-height: 100vh;
|
||||
height:100%;
|
||||
height: 100vh;
|
||||
min-height:100%;
|
||||
}
|
||||
|
||||
.main {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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() {
|
||||
}
|
||||
|
||||
|
||||
@@ -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 >
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
}
|
||||
|
||||
.full-card {
|
||||
width: 80%;
|
||||
width: 30%;
|
||||
margin: 0px auto !important;
|
||||
}
|
||||
|
||||
.heart {
|
||||
margin: 0px auto !important;
|
||||
display:flex;
|
||||
}
|
||||
3
web/src/app/pages/history/history.component.html
Normal file
3
web/src/app/pages/history/history.component.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
history works!
|
||||
</p>
|
||||
0
web/src/app/pages/history/history.component.scss
Normal file
0
web/src/app/pages/history/history.component.scss
Normal file
25
web/src/app/pages/history/history.component.spec.ts
Normal file
25
web/src/app/pages/history/history.component.spec.ts
Normal 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();
|
||||
});
|
||||
});
|
||||
15
web/src/app/pages/history/history.component.ts
Normal file
15
web/src/app/pages/history/history.component.ts
Normal 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() {
|
||||
}
|
||||
|
||||
}
|
||||
4
web/src/app/pages/trading/trading.component.html
Normal file
4
web/src/app/pages/trading/trading.component.html
Normal 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>
|
||||
9
web/src/app/pages/trading/trading.component.scss
Normal file
9
web/src/app/pages/trading/trading.component.scss
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
.mat-fab {
|
||||
top: auto;
|
||||
right: 30px;
|
||||
bottom: 20px;
|
||||
left: auto;
|
||||
position: fixed;
|
||||
z-index: 3;
|
||||
}
|
||||
25
web/src/app/pages/trading/trading.component.spec.ts
Normal file
25
web/src/app/pages/trading/trading.component.spec.ts
Normal 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();
|
||||
});
|
||||
});
|
||||
15
web/src/app/pages/trading/trading.component.ts
Normal file
15
web/src/app/pages/trading/trading.component.ts
Normal 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() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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>
|
||||
@@ -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() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user