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
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}