WIP: Implement frontend

Implemented 1st version of game-detail-view
This commit is contained in:
grimsi
2022-07-24 14:53:24 +02:00
parent e11611bbe6
commit eab1cf629c
21 changed files with 1364 additions and 1162 deletions
@@ -1,7 +1,6 @@
import {AfterViewInit, Component} from '@angular/core';
import {GamesService} from "../../services/games.service";
import {DetectedGameDto} from "../../models/dtos/DetectedGameDto";
import {GameOverviewDto} from "../../models/dtos/GameOverviewDto";
@Component({
selector: 'app-gameserver-list',
@@ -10,15 +9,15 @@ import {GameOverviewDto} from "../../models/dtos/GameOverviewDto";
})
export class LibraryOverviewComponent implements AfterViewInit {
detectedGames: GameOverviewDto[] = [];
detectedGames: DetectedGameDto[] = [];
loading: boolean = true;
constructor(private gameServerService: GamesService) {
}
ngAfterViewInit(): void {
this.gameServerService.getGameOverviews().subscribe(
(detectedGames: GameOverviewDto[]) => {
this.gameServerService.getAllGames().subscribe(
(detectedGames: DetectedGameDto[]) => {
this.detectedGames = detectedGames;
this.loading = false;
}