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

26 lines
595 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 tplMucTaskList from './templates/muc-task-list'
export default class MUCTaskListView 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 tplMucTaskList(this.model)
}
}
api.elements.define('livechat-converse-muc-task-list', MUCTaskListView)