xmpp.chapril.org-conversejs/src/plugins/muc-views/templates/muc-destroyed.js
Shaun Wu 9ea8653ef7 Upgrade to Webpack 3
Had to make various other changes due to incompatibilities.

- Use the new `lit` package instead of `lit-html` or `lit-element`
- Drop `haunted` since it breaks the rules by specifying `type: module`
  but then doesn't import with file extensions
- Use Sass Dart instead of node-sass (fixes #2445)
- Upgrade Karma
2021-04-30 13:50:50 +02:00

24 lines
856 B
JavaScript

import { __ } from 'i18n';
import { html } from "lit";
const tpl_moved = (o) => {
const i18n_moved = __('The conversation has moved to a new address. Click the link below to enter.');
return html`
<p class="moved-label">${i18n_moved}</p>
<p class="moved-link">
<a class="switch-chat" @click=${ev => o.onSwitch(ev)}>${o.moved_jid}</a>
</p>`;
}
export default (o) => {
const i18n_non_existent = __('This groupchat no longer exists');
const i18n_reason = __('The following reason was given: "%1$s"', o.reason || '');
return html`
<div class="alert alert-danger">
<h3 class="alert-heading disconnect-msg">${i18n_non_existent}</h3>
</div>
${ o.reason ? html`<p class="destroyed-reason">${i18n_reason}</p>` : '' }
${ o.moved_jid ? tpl_moved(o) : '' }
`;
}