toolbar.js 685 B

1234567891011121314151617181920
  1. import { __ } from 'i18n';
  2. import { html } from 'lit';
  3. import { until } from 'lit/directives/until.js';
  4. function tplSendButton() {
  5. const i18n_send_message = __('Send the message');
  6. return html`<button type="submit" class="btn send-button" data-action="sendMessage" title="${i18n_send_message}">
  7. <converse-icon color="var(--toolbar-btn-text-color)" class="fa fa-paper-plane" size="1em"></converse-icon>
  8. </button>`;
  9. }
  10. /**
  11. * @param {import('../toolbar').ChatToolbar} el
  12. */
  13. export default (el) => {
  14. return html`
  15. <span class="btn-group toolbar-buttons">${until(el.getButtons(), '')}</span>
  16. ${el.show_send_button ? tplSendButton() : ''}
  17. `;
  18. };