Skip to content

Commit

Permalink
hotseat-name-screen and hotseat-wallboard-screen are completed
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-ost committed May 17, 2023
1 parent c352cd1 commit c7220d1
Show file tree
Hide file tree
Showing 7 changed files with 265 additions and 74 deletions.
2 changes: 1 addition & 1 deletion tas/backend/helpers/mongodb.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ def get_wallboard_tables_max():
r = mongoDB().settings.find_one({'_id': 'wallboard_tables_max'})
if r is None:
wtmd = get_config('util')['wallboard_tables_max_default']
set_wallboard_players_max(wtmd)
set_wallboard_tables_max(wtmd)
return wtmd
else:
return r['count']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ export class HotseatNameScreenComponent implements OnInit, OnDestroy {
icon: 'pi pi-users',
routerLink: ['/players']
},
{
tooltipOptions: {
tooltipLabel: $localize `:Text for link to open Wallboard Screen@@LinkTextOpenWallboardScreen:Open Wallboard`,
tooltipPosition: "top"
},
icon: 'pi pi-window-maximize',
routerLink: ['/hotseat-wallboard']
},
{
tooltipOptions: {
tooltipLabel: $localize `:Text for link to open Home Screen@@LinkTextOpenHomeScreen:Open Home Screen`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<div class="title-bar">
<div class="title">
<span i18n="Title of the hotsear-wallboard screen@@hostseatWallboardScreenTitle">TMNF-TimeAttackServer HotSeat-Mode</span>
</div>
</div>

<div class="rankings-container" *ngIf="settings">
<div class="ranking-challenge" *ngFor="let item of [].constructor(numTables); let i = index">
<div class="challenge-connector"></div>
<app-hotseat-ranking-challenge [players]="players" [challengeRankings]="challengeRankings" [pageSize]="settings.wallboard_players_max" [pageNum]="i + 1"></app-hotseat-ranking-challenge>
</div>
</div>
</div>

<p-speedDial [model]="speeddail_menu" direction="left" buttonClassName="p-button-outlined"></p-speedDial>
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
:host ::ng-deep .title-bar {
display: flex;
flex-direction: row;
justify-content: space-around;
border-radius: 0.5rem;
background-color: var(--surface-card);
margin-left: 0.5rem;
margin-right: 0.5rem;

.title {
font-family: var(--font-family);
color: var(--primary-color);
font-size: 2rem;
padding-top: 1rem;
padding-bottom: 1rem;
}
}

:host ::ng-deep .rankings-container {
display: flex;
flex-direction: row;
Expand Down Expand Up @@ -39,4 +57,26 @@
border-bottom: 0;
}
}
}

:host ::ng-deep .p-speeddial-direction-left {
right: 1rem;
bottom: 1rem;

.p-speeddial-button {
width: 3.5rem;
height: 3.5rem;
}

.p-speeddial-action {
width: 2.5rem;
height: 2.5rem;
margin-left: 0.35rem;
margin-right: 0.35rem;
text-decoration: none;
}

.p-speeddial-action-icon {
font-size: 0.9rem;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { ChallengeService } from 'src/app/services/challenge.service';
import { PlayerService } from 'src/app/services/player.service';
import { RankingService } from 'src/app/services/ranking.service';
import { SettingsService } from 'src/app/services/settings.service';
import { MenuItem } from 'primeng/api';

@Component({
selector: 'app-hotseat-wallboard-screen',
Expand All @@ -30,6 +31,7 @@ export class HotseatWallboardScreenComponent implements OnInit {
players: Player[] = [];
challengeRankings: ChallengeRanking[] = [];
numTables: number = 2;
speeddail_menu: MenuItem[] = [];

constructor(
private settingsService: SettingsService,
Expand All @@ -44,6 +46,33 @@ export class HotseatWallboardScreenComponent implements OnInit {
this.refreshSettings();
this.refreshCurrentChallenge();
this.refreshPlayers();

this.speeddail_menu = [
{
tooltipOptions: {
tooltipLabel: $localize `:Text for link to open Players Screen@@LinkTextOpenPlayersScreen:Open Players Screen`,
tooltipPosition: "top"
},
icon: 'pi pi-users',
routerLink: ['/players']
},
{
tooltipOptions: {
tooltipLabel: $localize `:Text for link to open Hotseat Screen@@LinkTextOpenHotseatNameScreen:Open Hotseat Screen`,
tooltipPosition: "top"
},
icon: 'pi pi-user',
routerLink: ['/hotseat-name']
},
{
tooltipOptions: {
tooltipLabel: $localize `:Text for link to open Home Screen@@LinkTextOpenHomeScreen:Open Home Screen`,
tooltipPosition: "top"
},
icon: 'pi pi-home',
routerLink: ['/']
}
]
}

enableAutoRefresh() {
Expand Down
Loading

0 comments on commit c7220d1

Please sign in to comment.