From 9b6dd0b8e815ff2c3ab422862e42b3a01306e48c Mon Sep 17 00:00:00 2001 From: Johnny322 Date: Mon, 2 Mar 2026 21:28:54 +0100 Subject: [PATCH] More paused behaviour --- src/App.vue | 47 +++++++++++++++++++++++++++++++++++++++-------- src/styles.css | 8 ++++++++ 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/src/App.vue b/src/App.vue index 56429bc..792fcbe 100644 --- a/src/App.vue +++ b/src/App.vue @@ -264,15 +264,22 @@ @ended="handlePlayerPause" >
- - -
-
+ + + +
+ @@ -1057,6 +1064,7 @@ export default { } if (status === 'paused') { + if (this.guessingTeamId) return if (Date.now() < this.pauseTransitionLockUntil) return this.tiles[key].status = 'guessed' this.pauseTransitionLockUntil = 0 @@ -1091,6 +1099,29 @@ export default { this.queueStateSync() } }, + async revealPausedGuess() { + if (!this.canControlGame) return + if (!this.currentTileKey || !this.selectedGame) return + if (this.getCurrentTileStatus() !== 'paused') return + const [cIndex, qIndex] = this.currentTileKey.split('-').map(Number) + const clue = this.selectedGame.categories[cIndex].clues[qIndex] + this.tiles[this.currentTileKey].status = 'guessed' + this.pauseTransitionLockUntil = 0 + this.lastAwardedTeamId = null + if (clue.answer) { + this.currentClipUrl = encodeURI(clue.answer) + this.isAnswerClip = true + await nextTick() + const player = this.getPlayer() + if (player) { + this.ensureAudioContext() + player.currentTime = 0 + player.load() + player.play().catch(() => {}) + } + } + this.queueStateSync() + }, handleTileRightClick(cIndex: number, qIndex: number) { if (!this.canControlGame) return const key = this.tileKey(cIndex, qIndex) diff --git a/src/styles.css b/src/styles.css index 269163a..d90f671 100644 --- a/src/styles.css +++ b/src/styles.css @@ -619,6 +619,14 @@ audio.hidden-audio { box-shadow: none; } +.host-reveal { + position: absolute; + top: 16px; + right: 16px; + z-index: 4; + background: linear-gradient(135deg, #7df58f, #36bf62); +} + .end-panel { text-align: center; }