Merge pull request 'Show only the status above the question on stage' (#41) from fix/stage-without-type into main
CI / Deploy / test (push) Successful in 1m3s
CI / Deploy / deploy (push) Successful in 7s

Reviewed-on: #41
This commit was merged in pull request #41.
This commit is contained in:
gnilebein committed 2026-11-09 15:01:26 +01:00
commit bd488e0b81
5 files changed
+13 -11

No files matched your search

-1
View File
@@ -365,7 +365,6 @@ class PollStateService
return [
'id' => $slide->id,
'type' => $slide->type,
'typeLabel' => $slide->typeLabel(),
'question' => $slide->question,
'description' => (string)$slide->description,
'isVotingOpen' => $slide->isVotingOpen(),
+1 -1
View File
@@ -34,7 +34,7 @@ $host = preg_replace('#^https?://#', '', $joinBaseUrl);
</header>
<main class="stage__main">
<p class="stage__type" data-type></p>
<p class="stage__status" data-status></p>
<h1 class="stage__question" data-question><?= __('Lade …') ?></h1>
<p class="stage__description" data-description></p>
<div class="stage__media" data-media hidden></div>
+1 -1
View File
@@ -38,7 +38,7 @@ $host = preg_replace('#^https?://#', '', $joinBaseUrl);
</header>
<main class="stage__main">
<p class="stage__type" data-type></p>
<p class="stage__status" data-status></p>
<h1 class="stage__question" data-question><?= h($slide->question) ?></h1>
<p class="stage__description" data-description></p>
<div class="stage__media" data-media hidden></div>
+3 -2
View File
@@ -584,7 +584,9 @@ body.present {
.stage__qr { border: 0; padding: 4px; background: #fff; border-radius: 8px; cursor: zoom-in; }
.stage__qr img { display: block; width: 72px; height: 72px; }
.stage__main { display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow: auto; padding: 2vh 0; }
.stage__type { text-transform: uppercase; letter-spacing: .12em; color: var(--c1); font-weight: 700; margin: 0 0 .6em; }
.stage__status { text-transform: uppercase; letter-spacing: .12em; color: var(--c1); font-weight: 700; margin: 0 0 .6em; }
.stage__status:empty { display: none; }
.stage--closed .stage__status { color: var(--muted); }
.stage__question { font-size: clamp(2rem, 4.5vw, 4rem); margin-bottom: .3em; }
.stage__description { font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--muted); white-space: pre-line; margin-top: 0; }
.stage__media { width: min(100%, calc(62vh * 16 / 9)); margin: 1vh auto 0; }
@@ -592,7 +594,6 @@ body.present {
.stage--video .stage__description { font-size: clamp(1rem, 1.6vw, 1.3rem); }
.stage--content .stage__description { color: var(--text); font-size: clamp(1.3rem, 2.6vw, 2.2rem); }
.stage__results { font-size: clamp(1rem, 1.8vw, 1.5rem); margin-top: 2vh; }
.stage--closed .stage__type::after { content: " · Abstimmung geschlossen"; color: var(--muted); }
.stage .bar__track { height: 1.1em; }
.stage .columns { height: 22vh; }
.stage .average { padding: 1vh 2vw; gap: 1vh 3vw; margin-bottom: 1.5vh; background: rgba(var(--tint), .06); }
+8 -6
View File
@@ -1066,7 +1066,7 @@
}
if (!slide) {
q('[data-type]').textContent = state.poll.isPaused ? 'Pause' : '';
q('[data-status]').textContent = state.poll.isPaused ? 'Pause' : '';
q('[data-question]').textContent = state.count === 0
? 'Noch keine Folien angelegt'
: state.poll.title;
@@ -1086,16 +1086,18 @@
var quizPhase = slide.type === 'quiz' && state.results ? state.results.phase : null;
var qaStage = slide.type === 'qa' && state.results ? state.results.stage : null;
var orderRevealed = slide.type === 'order' && state.results ? state.results.revealed : null;
q('[data-type]').textContent = quizPhase
? slide.typeLabel + ' · ' + { ready: 'bereit', running: 'läuft', finished: 'Auflösung' }[quizPhase]
: (qaStage ? slide.typeLabel + ' · ' + Qa.labels[qaStage]
: (orderRevealed ? slide.typeLabel + ' · Auflösung' : slide.typeLabel));
var closed = slide.isInteractive && !slide.isVotingOpen && !quizPhase && !qaStage && !orderRevealed;
// Status line above the question: only what the room needs to know, not the slide type.
q('[data-status]').textContent = quizPhase
? { ready: 'Bereit', running: 'Läuft', finished: 'Auflösung' }[quizPhase]
: (qaStage ? Qa.labels[qaStage]
: (orderRevealed ? 'Auflösung' : (closed ? 'Abstimmung geschlossen' : '')));
q('[data-question]').textContent = slide.question;
q('[data-description]').textContent = slide.description;
root.classList.toggle('stage--content', !slide.isInteractive);
root.classList.toggle('stage--video', slide.type === 'youtube');
renderMedia(slide);
root.classList.toggle('stage--closed', slide.isInteractive && !slide.isVotingOpen && !quizPhase && !qaStage && !orderRevealed);
root.classList.toggle('stage--closed', closed);
root.classList.toggle('stage--qa', !!qaStage);
var voting = q('[data-voting]');