mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-24 15:10:19 +00:00
Reorganisation + Electron fixes (#118)
* Updates package versions
* Updating versions with RCs
* Updated landing page with stock images
* Begins refactoring of websocket
Adds Help component
* Dark theme for charts
* event Event
* Adds cryptocurrency font
Updates wallet to use it
* Rejigs the location of assets
* rxjs update
wallet font correction
* renaming websocket service
* Refactors websocket use
Destroys and subscribes appropriately
Also handles when websocket is not available with intervals
* Fixes issues with electron by rebasing with Maxime GRIS electron builder
* License change
* Readme update
* Parses available and enabled currencies to create an object {Name:X, Enabled:Y}
* Adds methods to convert from string arrays to objects with enabled status for all currencies
* Uses a localstorage cache for config for 15 minutes
* Moves handling of settings to config object
* Fix typescripting
* Fixes issue with saving and loading
* Slows websocket repeats
Adds cool new dictionary style item and iterable.
Updatres currency-list.component to list all enabled currencies and exchanges (still doesn't do anything)
* Updates selected-currency.component to display all currencies ticker updates if there is no selected currency
Will display only selected currency results once it is set
Sets a new property to ensure all currency names are consistent for currency list plans
* Fixes issue where only one component could listen to the websocket at once
Allows you to select a currency in exchange grid mode
* Adds selected currency support to buy & sell components
Updates selected currency ticker to update on change faster
* Adds Online status indicator
* Removal of console.logs for working features
* Allows currency-list.component to aggregate on currency and list exchanges that match it
* Highlights selected currency in currency-list.component
Allows you to select a currency
This commit is contained in:
@@ -3,6 +3,7 @@ import { ElectronService } from './providers/electron.service';
|
||||
import { MatSidenav } from '@angular/material';
|
||||
import { SidebarService } from './services/sidebar/sidebar.service';
|
||||
import { Router, NavigationEnd } from '@angular/router';
|
||||
import {WebsocketResponseHandlerService }from './services/websocket-response-handler/websocket-response-handler.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -11,10 +12,12 @@ import { Router, NavigationEnd } from '@angular/router';
|
||||
})
|
||||
export class AppComponent {
|
||||
sidebarService: SidebarService
|
||||
public currentUrl:string;
|
||||
public currentUrl: string;
|
||||
@ViewChild('sidenav') public sidenav: MatSidenav;
|
||||
private ws : WebsocketResponseHandlerService;
|
||||
public isConnected :boolean = false;
|
||||
|
||||
constructor(public electronService: ElectronService,something: SidebarService, private router:Router) {
|
||||
constructor(public electronService: ElectronService, sidebarService: SidebarService, private router: Router, private websocketHandler: WebsocketResponseHandlerService) {
|
||||
|
||||
if (electronService.isElectron()) {
|
||||
console.log('Mode electron');
|
||||
@@ -26,18 +29,26 @@ export class AppComponent {
|
||||
console.log('Mode web');
|
||||
}
|
||||
|
||||
this.sidebarService = something;
|
||||
|
||||
router.events.subscribe(event => {
|
||||
this.isConnected = this.websocketHandler.isConnected;
|
||||
this.sidebarService = sidebarService;
|
||||
router.events.subscribe(event => {
|
||||
|
||||
if (event instanceof NavigationEnd ) {
|
||||
console.log("current url",event.url); // event.url has current url
|
||||
this.currentUrl = event.url;
|
||||
}
|
||||
});
|
||||
if (event instanceof NavigationEnd) {
|
||||
this.isConnected = this.websocketHandler.isConnected;
|
||||
console.log("current url", event.url); // event.url has current url
|
||||
this.currentUrl = event.url;
|
||||
}
|
||||
});
|
||||
var interval = setInterval(() => {
|
||||
this.isConnected = this.websocketHandler.isConnected;
|
||||
}, 2000);
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.sidebarService.setSidenav(this.sidenav);
|
||||
}
|
||||
//This will be replaced with a log in prompt which will then add the credentials to session storage
|
||||
window.sessionStorage["username"] = "admin";
|
||||
window.sessionStorage["password"] = "e7cf3ef4f17c3999a94f2c6f612e8a888e5b1026878e4e19398b23bd38ec221a";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user