Task lists WIP:
* front-end: task are no more in a dialog
This commit is contained in:
@ -20,9 +20,9 @@ export function getHeadingButtons (view, buttons) {
|
||||
i18n_text: __(LOC_tasks),
|
||||
handler: async (ev) => {
|
||||
ev.preventDefault()
|
||||
ev.stopPropagation()
|
||||
// opening the muc task lists view:
|
||||
api.modal.show('livechat-converse-muc-task-lists-modal', { model: muc })
|
||||
// opening or closing the muc task app:
|
||||
const taskAppEl = ev.target.closest('converse-root').querySelector('livechat-converse-muc-task-app')
|
||||
taskAppEl.toggleApp()
|
||||
},
|
||||
a_class: '',
|
||||
icon_class: 'fa-list', // FIXME
|
||||
@ -89,6 +89,11 @@ export function initOrDestroyChatRoomTaskLists (mucModel) {
|
||||
return _destroyChatRoomTaskLists(mucModel)
|
||||
}
|
||||
|
||||
if (!api.settings.get('livechat_task_list_enabled')) {
|
||||
// Feature disabled, no need to handle tasks.
|
||||
return _destroyChatRoomTaskLists(mucModel)
|
||||
}
|
||||
|
||||
if (mucModel.session.get('connection_status') !== converse.ROOMSTATUS.ENTERED) {
|
||||
return _destroyChatRoomTaskLists(mucModel)
|
||||
}
|
||||
|
Reference in New Issue
Block a user