Compare commits
No commits in common. "d0c485c0e90f7158f6976c56a965568cb7ca080f" and "af2da01729cb1382d1049dacaafb19d1f5d98f22" have entirely different histories.
d0c485c0e9
...
af2da01729
|
@ -12,5 +12,6 @@ export class AppComponent {
|
||||||
user?: Player;
|
user?: Player;
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
// Load player data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,8 @@
|
||||||
<div id="header">
|
<div id="header">
|
||||||
<p id="header-title">Doppelkopf-Stats</p>
|
<p id="header-title">Doppelkopf-Stats</p>
|
||||||
<span id="menu">
|
|
||||||
<div id="menu-desktop">
|
|
||||||
<div>Home</div>
|
|
||||||
<div>Game night</div>
|
|
||||||
<div>Stats</div>
|
|
||||||
</div>
|
|
||||||
<div id="menu-mobile">
|
|
||||||
<div>Open</div>
|
|
||||||
</div>
|
|
||||||
</span>
|
|
||||||
<span id="user-info">
|
<span id="user-info">
|
||||||
<p>{{getUserName()}}</p>
|
<p>{{getUserName()}}</p>
|
||||||
<img src="assets/images/user.png" alt="User Icon" (click)="openProfile()">
|
<img src="assets/images/user.png" alt="User Icon" (click)="openProfile()">
|
||||||
</span>
|
</span>
|
||||||
<app-profile (showProfilePopOverChange)="closeProfile()" *ngIf="showProfilePopOver" [user]="this.user"></app-profile>
|
<app-profile (showProfilePopoverChange)="closeProfile()" *ngIf="showProfilePopover" [user]="this.user"></app-profile>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -34,33 +34,3 @@
|
||||||
#user-info img:hover {
|
#user-info img:hover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 768px) {
|
|
||||||
#menu-mobile {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
#menu-desktop {
|
|
||||||
display: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media(max-width: 767px) {
|
|
||||||
#menu-desktop {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
#menu-mobile {
|
|
||||||
display: inherit;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
max-width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu div div {
|
|
||||||
padding-left: 2em;
|
|
||||||
padding-right: 2em;
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import {StorageService} from '../../services/storage.service';
|
||||||
})
|
})
|
||||||
export class HeaderComponent implements OnInit {
|
export class HeaderComponent implements OnInit {
|
||||||
|
|
||||||
showProfilePopOver: boolean = false;
|
showProfilePopover: boolean = false;
|
||||||
user?: User;
|
user?: User;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -20,11 +20,11 @@ export class HeaderComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
openProfile(): void {
|
openProfile(): void {
|
||||||
this.showProfilePopOver = true;
|
this.showProfilePopover = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
closeProfile(): void {
|
closeProfile(): void {
|
||||||
this.showProfilePopOver = false;
|
this.showProfilePopover = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
getUserName(): string {
|
getUserName(): string {
|
||||||
|
|
|
@ -10,7 +10,7 @@ export class ProfileComponent implements OnInit {
|
||||||
|
|
||||||
initialClick = true;
|
initialClick = true;
|
||||||
@Input() user?: User;
|
@Input() user?: User;
|
||||||
@Output() showProfilePopOverChange = new EventEmitter<boolean>();
|
@Output() showProfilePopoverChange = new EventEmitter<boolean>();
|
||||||
|
|
||||||
constructor(private eRef: ElementRef) {
|
constructor(private eRef: ElementRef) {
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ export class ProfileComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.eRef.nativeElement.contains(event.target)) {
|
if (!this.eRef.nativeElement.contains(event.target)) {
|
||||||
this.showProfilePopOverChange.emit(false);
|
this.showProfilePopoverChange.emit(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,10 @@
|
||||||
import {Game} from './game';
|
import {Game} from './game';
|
||||||
import {Player} from './player';
|
import {Player} from './player';
|
||||||
import {GameRules} from './gamerules';
|
|
||||||
|
|
||||||
export interface GameNight {
|
export interface GameNight {
|
||||||
gameNightId: number;
|
gameNightId: number;
|
||||||
date: Date;
|
date: Date;
|
||||||
players: Player[]; // We need players here and in the game because maybe we have 5 players for a game night and
|
players: Player[]; // We need players here and in the game because maybe we have 5 players for a game night and
|
||||||
// they switch every game
|
// they switch every game
|
||||||
rules: GameRules;
|
|
||||||
games: Game[];
|
games: Game[];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
export interface GameRules {
|
|
||||||
mandatoryAnnouncement: boolean;
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user