email us for transfer donations

pull/9890/head^2
Thibault Duplessis 2021-09-28 09:46:08 +02:00
parent 53a3a397e7
commit 498f23c1ac
6 changed files with 21 additions and 14 deletions

View File

@ -317,13 +317,13 @@ ${payPalFormSingle(pricing, "lichess.org lifetime")}
a(href := "https://causes.benevity.org/causes/250-5789375887401_bf01")("registered with Benevity"),
".",
br,
a(href := assetUrl("doc/iban_LICHESS_ORG_00022031601.pdf"), targetBlank)(bankTransfers()),
views.html.site.contact.contactEmailLinkEmpty(bankTransfers()),
".",
br,
bitcoin(code("15ZA4bBki3uu3yR2ENC2WYa9baVGUZ8Cf8")),
".",
br,
"Please note that only the donation form above will grant the Patron status."
strong("Please note that only the donation form above will grant the Patron status.")
)
),
dl(

View File

@ -15,10 +15,10 @@ object contact {
private lazy val contactEmailBase64 = lila.common.String.base64.encode(contactEmailInClear)
def contactEmailLinkEmpty =
a(cls := "contact-email-obfuscated", attr("data-email") := contactEmailBase64)
def contactEmailLink(implicit ctx: Context) =
a(cls := "contact-email-obfuscated", attr("data-email") := contactEmailBase64)(
trans.clickToRevealEmailAddress()
)
contactEmailLinkEmpty(trans.clickToRevealEmailAddress())
private def reopenLeaf(prefix: String)(implicit ctx: Context) =
Leaf(

View File

@ -1,4 +1,5 @@
import * as xhr from 'common/xhr';
import contactEmail from './component/contactEmail';
export interface Pricing {
currency: string;
@ -9,6 +10,8 @@ export interface Pricing {
}
export default function (publicKey: string, pricing: Pricing) {
contactEmail();
const $checkout = $('div.plan_checkout');
const hasLifetime = $('#freq_lifetime').prop('disabled');

View File

@ -0,0 +1,10 @@
export default function () {
$('a.contact-email-obfuscated').one('click', function (this: HTMLLinkElement) {
$(this).html('...');
setTimeout(() => {
const address = atob($(this).data('email'));
$(this).html(address).attr('href', `mailto:${address}`);
}, 300);
return false;
});
}

View File

@ -1,12 +1,6 @@
import contactEmail from './component/contactEmail';
lichess.load.then(() => {
window.location.href = location.hash || '#help-root';
$('a.contact-email-obfuscated').one('click', function (this: HTMLLinkElement) {
$(this).html('...');
setTimeout(() => {
const address = atob($(this).data('email'));
$(this).html(address).attr('href', `mailto:${address}`);
}, 300);
return false;
});
contactEmail();
});