peertube-plugin-livechat/conversejs/custom/plugins/tasks/muc-task-view.js

26 lines
573 B
JavaScript
Raw Normal View History

2024-04-30 16:30:44 +00:00
import { CustomElement } from 'shared/components/element.js'
import { api } from '@converse/headless/core'
2024-05-06 13:57:42 +00:00
import { tplMucTask } from './templates/muc-task'
2024-04-30 16:30:44 +00:00
export default class MUCTaskView extends CustomElement {
static get properties () {
return {
model: { type: Object, attribute: true }
}
}
async initialize () {
if (!this.model) {
return
}
this.listenTo(this.model, 'change', () => this.requestUpdate())
}
render () {
return tplMucTask(this.model)
}
}
api.elements.define('livechat-converse-muc-task', MUCTaskView)