Poll WIP (#231):

* poll frontend WIP
This commit is contained in:
John Livingston 2024-07-01 18:06:26 +02:00
parent 4591633400
commit 1c6434630e
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
4 changed files with 7 additions and 4 deletions

View File

@ -23,7 +23,7 @@ export default class MUCPollView extends CustomElement {
render () {
const currentPoll = this.model?.get('current_poll')
return tplPoll(this.model, currentPoll)
return tplPoll(this, currentPoll)
}
}

View File

@ -37,8 +37,11 @@ function _tplChoice (el, currentPoll, choice) {
@click=${ev => {
ev.preventDefault()
if (currentPoll.over) { return }
// TODO
console.info('User has voted for choice: ', choice)
el.model.sendMessage({
body: '!' + choice.choice
})
}}
>
${i18nChoiceN}

View File

@ -571,5 +571,5 @@ poll_instructions: Complete and submit this form to create a new poll. This will
poll_question: Question
poll_duration: Poll duration (in minutes)
poll_anonymous_results: Anonymous results
poll_choice_n: Choice {{N}}
poll_choice_n: 'Choice {{N}}:'
poll_end: 'Poll ends at:'

View File

@ -553,4 +553,4 @@ poll_instructions: Complétez et soumettez ce formulaire pour créer un nouveau
poll_question: Question
poll_duration: Durée du sondage (en minutes)
poll_anonymous_results: Résultats anonymes
poll_choice_n: Choix {{N}}
poll_choice_n: 'Choix {{N}} :'