Loading src/app/app.module.ts +2 −0 Original line number Diff line number Diff line import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; Loading Loading @@ -27,6 +28,7 @@ import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; ErrorComponent, ], imports: [ HttpClientModule, BrowserModule, AppRoutingModule, BrowserAnimationsModule, Loading src/app/dao/TabuMiddlewareService.ts 0 → 100644 +32 −0 Original line number Diff line number Diff line import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { environment } from '../../environments/environment'; @Injectable({ providedIn: 'root' }) export class TabuMiddlewareService { constructor(private http: HttpClient) { } private async request(method: string, url: string, data?: any): Promise<any> { const result = this.http.request(method, url, { body: data, responseType: 'json', observe: 'body', }); return new Promise((resolve, reject) => { result.subscribe(resolve, reject); }); } getSpielSessions(): Promise<any> { return this.request('GET', `${environment.tabuMiddlewareURL}SpielSession`); } addSpielSession(event: any): Promise<any> { return this.request('POST', `${environment.tabuMiddlewareURL}addSpielSession`, event); } } src/app/error/error.component.html +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ Leider konnte die Seite nicht erreicht werden, bitte überprüfen Sie den Link oder kehren Sie auf die <a href="router.navigate(['/overview'])">Startseite</a> zurück </h3> <br> <mat-progress-spinner color="primary" mode="mode" value="value"> <mat-progress-spinner color="primary" mode="determinate" value="value"> </mat-progress-spinner> </div> Loading src/app/overview/overview.component.html +1 −3 Original line number Diff line number Diff line Loading @@ -7,8 +7,7 @@ <mat-card-title>Spielstand</mat-card-title> <mat-card-content> <br> <center> <table> <table style="align-self: center; align-content: center; align-items: center"> <tr> <th>Team rot</th> <th>Team blau</th> Loading @@ -18,7 +17,6 @@ <th>0</th> </tr> </table> </center> </mat-card-content> <mat-card-actions> <br> Loading src/app/select-game/select-game.component.html +4 −2 Original line number Diff line number Diff line <div style="text-align: center; margin-left: 15em; margin-right: 15em; margin-top: 5em;"> <mat-card class="transparent"> <h1>Willkommen bei Tabu im Online-Multiplayer-Modus</h1> <h2>Ideal im Lockdown!</h2> </mat-card> <br> <br> <br> <mat-card> <mat-card class="transparent"> <mat-card-title>Spielsuche</mat-card-title> <mat-card-subtitle>Finde ein Spiel über den Spielnamen oder erstelle ein neues</mat-card-subtitle> <mat-card-content> Loading @@ -16,7 +18,7 @@ </form> </mat-card-content> <mat-card-actions> <button mat-raised-button color="primary">Spiel erstellen</button> <button mat-raised-button color="primary" (click)="getSpielSessions()">Spiel erstellen</button> <button mat-raised-button color="primary" (click)="joinGame($event)">Spiel beitreten</button> </mat-card-actions> </mat-card> Loading Loading
src/app/app.module.ts +2 −0 Original line number Diff line number Diff line import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { HttpClientModule } from '@angular/common/http'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; Loading Loading @@ -27,6 +28,7 @@ import {MatProgressSpinnerModule} from '@angular/material/progress-spinner'; ErrorComponent, ], imports: [ HttpClientModule, BrowserModule, AppRoutingModule, BrowserAnimationsModule, Loading
src/app/dao/TabuMiddlewareService.ts 0 → 100644 +32 −0 Original line number Diff line number Diff line import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { environment } from '../../environments/environment'; @Injectable({ providedIn: 'root' }) export class TabuMiddlewareService { constructor(private http: HttpClient) { } private async request(method: string, url: string, data?: any): Promise<any> { const result = this.http.request(method, url, { body: data, responseType: 'json', observe: 'body', }); return new Promise((resolve, reject) => { result.subscribe(resolve, reject); }); } getSpielSessions(): Promise<any> { return this.request('GET', `${environment.tabuMiddlewareURL}SpielSession`); } addSpielSession(event: any): Promise<any> { return this.request('POST', `${environment.tabuMiddlewareURL}addSpielSession`, event); } }
src/app/error/error.component.html +1 −1 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ Leider konnte die Seite nicht erreicht werden, bitte überprüfen Sie den Link oder kehren Sie auf die <a href="router.navigate(['/overview'])">Startseite</a> zurück </h3> <br> <mat-progress-spinner color="primary" mode="mode" value="value"> <mat-progress-spinner color="primary" mode="determinate" value="value"> </mat-progress-spinner> </div> Loading
src/app/overview/overview.component.html +1 −3 Original line number Diff line number Diff line Loading @@ -7,8 +7,7 @@ <mat-card-title>Spielstand</mat-card-title> <mat-card-content> <br> <center> <table> <table style="align-self: center; align-content: center; align-items: center"> <tr> <th>Team rot</th> <th>Team blau</th> Loading @@ -18,7 +17,6 @@ <th>0</th> </tr> </table> </center> </mat-card-content> <mat-card-actions> <br> Loading
src/app/select-game/select-game.component.html +4 −2 Original line number Diff line number Diff line <div style="text-align: center; margin-left: 15em; margin-right: 15em; margin-top: 5em;"> <mat-card class="transparent"> <h1>Willkommen bei Tabu im Online-Multiplayer-Modus</h1> <h2>Ideal im Lockdown!</h2> </mat-card> <br> <br> <br> <mat-card> <mat-card class="transparent"> <mat-card-title>Spielsuche</mat-card-title> <mat-card-subtitle>Finde ein Spiel über den Spielnamen oder erstelle ein neues</mat-card-subtitle> <mat-card-content> Loading @@ -16,7 +18,7 @@ </form> </mat-card-content> <mat-card-actions> <button mat-raised-button color="primary">Spiel erstellen</button> <button mat-raised-button color="primary" (click)="getSpielSessions()">Spiel erstellen</button> <button mat-raised-button color="primary" (click)="joinGame($event)">Spiel beitreten</button> </mat-card-actions> </mat-card> Loading