From 94f5b5c46b38aef1a36fc88edc0f08d55033dd1e Mon Sep 17 00:00:00 2001 From: Patrick Mueller Date: Sat, 3 Sep 2022 15:20:09 +0200 Subject: [PATCH] Responsiveness wohoooo --- .../components/profile/profile.component.scss | 17 ++++++++++++----- src/app/models/doppelkopf/game.ts | 1 + src/app/models/doppelkopf/gameNight.ts | 10 ++++++++++ src/app/pages/home/home.component.ts | 1 + 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 src/app/models/doppelkopf/gameNight.ts diff --git a/src/app/components/profile/profile.component.scss b/src/app/components/profile/profile.component.scss index e5f3f00..1a71751 100644 --- a/src/app/components/profile/profile.component.scss +++ b/src/app/components/profile/profile.component.scss @@ -3,13 +3,20 @@ #profile-popover { z-index: 1; position: fixed; - right: 1em; - top: $header_height + 1em; + top: $header_height; color: $text; background-color: $secondary; - width: 15em; - border-radius: 1em; - padding: 1em; + width: 100%; +} + +@media (min-width: 768px) { + #profile-popover { + width: 15em; + right: 1em; + top: $header_height + 1em; + border-radius: 1em; + padding: 1em; + } } h2.heading { diff --git a/src/app/models/doppelkopf/game.ts b/src/app/models/doppelkopf/game.ts index e4ec73f..4f9ce1e 100644 --- a/src/app/models/doppelkopf/game.ts +++ b/src/app/models/doppelkopf/game.ts @@ -8,4 +8,5 @@ export interface Game { foxesCaught: number; announcements: Announcement[]; solo?: Solo; + againstTheElders: boolean; } diff --git a/src/app/models/doppelkopf/gameNight.ts b/src/app/models/doppelkopf/gameNight.ts new file mode 100644 index 0000000..463fd21 --- /dev/null +++ b/src/app/models/doppelkopf/gameNight.ts @@ -0,0 +1,10 @@ +import {Game} from './game'; +import {Player} from './player'; + +export interface GameNight { + gameNightId: number; + date: Date; + 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 + games: Game[]; +} diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index be7252e..b73d386 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -17,6 +17,7 @@ export class HomeComponent implements OnInit { } ngOnInit(): void { + // TODO: First try to read existing session data this.authenticateUser(); }