Skip to content

Commit

Permalink
* remove paylike, #110
Browse files Browse the repository at this point in the history
  • Loading branch information
strugure committed Mar 17, 2024
1 parent de68901 commit 846b193
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 72 deletions.
2 changes: 1 addition & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"donate": {
"title": "Donate",
"p1": "You can help us financially by donating an amount of your choice by direct card payment",
"p2": "or through a bank transfers using the details below.",
"p2": "You can help us financially by donating an amount of your choice through a bank transfer using the details below.",
"button": {
"label": "Donate"
},
Expand Down
2 changes: 1 addition & 1 deletion locales/ro.json
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
"donate": {
"title": "Donează",
"p1": "Ne poți ajuta financiar donând o sumă la alegere, prin plata directă cu cardul",
"p2": "sau prin transfer bancar folosind datele de mai jos.",
"p2": "Ne poți ajuta financiar donând o sumă la alegere, prin transfer bancar folosind datele de mai jos.",
"button": {
"label": "Donează"
},
Expand Down
70 changes: 0 additions & 70 deletions pages/supportus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,41 +44,6 @@
<div>
<section-title path="supportus.donate.title" />
<div class="flex flex-col gap-4">
<paragraph path="supportus.donate.p1" :margin-bottom="false" />
<div>
<button
class="inline-flex items-center rounded shadow border border-gray-100 border-opacity-25 px-2 py-1"
:class="isAcceptedTermsAndPrivacyPolicy ? 'animate-bounce cursor-pointer hover:bg-gray-100 hover:bg-opacity-25': 'cursor-not-allowed opacity-50'"
:disabled="!isAcceptedTermsAndPrivacyPolicy"
@click="donate"
>
<icon class="w-4 h-4 mr-2 text-red-500 hover:text-red-600">
{{ iconHeart }}
</icon>
<span class="paragraph hover:text-gray-900 font-medium">
{{ $t("supportus.donate.button.label") }}
</span>
</button>
<div class="flex flex-row items-baseline justify-start space-x-2 mt-2">
<checkbox v-model="isAcceptedTermsAndPrivacyPolicy" />
<paragraph path="supportus.donate.legalNotice" :from="1" :margin-bottom="false">
<template #before>
<i18n path="supportus.donate.legalNotice[0].content">
<template #terms>
<nuxt-link class="text-link" :to="localePath(`${$t('supportus.donate.legalNotice[0].map.terms.link')}`)">
{{ $t("supportus.donate.legalNotice[0].map.terms.label") }}
</nuxt-link>
</template>
<template #policy>
<nuxt-link class="text-link" :to="localePath(`${$t('supportus.donate.legalNotice[0].map.policy.link')}`)">
{{ $t("supportus.donate.legalNotice[0].map.policy.label") }}
</nuxt-link>
</template>
</i18n>
</template>
</paragraph>
</div>
</div>
<paragraph path="supportus.donate.p2" :margin-bottom="false" />
<div>
<div class="flex flex-row justify-start">
Expand Down Expand Up @@ -281,16 +246,12 @@ import { mdiContentCopy, mdiCardsHeart } from '@mdi/js'
import ogMetaFor from '@/lib/HeaderMeta'
declare let Paylike: any
@Component
export default class SupportUs extends Vue {
sizes: string = '300:300,360:360,425:425,768:768,896,896:1080,1280'
iconCopy = mdiContentCopy
iconHeart = mdiCardsHeart
isCopySuccesss = false
isPaylikeLoaded = false
paylike!: any
isAcceptedTermsAndPrivacyPolicy = false
async copyToClipboard (v) {
Expand All @@ -302,37 +263,6 @@ export default class SupportUs extends Vue {
}, 3000)
}
mounted () {
this.paylike = Paylike(this.$config.paylike.publicKey)
}
donate () {
this.paylike.popup(
{
title: this.$t('supportus.donate.popup.title'),
description: this.$t('supportus.donate.popup.description'),
currency: 'RON',
locale: this.$i18n.locale,
fields: [
{
name: 'name',
placeholder: this.$t('supportus.donate.popup.placeholder.name')
},
{
name: 'amount',
required: true
}
],
custom: {
AcceptedTermsAndPrivacyPolicy: this.isAcceptedTermsAndPrivacyPolicy
}
},
() => {
this.isAcceptedTermsAndPrivacyPolicy = false
}
)
}
head () {
return ogMetaFor({
route: this.$nuxt.$route.path,
Expand Down

0 comments on commit 846b193

Please sign in to comment.