diff --git a/web/src/app/app.component.html b/web/src/app/app.component.html index 91d75dd4..82274694 100644 --- a/web/src/app/app.component.html +++ b/web/src/app/app.component.html @@ -1,5 +1,5 @@ - - + + diff --git a/web/src/app/app.component.scss b/web/src/app/app.component.scss index 7eb898db..1cd6e354 100644 --- a/web/src/app/app.component.scss +++ b/web/src/app/app.component.scss @@ -9,11 +9,12 @@ align-items: center; justify-content: center; padding: 20px 70px 0; - min-width:80%; + min-width:94%; + margin: 10px auto; } .sidebar{ - width:20%; + width:16%; } .dashboard-highlight { diff --git a/web/src/app/app.module.ts b/web/src/app/app.module.ts index 0c77a587..cdce2a10 100644 --- a/web/src/app/app.module.ts +++ b/web/src/app/app.module.ts @@ -21,6 +21,7 @@ import { MatProgressSpinnerModule, MatSidenavModule, MatListModule, + MatSortModule } from '@angular/material'; @@ -80,6 +81,7 @@ import * as Rx from 'rxjs/Rx'; MatProgressSpinnerModule, MatSidenavModule, MatListModule, + MatSortModule, ], providers: [ElectronService,WebsocketService,WebsocketHandlerService, SidebarService], bootstrap: [AppComponent] diff --git a/web/src/app/pages/settings/settings.component.html b/web/src/app/pages/settings/settings.component.html index 610d6e4f..ed6955b7 100644 --- a/web/src/app/pages/settings/settings.component.html +++ b/web/src/app/pages/settings/settings.component.html @@ -2,7 +2,7 @@ - Save + save diff --git a/web/src/app/pages/settings/settings.component.scss b/web/src/app/pages/settings/settings.component.scss index a4e6a72e..982c89c3 100644 --- a/web/src/app/pages/settings/settings.component.scss +++ b/web/src/app/pages/settings/settings.component.scss @@ -1,16 +1,7 @@ -.example-form { - min-width: 150px; - width: 100%; -} - -.example-full-width { - width: 100%; -} - // FAB .mat-fab { top: auto; - right: 20px; + right: 30px; bottom: 20px; left: auto; position: fixed; diff --git a/web/src/app/pages/wallet/wallet.component.html b/web/src/app/pages/wallet/wallet.component.html index 4fdd1ad5..f26ab348 100644 --- a/web/src/app/pages/wallet/wallet.component.html +++ b/web/src/app/pages/wallet/wallet.component.html @@ -3,26 +3,81 @@ Wallet Summary - - - - - - - - - - - - - - - {{total.coin}} - {{total.balance}} - - - - - - + + Coin Totals + + {{coin.icon}} + {{coin.coin}} + {{coin.balance}} + + + + + + Coins Offline + + {{coin.icon}} + {{coin.coin}} + {{coin.balance}} + + + + + + Coins Online + + {{coin.icon}} + {{coin.coin}} + {{coin.balance}} + + + + + + Online Summary + + {{coinIcon('BTC')}} + Address: {{coin.address}} + {{coin.balance}}{{coin.coin}} - {{coin.percentage}}% + + + + + {{coinIcon('LTC')}} + Address: {{coin.address}} + {{coin.balance}}{{coin.coin}} - {{coin.percentage}}% + + + + + {{coinIcon('ETH')}} + Address: {{coin.address}} + {{coin.balance}}{{coin.coin}} - {{coin.percentage}}% + + + + + + Offline Summary + + {{coinIcon('BTC')}} + Address: {{coin.address}} + {{coin.balance}}{{coin.coin}} - {{coin.percentage}}% + + + + + {{coinIcon('LTC')}} + Address: {{coin.address}} + {{coin.balance}}{{coin.coin}} - {{coin.percentage}}% + + + + + {{coinIcon('ETH')}} + Address: {{coin.address}} + {{coin.balance}}{{coin.coin}} - {{coin.percentage}}% + + \ No newline at end of file diff --git a/web/src/app/pages/wallet/wallet.component.scss b/web/src/app/pages/wallet/wallet.component.scss index 0adfea4e..e5989f67 100644 --- a/web/src/app/pages/wallet/wallet.component.scss +++ b/web/src/app/pages/wallet/wallet.component.scss @@ -1,4 +1,14 @@ .wallet-card { width: 80%; margin: 10px auto; +} + +.BTC { + color:orange; +} +.LTC { + color:silver; +} +.ETH { + color:darkslategrey; } \ No newline at end of file diff --git a/web/src/app/pages/wallet/wallet.component.ts b/web/src/app/pages/wallet/wallet.component.ts index b5283e63..c0a67370 100644 --- a/web/src/app/pages/wallet/wallet.component.ts +++ b/web/src/app/pages/wallet/wallet.component.ts @@ -1,18 +1,20 @@ import { Component, OnInit } from '@angular/core'; import { WebsocketHandlerService } from './../../services/websocket-handler/websocket-handler.service'; -import { Wallet } from './../../shared/classes/wallet'; - +import { Wallet, CoinTotal } from './../../shared/classes/wallet'; +import {Sort} from '@angular/material'; @Component({ selector: 'app-wallet', templateUrl: './wallet.component.html', styleUrls: ['./wallet.component.scss'] }) + export class WalletComponent implements OnInit { private ws: WebsocketHandlerService; private failCount = 0; private timer: any; public wallet: Wallet; + displayedColumns = ['coin', 'balance']; private getWalletMessage = { Event: 'GetPortfolio', @@ -25,9 +27,36 @@ export class WalletComponent implements OnInit { if (msg.Event === 'GetPortfolio') { console.log(JSON.stringify(msg.data)); this.wallet = msg.data; + + this.attachIcon(this.wallet.coin_totals); + this.attachIcon(this.wallet.coins_offline); + this.attachIcon(this.wallet.coins_online); + + this.attachIcon(this.wallet.offline_summary.BTC); + this.attachIcon(this.wallet.offline_summary.ETH); + this.attachIcon(this.wallet.offline_summary.LTC); + + this.attachIcon(this.wallet.online_summary.BTC); + this.attachIcon(this.wallet.online_summary.ETH); + this.attachIcon(this.wallet.online_summary.LTC); } }); } + + public coinIcon(coin:string) :string { + switch(coin) { + case "BTC": return "attach_money"; + case "LTC": return "attach_money"; + case "ETH": return "attach_money"; + } + } + +public attachIcon(items:CoinTotal[]) :void { + for(var i = 0; i should go inside of a element. --> - + GoCryptoTrader diff --git a/web/src/app/shared/sidebar/sidebar.component.scss b/web/src/app/shared/sidebar/sidebar.component.scss index c2a89ec0..aec098e4 100644 --- a/web/src/app/shared/sidebar/sidebar.component.scss +++ b/web/src/app/shared/sidebar/sidebar.component.scss @@ -3,6 +3,8 @@ width:20%; } + + .dashboard-highlight { color: green !important; } diff --git a/web/src/styles.scss b/web/src/styles.scss index 40bb237b..f14345bf 100644 --- a/web/src/styles.scss +++ b/web/src/styles.scss @@ -8,6 +8,8 @@ body { } + + .loading-spinner { margin-left:50%; margin-right:50%; @@ -20,7 +22,9 @@ body { margin: 10px auto; } - +.mat-drawer { + background: none !important; +} @import '~@angular/material/prebuilt-themes/indigo-pink.css';