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

26 lines
569 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'
import tplMucTask from './templates/muc-task'
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)