Skip to content

Commit be4eef2

Browse files
committed
fix: link recapcha e2e
1 parent aea5f0c commit be4eef2

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

.env-example

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/components/faucet/FaucetDetail.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
ref="DOMpopup"
66
class="popup fixed flex flex-col items-center rounded w-[90vw] max-w-[36rem] bg-grey-300 top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[1000] justify-center text-grey-50 before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:rounded before:bg-500 before:z-min after:absolute after:top-px after:left-px after:bottom-px after:right-px after:bg-grey-500 after:rounded after:z-min"
77
>
8-
<div ref="DOMFaucetRequest" class="py-12 px-20 w-full">
8+
<div ref="DOMFaucetRequest" class="py-12 px-20 w-full" v-if="store.isOpen">
99
<FaucetContentForm :name="store.selectedFaucet.name ?? 'Faucet'" :options="store.faucetAmount" v-show="store.contentStep === 0" class="js-faucetform opacity-100" :error="error" @requestFaucet="requestFaucet" />
1010
<div>
1111
<div ref="gnoRequestLogo" v-show="store.contentStep >= 1" class="opacity-0">

src/components/faucet/content/FaucetContentForm.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<form class="w-full space-y-12" @submit.prevent="requestFaucet">
55
<Input :label="'Enter your wallet address'" :placeholder="'e.g. g1juwee0ynsdvaukvxk3j5s4cl6nn24uxwlydxrl'" v-model="bindAddress" required />
66
<Select v-if="store.selectedFaucet.amounts" :label="'Select faucet amount'" :options="options" @update="(option) => SelectAmount(option)" />
7-
<Recaptcha @validation="captchaValidation" />
7+
<Recaptcha @validation="captchaValidation" :captchakey="store.selectedFaucet.recaptcha" />
88
<div>
99
<div class="flex gap-4">
1010
<Button text="Cancel" variant="outline" @click.prevent="() => closePopup()" class="w-full" />

src/components/ui/Button.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<button class="p-4 rounded border border-light ease-in-out duration-300" :class="[css[variant], disabled && ['!bg-grey-100 !border-grey-100 hover:bg-grey-100 hover:!border-grey-100 hover:cursor-not-allowed']]">{{ text }} {{ disabled }}</button>
2+
<button class="p-4 rounded border border-light ease-in-out duration-300" :class="[css[variant], disabled && ['!bg-grey-100 !border-grey-100 hover:bg-grey-100 hover:!border-grey-100 hover:cursor-not-allowed']]">{{ text }}</button>
33
</template>
44

55
<script setup lang="ts">

src/components/ui/Recaptcha.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
<template>
2-
<vue-recaptcha theme="dark" :sitekey="siteKey" @verify="handleSuccess" @error="handleError"></vue-recaptcha>
2+
<vue-recaptcha theme="dark" :sitekey="captchakey ?? 'a'" @verify="handleSuccess" @error="handleError"></vue-recaptcha>
33
</template>
44

55
<script setup lang="ts">
6-
import { ref } from 'vue'
6+
import { onMounted } from 'vue'
77
8-
const siteKey = ref(import.meta.env.VITE_reCAPTCHA_SITE_KEY ?? '')
8+
type Props = {
9+
captchakey: string
10+
}
11+
const props = defineProps<Props>()
912
13+
console.log(props.captchakey)
14+
onMounted(() => console.log(props.captchakey))
1015
const emit = defineEmits(['validation'])
1116
1217
const handleError = (res: string) => {

0 commit comments

Comments
 (0)