2024-05-23 09:42:14 +00:00
|
|
|
// SPDX-FileCopyrightText: 2024 John Livingston <https://www.john-livingston.fr/>
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2024-05-13 11:01:18 +00:00
|
|
|
import { converseLocalizedHelpUrl } from '../../../shared/lib/help'
|
2024-07-29 21:50:06 +00:00
|
|
|
import { tplMUCApp } from '../../../shared/components/muc-app/templates/muc-app.js'
|
2024-05-11 15:37:20 +00:00
|
|
|
import { html } from 'lit'
|
|
|
|
import { __ } from 'i18n'
|
|
|
|
|
|
|
|
export function tplMUCTaskApp (el, mucModel) {
|
2024-05-12 13:38:11 +00:00
|
|
|
if (!mucModel) {
|
|
|
|
// should not happen
|
|
|
|
return html``
|
|
|
|
}
|
|
|
|
if (!mucModel.tasklists) {
|
|
|
|
// too soon, not initialized yet (this will happen)
|
|
|
|
return html``
|
|
|
|
}
|
2024-05-11 15:37:20 +00:00
|
|
|
|
|
|
|
if (!el.show) {
|
|
|
|
return html``
|
|
|
|
}
|
|
|
|
|
|
|
|
// eslint-disable-next-line no-undef
|
|
|
|
const i18nTasks = __(LOC_tasks)
|
2024-05-12 14:21:07 +00:00
|
|
|
// eslint-disable-next-line no-undef
|
2024-05-13 11:01:18 +00:00
|
|
|
const i18nHelp = __(LOC_online_help)
|
|
|
|
const helpUrl = converseLocalizedHelpUrl({
|
|
|
|
page: 'documentation/user/streamers/tasks'
|
|
|
|
})
|
|
|
|
|
2024-07-29 21:50:06 +00:00
|
|
|
return tplMUCApp(
|
|
|
|
el,
|
|
|
|
i18nTasks,
|
|
|
|
helpUrl,
|
|
|
|
i18nHelp,
|
|
|
|
html`<livechat-converse-muc-task-lists .model=${mucModel.tasklists}></livechat-converse-muc-task-lists>`
|
|
|
|
)
|
2024-05-11 15:37:20 +00:00
|
|
|
}
|