@geode/opengeodeweb-front 2.0.0-rc.22 → 2.0.0-rc.24
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
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
align="center"
|
|
9
9
|
>
|
|
10
10
|
<h4 class="pb-3">Please complete the recaptcha to launch the app</h4>
|
|
11
|
-
<Recaptcha />
|
|
11
|
+
<Recaptcha :site_key="site_key" />
|
|
12
12
|
</v-col>
|
|
13
13
|
<v-col
|
|
14
14
|
v-else-if="!cloud_store.is_running && cloud_store.is_connexion_launched"
|
|
@@ -24,10 +24,17 @@
|
|
|
24
24
|
const cloud_store = use_cloud_store()
|
|
25
25
|
const { is_captcha_validated } = storeToRefs(cloud_store)
|
|
26
26
|
|
|
27
|
+
const site_key = useRuntimeConfig().public.RECAPTCHA_SITE_KEY
|
|
28
|
+
|
|
27
29
|
watch(is_captcha_validated, async (value) => {
|
|
28
30
|
if (value === true && process.client) {
|
|
29
31
|
await cloud_store.create_connexion()
|
|
30
32
|
await websocket_store.ws_connect()
|
|
31
33
|
}
|
|
32
34
|
})
|
|
35
|
+
|
|
36
|
+
onMounted(async () => {
|
|
37
|
+
console.log("useRuntimeConfig()", useRuntimeConfig())
|
|
38
|
+
console.log("site_key", site_key)
|
|
39
|
+
})
|
|
33
40
|
</script>
|
package/components/Recaptcha.vue
CHANGED
|
@@ -16,9 +16,13 @@
|
|
|
16
16
|
const cloud_store = use_cloud_store()
|
|
17
17
|
const { is_captcha_validated } = storeToRefs(cloud_store)
|
|
18
18
|
|
|
19
|
-
const
|
|
19
|
+
const props = defineProps({
|
|
20
|
+
site_key: { type: String, required: true },
|
|
21
|
+
})
|
|
22
|
+
const { site_key } = props
|
|
20
23
|
|
|
21
24
|
onMounted(() => {
|
|
25
|
+
console.log("recaptcha mounted", site_key)
|
|
22
26
|
if (process.client) {
|
|
23
27
|
const config = useRuntimeConfig()
|
|
24
28
|
if (config.public.NODE_ENV !== "production") {
|
package/package.json
CHANGED