File tree Expand file tree Collapse file tree 2 files changed +1
-24
lines changed Expand file tree Collapse file tree 2 files changed +1
-24
lines changed Original file line number Diff line number Diff line change 88 align =" center"
99 >
1010 <h4 class =" pb-3" >Please complete the recaptcha to launch the app</h4 >
11- <!-- <Recaptcha site_key="6Lce72wgAAAAAOXrHyDxRQBhk6NDTD80MrXOlgbC" /> -->
12- <vue-recaptcha
13- ref =" recaptcha"
14- sitekey =" 6Lce72wgAAAAAOXrHyDxRQBhk6NDTD80MrXOlgbC"
15- :loadRecaptchaScript =" true"
16- @expired =" is_captcha_validated = false"
17- @verify =" submit_recaptcha"
18- align-self =" center"
19- />
11+ <Recaptcha :site_key =" site_key" />
2012 </v-col >
2113 <v-col
2214 v-else-if =" !cloud_store.is_running && cloud_store.is_connexion_launched"
2820</template >
2921
3022<script setup>
31- import { VueRecaptcha } from " vue-recaptcha"
3223 const websocket_store = use_websocket_store ()
3324 const cloud_store = use_cloud_store ()
3425 const { is_captcha_validated } = storeToRefs (cloud_store)
4536 onMounted (() => {
4637 console .log (" onMounted" , useRuntimeConfig ())
4738 })
48-
49- async function submit_recaptcha (token ) {
50- try {
51- const response = await $fetch .raw (
52- ` /.netlify/functions/recaptcha?token=${ token} ` ,
53- )
54- cloud_store .$patch ({ is_captcha_validated: response .status == 200 })
55- recaptcha .reset ()
56- } catch (error) {
57- console .error (error)
58- }
59- }
6039 </script >
Original file line number Diff line number Diff line change 1414<script setup>
1515 import { VueRecaptcha } from " vue-recaptcha"
1616
17- const websocket_store = use_websocket_store ()
1817 const cloud_store = use_cloud_store ()
1918 const { is_captcha_validated } = storeToRefs (cloud_store)
2019
2322 })
2423 const { site_key } = props
2524
26- // const site_key = useRuntimeConfig().public.RECAPTCHA_SITE_KEY
2725 console .log (" site_key" , site_key)
2826
2927 onMounted (() => {
You can’t perform that action at this time.
0 commit comments