Skip to content

Commit

Permalink
Merge branch 'home' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommatheussen committed Apr 25, 2018
2 parents 8ec3b07 + 8ddde8d commit 15c6c27
Show file tree
Hide file tree
Showing 18 changed files with 756 additions and 89 deletions.
202 changes: 200 additions & 2 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@angular/material": "^5.2.4",
"@angular/platform-browser": "^5.2.9",
"@angular/platform-browser-dynamic": "^5.2.9",
"chart.js": "^2.7.2",
"ngx-electron": "^1.0.4",
"rxjs": "^5.5.7",
"zone.js": "^0.8.20"
Expand Down
6 changes: 3 additions & 3 deletions client/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Component, OnInit } from '@angular/core';
import { AfterViewInit, Component } from '@angular/core';
import { UpdaterService } from './update/updater.service';

@Component({
selector: 'pokemon-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent implements OnInit {
export class AppComponent implements AfterViewInit {
constructor(private _updaterService: UpdaterService) {}

ngOnInit() {
ngAfterViewInit() {
this._updaterService.setupHandlers();
}
}
13 changes: 11 additions & 2 deletions client/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,24 @@ import {
MatButtonModule,
MatCheckboxModule,
MatDialogModule,
MatExpansionModule,
MatIconModule,
MatListModule,
MatProgressBarModule,
MatProgressSpinnerModule,
MatSidenavModule,
MatSnackBarModule,
MatTableModule,
MatToolbarModule,
MatToolbarModule
} from '@angular/material';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NgxElectronModule } from 'ngx-electron';
import { AppComponent } from './app.component';
import { CardPreviewOverlayComponent } from './card-preview/card-preview.component';
import { CardPreviewOverlayService } from './card-preview/card-preview.service';
import { ChartsComponent } from './chart/chart.component';
import { SeriesChartComponent } from './chart/series-chart.component';
import { HomeComponent } from './home/home.component';
import { IpcService } from './ipc.service';
import { SetItemComponent } from './set-item/set-item.component';
Expand All @@ -30,13 +34,16 @@ import { UpdaterService } from './update/updater.service';
declarations: [
AppComponent,
HomeComponent,
ChartsComponent,

SetItemComponent,

// MenuItemComponent,
UpdateAvailableDialogComponent,
UpdateDownloadedDialogComponent,
CardPreviewOverlayComponent
CardPreviewOverlayComponent,

SeriesChartComponent
// SettingsDialogComponent
],
imports: [
Expand All @@ -50,6 +57,8 @@ import { UpdaterService } from './update/updater.service';
MatIconModule,
MatToolbarModule,
MatCheckboxModule,
MatProgressBarModule,
MatExpansionModule,

NgxElectronModule,
BrowserModule,
Expand Down
6 changes: 3 additions & 3 deletions client/src/app/card-preview/card-preview.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, Inject, OnInit } from '@angular/core';
import { AfterViewInit, Component, Inject } from '@angular/core';
import { Subject } from 'rxjs/Subject';
import { IpcService } from '../ipc.service';
import { CardPreviewOverlayRef } from './card-preview-overlay.ref';
Expand All @@ -12,7 +12,7 @@ import {
templateUrl: './card-preview.component.html',
styleUrls: ['./card-preview.component.css']
})
export class CardPreviewOverlayComponent implements OnInit {
export class CardPreviewOverlayComponent implements AfterViewInit {
img$: Subject<string> = new Subject<string>();

constructor(
Expand All @@ -21,7 +21,7 @@ export class CardPreviewOverlayComponent implements OnInit {
private _ipcService: IpcService
) {}

ngOnInit() {
ngAfterViewInit() {
this._ipcService.setupIpcListenerOnce(
`cards:image:${this.cardData.setCode}-${this.cardData.cardNumber}`,
(event, args) => {
Expand Down
33 changes: 33 additions & 0 deletions client/src/app/chart/chart.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!-- Total collection progress -->


<!-- <mat-progress-bar mode="determinate" [value]="totalProgress"></mat-progress-bar> -->

<!-- <ngx-charts-pie-chart [results]="data" [view]="[250, 250]">
</ngx-charts-pie-chart>
Series
<ngx-charts-bar-horizontal-stacked [view]="[400, 250]" [results]="seriesData">
</ngx-charts-bar-horizontal-stacked> -->

<!-- Series collection charts -->
<!-- <div [hidden]="!chart">
<canvas id="canvas">{{ chart }}</canvas>
</div> -->

<mat-accordion>
<mat-expansion-panel>
<mat-expansion-panel-header>
<mat-panel-title>
General
</mat-panel-title>
<mat-panel-description>
<mat-progress-bar mode="determinate" [value]="totalProgress"></mat-progress-bar>
</mat-panel-description>
</mat-expansion-panel-header>
<canvas id="general">{{ generalChart }}</canvas>
</mat-expansion-panel>

<pokemon-series-chart *ngFor="let set of charts" [series]="set"></pokemon-series-chart>
</mat-accordion>
12 changes: 12 additions & 0 deletions client/src/app/chart/chart.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
:host {
display: block;
height: 100%;
}

.mat-expansion-panel-header-description {
max-width: calc(50% - 17px);
}

.mat-expansion-panel-header-title {
max-width: calc(50% - 17px);
}
Loading

0 comments on commit 15c6c27

Please sign in to comment.