Hide Q&A upvote counts until voting ends
CI / Deploy / test (push) Successful in 1m0s
CI / Deploy / deploy (push) Skipped

A live ranking on the stage swayed the vote. During the vote stage the
presenter now gets the questions in submission order without counts,
only the total of votes cast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-11 15:05:09 +01:00
1 parent 891e3cb174
commit 759e15390e
5 files changed
+21 -11

No files matched your search

+3 -5
View File
@@ -1000,7 +1000,6 @@
var onStage = options && options.onStage;
var onQuestion = options && options.onQuestion;
var questions = results.questions;
var maxVotes = Math.max.apply(null, questions.map(function (q) { return q.votes; }).concat([1]));
var children = [Qa.steps(results.stage, onStage, results.stages)];
var withVotes = results.maxUpvotes > 0;
@@ -1027,11 +1026,10 @@
+ results.maxUpvotes + (results.maxUpvotes === 1 ? ' Stimme' : ' Stimmen')
+ (results.maxPerQuestion < results.maxUpvotes ? ' (höchstens ' + results.maxPerQuestion + ' pro Frage)' : '')
+ ' · bisher ' + results.upvotes + ' vergeben' }));
children.push(el('ol', { class: 'qa-list' }, questions.map(function (question) {
// No counts or ranking while voting is open (the server sends none), so the stage does not sway the vote.
children.push(el('ul', { class: 'qa-list' }, questions.map(function (question) {
return el('li', { class: 'qa-item' }, [
el('span', { class: 'qa-item__text', text: question.text }),
votes(question),
el('span', { class: 'qa-item__bar', style: 'width:' + (question.votes / maxVotes * 100) + '%' })
el('span', { class: 'qa-item__text', text: question.text })
]);
})));
} else if (questions.length === 0) {