![JC Brand](/assets/img/avatar_default.png)
The eventual goal is to avoid UI-related stanza processing if the relevant chats aren't in the DOM. With the current architecture, chatboxes are created (and the stanzas related to them processed) even if `#conversejs` isn't in the DOM. * Initial work on making controlbox an element * Create a shared base class * Ceate ChatBoxViews proxy * Update sass now that certain classes are moved to converse-chats element
9 lines
354 B
JavaScript
9 lines
354 B
JavaScript
import { __ } from 'i18n';
|
|
import { api } from "@converse/headless/core";
|
|
import { html } from "lit-html";
|
|
|
|
export default () => {
|
|
const i18n_toggle = api.connection.connected() ? __('Chat Contacts') : __('Toggle chat');
|
|
return html`<a id="toggle-controlbox" class="toggle-controlbox"><span class="toggle-feedback">${i18n_toggle}</span></a>`;
|
|
}
|