Add disable timer setting and fix per-question time limits
Add a 'Question Timer' toggle to game settings that lets the host disable the countdown timer. When disabled, questions show ∞ instead of a countdown, the host gets an 'End Question' button to manually advance, and all correct answers receive maximum points. Also fix a bug where per-question time limits were ignored — the timer and scoring always used the hardcoded 20-second default instead of each question's individual timeLimit.
This commit is contained in:
parent
bce534486c
commit
d1f82440a1
9 changed files with 94 additions and 31 deletions
5
App.tsx
5
App.tsx
|
|
@ -106,7 +106,8 @@ function App() {
|
|||
kickPlayer,
|
||||
leaveGame,
|
||||
connectedPlayerIds,
|
||||
setHostName
|
||||
setHostName,
|
||||
endQuestion,
|
||||
} = useGame(defaultConfig);
|
||||
|
||||
const handleSaveQuiz = async () => {
|
||||
|
|
@ -275,6 +276,8 @@ function App() {
|
|||
hasAnswered={hasAnswered}
|
||||
lastPointsEarned={lastPointsEarned}
|
||||
hostPlays={gameConfig.hostParticipates}
|
||||
timerEnabled={gameConfig.timerEnabled}
|
||||
onEndQuestion={role === 'HOST' ? endQuestion : undefined}
|
||||
/>
|
||||
) : role === 'CLIENT' && hasAnswered ? (
|
||||
<div className="flex flex-col items-center justify-center h-screen">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue