2021-02-11 11:43:02 +01:00
|
|
|
import { __ } from 'i18n';
|
2020-09-26 13:13:50 +02:00
|
|
|
import { html } from "lit-html";
|
|
|
|
|
|
|
|
|
|
|
|
const tpl_moved = (jid) => {
|
|
|
|
const i18n_moved = __('The conversation has moved. Click below to enter.');
|
|
|
|
return html`
|
|
|
|
<p class="moved-label">${i18n_moved}</p>
|
|
|
|
<p class="moved-link"><a class="switch-chat" href="#">${jid}</a></p>`;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default (jid, reason) => {
|
|
|
|
const i18n_non_existent = __('This groupchat no longer exists');
|
|
|
|
return html`
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
<h3 class="alert-heading disconnect-msg">${i18n_non_existent}</h3>
|
|
|
|
${ reason ? html`<p class="destroyed-reason">"${reason}"</p>` : '' }
|
|
|
|
${ jid ? tpl_moved(jid) : '' }
|
|
|
|
</div>`;
|
|
|
|
}
|