- admin form fix

- backblaze new region
- webhook url new place
This commit is contained in:
Čarodej
2022-03-15 16:39:17 +01:00
parent a544578b38
commit f6ea18fce2
5 changed files with 41 additions and 33 deletions

View File

@@ -483,6 +483,10 @@ export default {
label: 'us-west-002',
value: 'us-west-002',
},
{
label: 'us-west-004',
value: 'us-west-004',
},
{
label: 'eu-central-003',
value: 'eu-central-003',

View File

@@ -73,7 +73,7 @@
(!config.isFacebookLoginConfigured || facebook.isVisibleCredentialsForm) && facebook.allowedService
"
@submit.prevent="storeCredentials('facebook')"
ref="credentialsForm"
ref="facebook"
v-slot="{ invalid }"
tag="form"
class="rounded-xl p-5 shadow-lg"
@@ -157,7 +157,7 @@
<ValidationObserver
v-if="(!config.isGoogleLoginConfigured || google.isVisibleCredentialsForm) && google.allowedService"
@submit.prevent="storeCredentials('google')"
ref="credentialsForm"
ref="google"
v-slot="{ invalid }"
tag="form"
class="rounded-xl p-5 shadow-lg"
@@ -241,7 +241,7 @@
<ValidationObserver
v-if="(!config.isGithubLoginConfigured || github.isVisibleCredentialsForm) && github.allowedService"
@submit.prevent="storeCredentials('github')"
ref="credentialsForm"
ref="github"
v-slot="{ invalid }"
tag="form"
class="rounded-xl p-5 shadow-lg"
@@ -361,7 +361,7 @@ export default {
},
async storeCredentials(service) {
// Validate fields
const isValid = await this.$refs.credentialsForm.validate()
const isValid = await this.$refs[service].validate()
if (!isValid) return

View File

@@ -102,6 +102,13 @@
<!--Stripe credentials are set up-->
<div v-if="stripe.allowedService">
<AppInputText
:title="$t('Your Webhook URL')"
:description="$t('Please copy your url and paste it to the service webhook setup.')"
>
<CopyInput size="small" :str="getWebhookEndpoint('stripe')" />
</AppInputText>
<div v-if="stripe.isConfigured">
<AppInputText
@input="$updateText('/admin/settings', 'stripe_payment_description', stripe.paymentDescription)"
@@ -127,13 +134,6 @@
/>
</AppInputText>
<AppInputText
:title="$t('Your Webhook URL')"
:description="$t('Please copy your url and paste it to the service webhook setup.')"
>
<CopyInput size="small" :str="getWebhookEndpoint('stripe')" />
</AppInputText>
<div
@click="stripe.isVisibleCredentialsForm = !stripe.isVisibleCredentialsForm"
class="flex cursor-pointer items-center"
@@ -148,7 +148,7 @@
<ValidationObserver
v-if="!stripe.isConfigured || stripe.isVisibleCredentialsForm"
@submit.prevent="storeCredentials('stripe')"
ref="credentialsForm"
ref="stripe"
v-slot="{ invalid }"
tag="form"
class="rounded-xl p-5 shadow-lg"
@@ -233,6 +233,13 @@
<!--Paystack credentials are set up-->
<div v-if="paystack.allowedService">
<AppInputText
:title="$t('Your Webhook URL')"
:description="$t('Please copy your url and paste it to the service webhook setup.')"
>
<CopyInput size="small" :str="getWebhookEndpoint('paystack')" />
</AppInputText>
<div v-if="paystack.isConfigured">
<AppInputText
@input="
@@ -260,13 +267,6 @@
/>
</AppInputText>
<AppInputText
:title="$t('Your Webhook URL')"
:description="$t('Please copy your url and paste it to the service webhook setup.')"
>
<CopyInput size="small" :str="getWebhookEndpoint('paystack')" />
</AppInputText>
<div
@click="paystack.isVisibleCredentialsForm = !paystack.isVisibleCredentialsForm"
class="flex cursor-pointer items-center"
@@ -281,7 +281,7 @@
<ValidationObserver
v-if="!paystack.isConfigured || paystack.isVisibleCredentialsForm"
@submit.prevent="storeCredentials('paystack')"
ref="credentialsForm"
ref="paystack"
v-slot="{ invalid }"
tag="form"
class="rounded-xl p-5 shadow-lg"
@@ -349,6 +349,13 @@
<!--Stripe credentials are set up-->
<div v-if="paypal.allowedService">
<AppInputText
:title="$t('Your Webhook URL')"
:description="$t('Please copy your url and paste it to the service webhook setup.')"
>
<CopyInput size="small" :str="getWebhookEndpoint('paypal')" />
</AppInputText>
<div v-if="paypal.isConfigured">
<AppInputSwitch :title="$t('Live Mode')" :description="$t('Toggle amid live and sandbox mode')">
<SwitchInput
@@ -382,13 +389,6 @@
/>
</AppInputText>
<AppInputText
:title="$t('Your Webhook URL')"
:description="$t('Please copy your url and paste it to the service webhook setup.')"
>
<CopyInput size="small" :str="getWebhookEndpoint('paypal')" />
</AppInputText>
<div
@click="paypal.isVisibleCredentialsForm = !paypal.isVisibleCredentialsForm"
class="flex cursor-pointer items-center"
@@ -403,7 +403,7 @@
<ValidationObserver
v-if="!paypal.isConfigured || paypal.isVisibleCredentialsForm"
@submit.prevent="storeCredentials('paypal')"
ref="credentialsForm"
ref="paypal"
v-slot="{ invalid }"
tag="form"
class="rounded-xl p-5 shadow-lg"
@@ -591,7 +591,7 @@ export default {
methods: {
async storeCredentials(service) {
// Validate fields
const isValid = await this.$refs.credentialsForm.validate()
const isValid = await this.$refs[service].validate()
if (!isValid) return

View File

@@ -565,6 +565,10 @@ export default {
label: 'us-west-002',
value: 'us-west-002',
},
{
label: 'us-west-004',
value: 'us-west-004',
},
{
label: 'eu-central-003',
value: 'eu-central-003',