xmpp.chapril.org-conversejs/src/plugins/controlbox/templates/toggle.js
JC Brand 1949356ede Work on turning chat views into custom elements
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
2021-02-09 15:48:21 +01:00

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>`;
}