compress bundled js

This commit is contained in:
AlecM33
2023-03-11 17:07:31 -05:00
parent ed7beb50a5
commit e0986cefde
16 changed files with 223 additions and 25 deletions

View File

@@ -20,7 +20,7 @@ export const HTMLFragments = {
</div>
</div>
<div>
<button id='role-info-button' class='app-button'>Roles in This Game <img src='/images/info.svg'/></button>
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
</div>
</div>
<div>
@@ -75,7 +75,7 @@ export const HTMLFragments = {
</div>
</div>
<div>
<button id='role-info-button' class='app-button'>Roles in This Game <img src='/images/info.svg'/></button>
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
</div>
</div>
<div id='game-role' tabindex="0">
@@ -114,7 +114,7 @@ export const HTMLFragments = {
</div>
</div>
<div>
<button id='role-info-button' class='app-button'>Roles in This Game <img src='/images/info.svg'/></button>
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
</div>
</div>
<div id='game-people-container'>
@@ -157,9 +157,11 @@ export const HTMLFragments = {
<div id="play-pause-placeholder"></div>
</div>
</div>
<button id='mod-transfer-button' class='moderator-player-button make-mod-button app-button'>Transfer Mod Powers <img src='/images/shuffle.svg'/></button>
<button id='mod-transfer-button' class='moderator-player-button make-mod-button app-button'>
Transfer Mod Powers <img alt='transfer icon' src='/images/shuffle.svg'/>
</button>
<div>
<button id='role-info-button' class='app-button'>Roles in This Game <img src='/images/info.svg'/></button>
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
</div>
</div>
<div id="game-players-container">
@@ -201,7 +203,7 @@ export const HTMLFragments = {
<div id='play-pause'> </div>
</div>
<div>
<button id='role-info-button' class='app-button'>Roles in This Game <img src='/images/info.svg'/></button>
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
</div>
</div>
<div id='game-role' tabindex="0">
@@ -285,7 +287,7 @@ export const HTMLFragments = {
`<div id='end-of-game-header'>
<h2>&#x1F3C1; The moderator has ended the game. Roles are revealed.</h2>
<div id="end-of-game-buttons">
<button id='role-info-button' class='app-button'>Roles in This Game <img src='/images/info.svg'/></button>
<button id='role-info-button' class='app-button'>Roles in This Game <img alt='Info icon' src='/images/info.svg'/></button>
<a href='/'>
<button class='app-button'>Go Home \uD83C\uDFE0</button>
</a>

View File

@@ -71,12 +71,12 @@ export class InProgress {
};
if (spectatorCount) {
spectatorCount?.addEventListener('click', spectatorHandler);
spectatorCount?.addEventListener('keyup', spectatorHandler);
SharedStateUtil.setNumberOfSpectators(
this.stateBucket.currentGameState.people.filter(p => p.userType === globals.USER_TYPES.SPECTATOR).length,
spectatorCount
);
spectatorCount?.addEventListener('click', spectatorHandler);
spectatorCount?.addEventListener('keyup', spectatorHandler);
}
}

View File

@@ -59,9 +59,15 @@ export class Lobby {
const playerCount = this.container.querySelector('#game-player-count');
playerCount.innerText = this.stateBucket.currentGameState.gameSize + ' Players';
this.container.querySelector('#spectator-count').addEventListener('click', () => {
Confirmation(SharedStateUtil.buildSpectatorList(this.stateBucket.currentGameState.people), null, true);
});
const spectatorHandler = (e) => {
if (e.type === 'click' || e.code === 'Enter') {
Confirmation(SharedStateUtil.buildSpectatorList(this.stateBucket.currentGameState.people
.filter(p => p.userType === globals.USER_TYPES.SPECTATOR)), null, true);
}
};
this.container.querySelector('#spectator-count').addEventListener('click', spectatorHandler);
this.container.querySelector('#spectator-count').addEventListener('keyup', spectatorHandler);
SharedStateUtil.setNumberOfSpectators(
this.stateBucket.currentGameState.people.filter(p => p.userType === globals.USER_TYPES.SPECTATOR).length,

View File

@@ -152,6 +152,7 @@ export class GameTimerManager {
const playBtn = document.createElement('img');
playBtn.setAttribute('src', '../images/play-button.svg');
playBtn.setAttribute('alt', 'play button');
playBtn.setAttribute('tabindex', '0');
playBtn.addEventListener('click', this.playListener);
playBtn.addEventListener('keyup', this.playListener);