Browse Source

Merge pull request '1.2.1' (#64) from develop into master

Reviewed-on: #64
pull/66/head 1.2.1
Atridad Lahiji 2 weeks ago
parent
commit
bdd31e3f73
  1. 1
      .env.example
  2. 9
      README.md
  3. 2
      build.sh
  4. 2
      frontend/package-lock.json
  5. 2
      frontend/package.json
  6. 14
      frontend/src/App.vue
  7. 12
      frontend/src/components/Index.vue
  8. 1
      frontend/src/main.js
  9. 11570
      frontend/yarn.lock
  10. 2
      main.go

1
.env.example

@ -2,6 +2,7 @@ OWNER_NAME="Owner Person"
META_TITLE="EleutheriaPay"
TITLE="EleutheriaPay"
DESCRIPTION="Customizable FOSS donation platform for FOSS developers"
DEFAULT_CURRENCY="usd"
STRIPE_PK=""
STRIPE_SK=""
STRIPE_ACC=""

9
README.md

@ -5,7 +5,7 @@
<img src="https://support.atrilahiji.dev/api/badge" />
</a>
[![Build Status](https://drone.atrilahiji.dev/api/badges/atrilahiji/EleutheriaPay/status.svg?branch=develop)](https://drone.atrilahiji.dev/atrilahiji/EleutheriaPay)
[![Build Status](https://drone.atrilahiji.dev/api/badges/atrilahiji/EleutheriaPay/status.svg?branch=develop)](https://drone.atrilahiji.dev/atrilahiji/EleutheriaPay)https://owncast.online/images/logo.svg
Elutheria Pay is a customizable self-hosted FOSS donation page for FOSS developers
@ -49,6 +49,8 @@ OWNER_NAME: The name of the individual or organization this page is accepting do
META_TITLE: The metadata title for the site.
TITLE: The title on the homepage.
DESCRIPTION: The description of the homepage.
DEFAULT_CURRENCY: The default currency when the page is first reached.
STRIPE_PK: Stripe publishable key.
STRIPE_SK: Stripe secret key.
STRIPE_ACC: Stripe account ID
@ -87,3 +89,8 @@ A donate badge can be embedded onto any page or repository to route users to you
<img src="https://donate.<DOMAIN>/api/badge" />
</a>
```
# Official Integrations
<a href="https://owncast.online/" target="_blank" rel="nofollow">
<img src="https://owncast.online/images/logo.svg" width="50" height="50" />
</a>

2
build.sh

@ -1,6 +1,6 @@
#!/bin/bash
VERSION="1.2.0"
VERSION="1.2.1"
# build frontend
cd ./frontend

2
frontend/package-lock.json

@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "1.2.0",
"version": "1.2.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

2
frontend/package.json

@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"description": "EleutheriaPay Frontend",
"scripts": {

14
frontend/src/App.vue

@ -109,8 +109,10 @@
</b-navbar-nav>
</b-navbar>
<Index
v-if="configLoaded"
:title="title"
:description="description"
:defaultCurrency="defaultCurrency"
/>
</div>
</template>
@ -147,11 +149,19 @@ export default {
LinkedinIcon,
},
data: () => ({
configLoaded: false,
theme: '',
metaTitle: '',
title: '',
description: '',
currency: '',
defaultCurrency: '',
acceptedCurrencies: [
{ value: 'usd', text: 'USD - United States Dollar' },
{ value: 'cad', text: 'CAD - Canadian Dollar' },
{ value: 'gbp', text: 'GBP - Pounds Sterling' },
{ value: 'aud', text: 'AUD - Australian Dollar' },
{ value: 'eur', text: 'EUR - Euro' },
],
enableOneTime: true,
enableMonthly: true,
enableAnnual: true,
@ -181,6 +191,7 @@ export default {
// Passed to the Index component
this.title = response.data.Title;
this.description = response.data.Description;
this.defaultCurrency = response.data.DefaultCurrency;
// For this component
this.metaTitle = response.data.MetaTitle;
this.backLink = response.data.BackLink;
@ -194,6 +205,7 @@ export default {
this.linkedinLink = response.data.LinkedinLink;
}).then(() => {
document.title = this.metaTitle;
this.configLoaded = true;
});
},
methods: {

12
frontend/src/components/Index.vue

@ -131,13 +131,14 @@ export default {
props: {
title: String,
description: String,
defaultCurrency: String,
},
data: () => ({
amount: 0,
donationMessage: '',
publishableKey: '',
clientSecret: '',
currency: 'cad',
currency: '',
elementsOptions: {
locale: 'auto',
},
@ -161,6 +162,15 @@ export default {
}),
mounted() {
this.amount = this.paymentIncrementOptions[1].value;
console.log(this.defaultCurrency);
/* eslint-disable */
const configCurrencyCheck = this.currencyOptions.filter((currency) => currency.value === this.defaultCurrency);
/* eslint-enable */
if (configCurrencyCheck.length > 0) {
this.currency = configCurrencyCheck[0].value;
} else {
this.currency = 'usd';
}
},
methods: {
beginDonation() {

1
frontend/src/main.js

@ -17,7 +17,6 @@ axios.get('/api/pay/config').then((response) => {
apiVersion: response.data.StripeApiVersion,
locale: response.data.StripeLocale,
};
console.log(response);
Vue.use(StripePlugin, options);
});

11570
frontend/yarn.lock
File diff suppressed because it is too large
View File

2
main.go

@ -57,6 +57,7 @@ func configHandler(w http.ResponseWriter, r *http.Request) {
MetaTitle string
Title string
Description string
DefaultCurrency string
BackLink string
EmailLink string
GitLink string
@ -82,6 +83,7 @@ func configHandler(w http.ResponseWriter, r *http.Request) {
os.Getenv("META_TITLE"),
os.Getenv("TITLE"),
os.Getenv("DESCRIPTION"),
os.Getenv("DEFAULT_CURRENCY"),
os.Getenv("BACK_LINK"),
os.Getenv("EMAIL_LINK"),
os.Getenv("GIT_LINK"),

Loading…
Cancel
Save