@geode/opengeodeweb-front 2.0.0-rc.33 → 2.0.0-rc.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Launcher.vue +21 -1
- package/package.json +1 -1
package/components/Launcher.vue
CHANGED
|
@@ -8,7 +8,15 @@
|
|
|
8
8
|
align="center"
|
|
9
9
|
>
|
|
10
10
|
<h4 class="pb-3">Please complete the recaptcha to launch the app</h4>
|
|
11
|
-
<Recaptcha site_key="6Lce72wgAAAAAOXrHyDxRQBhk6NDTD80MrXOlgbC" />
|
|
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
|
+
/>
|
|
12
20
|
</v-col>
|
|
13
21
|
<v-col
|
|
14
22
|
v-else-if="!cloud_store.is_running && cloud_store.is_connexion_launched"
|
|
@@ -37,4 +45,16 @@
|
|
|
37
45
|
onMounted(() => {
|
|
38
46
|
console.log("onMounted", useRuntimeConfig())
|
|
39
47
|
})
|
|
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
|
+
}
|
|
40
60
|
</script>
|
package/package.json
CHANGED