2021-02-11 11:43:02 +01:00
|
|
|
import { __ } from 'i18n';
|
2021-04-14 22:56:59 +02:00
|
|
|
import { html } from "lit";
|
2020-09-26 13:13:50 +02:00
|
|
|
|
2021-03-13 11:37:07 +01:00
|
|
|
const tpl_moved = (o) => {
|
|
|
|
const i18n_moved = __('The conversation has moved to a new address. Click the link below to enter.');
|
2020-09-26 13:13:50 +02:00
|
|
|
return html`
|
|
|
|
<p class="moved-label">${i18n_moved}</p>
|
2021-03-13 11:37:07 +01:00
|
|
|
<p class="moved-link">
|
|
|
|
<a class="switch-chat" @click=${ev => o.onSwitch(ev)}>${o.moved_jid}</a>
|
|
|
|
</p>`;
|
2020-09-26 13:13:50 +02:00
|
|
|
}
|
|
|
|
|
2021-03-13 11:37:07 +01:00
|
|
|
export default (o) => {
|
2020-09-26 13:13:50 +02:00
|
|
|
const i18n_non_existent = __('This groupchat no longer exists');
|
2021-03-13 11:37:07 +01:00
|
|
|
const i18n_reason = __('The following reason was given: "%1$s"', o.reason || '');
|
2020-09-26 13:13:50 +02:00
|
|
|
return html`
|
|
|
|
<div class="alert alert-danger">
|
|
|
|
<h3 class="alert-heading disconnect-msg">${i18n_non_existent}</h3>
|
2021-03-13 11:37:07 +01:00
|
|
|
</div>
|
|
|
|
${ o.reason ? html`<p class="destroyed-reason">${i18n_reason}</p>` : '' }
|
|
|
|
${ o.moved_jid ? tpl_moved(o) : '' }
|
|
|
|
`;
|
2020-09-26 13:13:50 +02:00
|
|
|
}
|