mirror of
https://github.com/zeldaret/website.git
synced 2026-10-01 23:31:53 -04:00
Clean up some commented code and prints
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<n64-box [number]="2" heading="FAQ">
|
||||
<n64-box heading="FAQ">
|
||||
<markdown [src]="'/assets/md/' + this.game.faq + '.md'">
|
||||
</markdown>
|
||||
</n64-box>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<n64-box [number]="1" heading="{{ meta.subtitle }}">
|
||||
<n64-box heading="{{ meta.subtitle }}">
|
||||
<strong class="key">Last updated</strong>
|
||||
<strong class="value date">{{ lastUpdate }}</strong>
|
||||
<br>
|
||||
@@ -31,43 +31,3 @@
|
||||
<n64-box [simple]="true">
|
||||
<game-chart [csvData]="csvData" [metadata]="meta"></game-chart>
|
||||
</n64-box>
|
||||
|
||||
|
||||
<!--
|
||||
<ng-container *ngFor="let chart of metrics; let i = index">
|
||||
<div class="box-wrapper">
|
||||
<n64-box [number]="i" heading="{{ game.progressMeta[i].subtitle }}">
|
||||
<strong class="key">Last updated</strong>
|
||||
<strong class="value date">{{ lastUpdate }}</strong>
|
||||
<br/>
|
||||
<hr>
|
||||
<table>
|
||||
<thead>
|
||||
<th scope="col"> {{ (totals[i] | keyvalue)[0].key }}</th>
|
||||
<ng-container *ngFor="let name of game.progressMeta[i].series; let j = index">
|
||||
<th scope="col" [ngClass]="{nonmatching: j === 0, matching: j === 1}">{{ name }}</th>
|
||||
</ng-container>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">
|
||||
<strong class="key">Total</strong>
|
||||
</th>
|
||||
<td *ngFor="let total of (totals[i] | keyvalue)[0].value; let j = index">
|
||||
<strong [ngClass]="{nonmatching: j === 0, matching: j === 1}">{{ (total * 100).toFixed(2) }}%</strong>
|
||||
</td>
|
||||
</tr>
|
||||
<tr *ngFor="let metric of chart | keyvalue: originalOrder">
|
||||
<th scope="row" class="key">{{ metric.key }}</th>
|
||||
<td *ngFor="let val of metric.value; let j = index">
|
||||
<div [ngClass]="{nonmatching: j === 0, matching: j === 1}">{{ (val * 100).toFixed(2) }}%</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</n64-box>
|
||||
<n64-box [simple]="true">
|
||||
<game-chart [csvData]="csvData" [metadata]="game.progressMeta[i]"></game-chart>
|
||||
</n64-box>
|
||||
</div>
|
||||
</ng-container> -->
|
||||
@@ -1,9 +1,7 @@
|
||||
import { KeyValue } from '@angular/common';
|
||||
import { ThrowStmt } from '@angular/compiler';
|
||||
import { Component, Input, OnChanges, OnInit } from '@angular/core';
|
||||
import { concat, forkJoin } from 'rxjs';
|
||||
import { Component, Input, OnChanges } from '@angular/core';
|
||||
import { GamesService } from 'src/app/games/games.service';
|
||||
import { IChart, IGame } from 'src/app/games/games.service.interface';
|
||||
import { IChart } from 'src/app/games/games.service.interface';
|
||||
|
||||
/**
|
||||
* A single project displayed in a box, alongside one or more graphs.
|
||||
@@ -42,7 +40,6 @@ export class GameProgressComponent implements OnChanges {
|
||||
|
||||
ngOnChanges(): void {
|
||||
// don't do anything until all inputs are provided
|
||||
console.log(this.meta);
|
||||
if (typeof this.csvData !== "object" || typeof this.meta !== "object") {
|
||||
return;
|
||||
}
|
||||
@@ -52,6 +49,7 @@ export class GameProgressComponent implements OnChanges {
|
||||
this.metrics = {};
|
||||
this.lastUpdate = null;
|
||||
|
||||
// Collect the latest numbers from the CSV data
|
||||
for (const data of this.csvData) {
|
||||
const points = data.split("\n").filter((line) => line != "");
|
||||
const latestPoint = points[points.length - 1];
|
||||
@@ -73,7 +71,6 @@ export class GameProgressComponent implements OnChanges {
|
||||
}
|
||||
|
||||
}
|
||||
console.log(this.metrics)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user