Commit 7c9f731f authored by Isabell Heider's avatar Isabell Heider

Update

parent 19cb3fd9
Pipeline #270 failed with stages
in 5 minutes and 41 seconds
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router'; import { Routes, RouterModule } from '@angular/router';
import {OverviewComponent} from './overview/overview.component';
import {SelectGameComponent} from './select-game/select-game.component';
import {ErrorComponent} from './error/error.component';
const routes: Routes = []; const routes: Routes = [
{
path: 'overview',
component: OverviewComponent,
},
{
path: '',
component: SelectGameComponent,
},
{
path: '**',
component: ErrorComponent,
}
];
@NgModule({ @NgModule({
imports: [RouterModule.forRoot(routes)], imports: [RouterModule.forRoot(routes, {
useHash: true,
enableTracing: false,
relativeLinkResolution: 'legacy'
})],
exports: [RouterModule] exports: [RouterModule]
}) })
export class AppRoutingModule { } export class AppRoutingModule { }
<div fxLayout="column" fxFlexFill style="background-color: #e7e7e7"> <div fxLayout="column" fxFlexFill style="background-image: url(/assets/background.jpg)">
<app-header> <app-header>
</app-header> </app-header>
<div fxFlex> <div fxFlex>
<app-select-game></app-select-game> <router-outlet></router-outlet>
</div> </div>
<app-footer> <app-footer>
<mat-toolbar color="primary"> <mat-toolbar color="primary">
......
...@@ -13,6 +13,9 @@ import {MatButtonModule} from '@angular/material/button'; ...@@ -13,6 +13,9 @@ import {MatButtonModule} from '@angular/material/button';
import {MatFormFieldModule} from '@angular/material/form-field'; import {MatFormFieldModule} from '@angular/material/form-field';
import {MatInputModule} from '@angular/material/input'; import {MatInputModule} from '@angular/material/input';
import {MatCardModule} from '@angular/material/card'; import {MatCardModule} from '@angular/material/card';
import { OverviewComponent } from './overview/overview.component';
import { ErrorComponent } from './error/error.component';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
@NgModule({ @NgModule({
declarations: [ declarations: [
...@@ -20,6 +23,8 @@ import {MatCardModule} from '@angular/material/card'; ...@@ -20,6 +23,8 @@ import {MatCardModule} from '@angular/material/card';
HeaderComponent, HeaderComponent,
FooterComponent, FooterComponent,
SelectGameComponent, SelectGameComponent,
OverviewComponent,
ErrorComponent,
], ],
imports: [ imports: [
BrowserModule, BrowserModule,
...@@ -30,7 +35,8 @@ import {MatCardModule} from '@angular/material/card'; ...@@ -30,7 +35,8 @@ import {MatCardModule} from '@angular/material/card';
MatButtonModule, MatButtonModule,
MatFormFieldModule, MatFormFieldModule,
MatInputModule, MatInputModule,
MatCardModule MatCardModule,
MatProgressSpinnerModule,
], ],
providers: [], providers: [],
bootstrap: [AppComponent] bootstrap: [AppComponent]
......
<div style="text-align: center; margin-left: 15em; margin-right: 15em; margin-top: 5em;">
<h3>
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>
</div>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ErrorComponent } from './error.component';
describe('ErrorComponent', () => {
let component: ErrorComponent;
let fixture: ComponentFixture<ErrorComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ErrorComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ErrorComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-error',
templateUrl: './error.component.html',
styleUrls: ['./error.component.scss']
})
export class ErrorComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
<mat-toolbar color="primary"> <mat-toolbar color="primary">
<span>Tabu</span> <span>Tabu</span>
<a href="router.navigate(['/overview'])">
<img style="display: inline;" src="./assets/Icon.png" alt="logo" height="30px" width="30"/>
</a>
</mat-toolbar> </mat-toolbar>
<div style="text-align: center; margin-left: 15em; margin-right: 15em; margin-top: 5em;">
<h2>Du spielst in Team rot!</h2>
<br>
<br>
<br>
<mat-card>
<mat-card-title>Spielstand</mat-card-title>
<mat-card-content>
<br>
<center>
<table>
<tr>
<th>Team rot</th>
<th>Team blau</th>
</tr>
<tr>
<th>0</th>
<th>0</th>
</tr>
</table>
</center>
</mat-card-content>
<mat-card-actions>
<br>
<br>
<mat-card-title>Rot ist am Zug:</mat-card-title>
<br>
<button mat-raised-button color="primary">Nächste Runde</button>
<button mat-raised-button color="primary">Neues Spiel starten</button>
</mat-card-actions>
</mat-card>
</div>
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { OverviewComponent } from './overview.component';
describe('OverviewComponent', () => {
let component: OverviewComponent;
let fixture: ComponentFixture<OverviewComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ OverviewComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(OverviewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-overview',
templateUrl: './overview.component.html',
styleUrls: ['./overview.component.scss']
})
export class OverviewComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}
...@@ -6,18 +6,18 @@ ...@@ -6,18 +6,18 @@
<br> <br>
<mat-card> <mat-card>
<mat-card-title>Spielsuche</mat-card-title> <mat-card-title>Spielsuche</mat-card-title>
<mat-card-subtitle>Finde oder erstelle ein Spiel über den Spielnamen</mat-card-subtitle> <mat-card-subtitle>Finde ein Spiel über den Spielnamen oder erstelle ein neues</mat-card-subtitle>
<mat-card-content> <mat-card-content>
<form> <form>
<mat-form-field> <mat-form-field>
<mat-label>Spielname</mat-label> <mat-label>Spielname</mat-label>
<input type="text" matInput> <input type="text" pattern="[0-9A-Za-z]*" matInput>
</mat-form-field> </mat-form-field>
</form> </form>
</mat-card-content> </mat-card-content>
<mat-card-actions> <mat-card-actions>
<button mat-raised-button color="primary">Spiel erstellen</button> <button mat-raised-button color="primary">Spiel erstellen</button>
<button mat-raised-button color="primary">Spiel beitreten</button> <button mat-raised-button color="primary" (click)="joinGame($event)">Spiel beitreten</button>
</mat-card-actions> </mat-card-actions>
</mat-card> </mat-card>
</div> </div>
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
import {Router} from '@angular/router';
@Component({ @Component({
selector: 'app-select-game', selector: 'app-select-game',
...@@ -7,9 +8,16 @@ import { Component, OnInit } from '@angular/core'; ...@@ -7,9 +8,16 @@ import { Component, OnInit } from '@angular/core';
}) })
export class SelectGameComponent implements OnInit { export class SelectGameComponent implements OnInit {
constructor() { } constructor(private router: Router) { }
ngOnInit(): void { ngOnInit(): void {
} }
getSpielname(event: any): void {
event.target.value;
}
joinGame(event:any): void {
this.router.navigate(['/overview']);
}
} }
src/assets/Icon.png

119 KB | W: | H:

src/assets/Icon.png

297 KB | W: | H:

src/assets/Icon.png
src/assets/Icon.png
src/assets/Icon.png
src/assets/Icon.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment