WIP: Implement frontend

This commit is contained in:
Simon Grimme
2022-07-21 00:29:00 +02:00
parent 6b89690180
commit cc1e02a1ca
109 changed files with 22662 additions and 670 deletions
@@ -0,0 +1,12 @@
import { HttpErrorResponse } from '@angular/common/http';
export interface ApiErrorResponse extends HttpErrorResponse {
error: {
timestamp: Date;
error: string;
status: number;
errors: object[];
message: string;
path: string;
};
}
@@ -0,0 +1,5 @@
export class CompanyDto {
slug!: string;
name!: string;
logoId?: string;
}
@@ -0,0 +1,33 @@
import {CompanyDto} from "./CompanyDto";
import {GenreDto} from "./GenreDto";
import {KeywordDto} from "./KeywordDto";
import {PlayerPerspectiveDto} from "./PlayerPerspectiveDto";
import {ThemeDto} from "./ThemeDto";
export class DetectedGameDto {
slug!: string;
title!: string;
summary?: string;
releaseDate?: Date;
userRating?: number;
criticsRating?: number;
totalRating?: number;
category?: string;
offlineCoop?: boolean;
onlineCoop?: boolean;
lanSupport?: boolean;
maxPlayers?: boolean;
coverId!: string;
screenshotIds?: string[];
videoIds?: string[];
companies?: CompanyDto[];
genres?: GenreDto[];
keywords?: KeywordDto[];
themes?: ThemeDto[];
playerPerspectives?: PlayerPerspectiveDto[];
path!: string;
isFolder!: boolean;
confirmedMatch!: boolean;
}
+4
View File
@@ -0,0 +1,4 @@
export class GenreDto {
slug!: string;
name?: string;
}
@@ -0,0 +1,4 @@
export class KeywordDto {
slug!: string;
name?: string;
}
@@ -0,0 +1,4 @@
export class PlayerPerspectiveDto {
slug!: string;
name?: string;
}
+4
View File
@@ -0,0 +1,4 @@
export class ThemeDto {
slug!: string;
name?: string;
}
+20
View File
@@ -0,0 +1,20 @@
export enum Icon {
dns = 'dns',
directions_car = 'directions_car',
list_alt = 'list_alt',
info = 'info',
lock_open = 'lock_open',
description = 'description',
help = 'help',
play_arrow = 'play_arrow',
stop = 'stop',
pause = 'pause',
error = 'error',
sync_problem = 'sync_problem',
settings = 'settings',
add = 'add',
edit = 'edit',
delete = 'delete',
remove = 'remove',
controller = 'sports_esports'
}
@@ -0,0 +1,15 @@
import { Icon } from '../enums/Icon';
export class DropDownMenuItem {
title: string;
icon: Icon;
action: () => void;
enabled: boolean;
public constructor(title: string, icon: Icon, action: () => void, enabled: boolean) {
this.title = title;
this.icon = icon;
this.action = action;
this.enabled = enabled;
}
}
@@ -0,0 +1,15 @@
import { Icon } from '../enums/Icon';
export class NavMenuItem {
title: string;
icon: Icon;
route: string;
enabled: boolean;
public constructor(title: string, icon: Icon, route: string, enabled: boolean) {
this.title = title;
this.icon = icon;
this.route = route;
this.enabled = enabled;
}
}