xmpp.chapril.org-conversejs/src/plugins/rosterview/templates/requesting_contact.js

14 lines
820 B
JavaScript
Raw Normal View History

import { api } from "@converse/headless/core";
import { html } from "lit-html";
const tpl_requesting_contact = o => html`<span class="req-contact-name w-100" title="JID: ${o.jid}">${o.display_name}</span>`;
export default (o) => html`
2021-01-26 14:01:37 +01:00
${ api.settings.get('allow_chat_pending_contacts') ? html`<a class="open-chat w-100" href="#" @click=${o.openChat}>${tpl_requesting_contact(o) }</a>` : tpl_requesting_contact(o) }
<a class="accept-xmpp-request list-item-action list-item-action--visible fa fa-check"
2021-01-26 14:01:37 +01:00
@click=${o.acceptRequest}
aria-label="${o.desc_accept}" title="${o.desc_accept}" href="#"></a>
<a class="decline-xmpp-request list-item-action list-item-action--visible fa fa-times"
2021-01-26 14:01:37 +01:00
@click=${o.declineRequest}
aria-label="${o.desc_decline}" title="${o.desc_decline}" href="#"></a>`;