Add .chatroom class to converse-muc and remove .logged-out to controlbox
This commit is contained in:
parent
a029ece808
commit
fd2f253c09
|
@ -16,7 +16,7 @@ export default () => {
|
|||
`;
|
||||
} else if (m.get('type') === CHATROOMS_TYPE) {
|
||||
return html`
|
||||
<converse-muc jid="${m.get('jid')}" class="chatbox ${(m.get('hidden') || m.get('minimized')) ? 'hidden' : ''}"></converse-muc>
|
||||
<converse-muc jid="${m.get('jid')}" class="chatbox chatroom ${(m.get('hidden') || m.get('minimized')) ? 'hidden' : ''}"></converse-muc>
|
||||
`;
|
||||
} else {
|
||||
return html`
|
||||
|
|
|
@ -47,18 +47,23 @@ class ControlBoxView extends ElementView {
|
|||
}
|
||||
|
||||
render () {
|
||||
if (this.model.get('connected') && this.model.get('closed') === undefined) {
|
||||
this.model.set('closed', !api.settings.get('show_controlbox_by_default'));
|
||||
}
|
||||
|
||||
render(tpl_controlbox({
|
||||
'sticky_controlbox': api.settings.get('sticky_controlbox'),
|
||||
...this.model.toJSON()
|
||||
}), this);
|
||||
|
||||
}
|
||||
|
||||
afterRender () {
|
||||
if (this.model.get('connected') && this.model.get('closed') === undefined) {
|
||||
this.model.set('closed', !api.settings.get('show_controlbox_by_default'));
|
||||
}
|
||||
|
||||
const connection = _converse?.connection;
|
||||
if (!connection?.connected || !connection?.authenticated || connection?.disconnecting) {
|
||||
this.classList.add('logged-out');
|
||||
} else {
|
||||
this.classList.remove('logged-out');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue