Skip to content

Commit

Permalink
add prop site_key
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienChampagnol committed Aug 16, 2023
1 parent b466052 commit eb2997c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
8 changes: 7 additions & 1 deletion components/Launcher.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<h4 class="pb-3">
Please complete the recaptcha to launch the app
</h4>
<vue-recaptcha ref="recaptcha" :sitekey="config.public.SITE_KEY" :loadRecaptchaScript="true"
<vue-recaptcha ref="recaptcha" :sitekey="site_key" :loadRecaptchaScript="true"
@expired="is_captcha_validated = false" @verify="submit_recaptcha" align-self="center" />
</v-col>
<v-col v-if="!is_cloud_running && is_connexion_launched">
Expand All @@ -22,6 +22,12 @@ import { VueRecaptcha } from "vue-recaptcha"
const cloud_store = use_cloud_store()
const { is_cloud_running, is_captcha_validated, is_connexion_launched } = storeToRefs(cloud_store)
const props = defineProps({
site_key: { type: String, required: true }
})
const { site_key } = toRefs(props)
watch(is_captcha_validated, async (value) => {
if (value === true) {
await cloud_store.create_connexion()
Expand Down
7 changes: 4 additions & 3 deletions components/Wrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Header :tool_name="tool_name" :cards_list="cards_list" />
</v-col>
<v-col v-if="!is_cloud_running">
<Launcher />
<Launcher :site_key="site_key" />
</v-col>
<v-col v-if="is_cloud_running">
<Stepper />
Expand All @@ -22,9 +22,10 @@ const cloud_store = use_cloud_store()
const { is_cloud_running } = storeToRefs(cloud_store)
const props = defineProps({
cards_list: { type: Array, required: true }
cards_list: { type: Array, required: true },
site_key: { type: String, required: true }
})
const { cards_list } = props
const { cards_list, site_key } = props
const stepper_tree = inject('stepper_tree')
const { tool_name, route_prefix } = stepper_tree
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"description": "OpenSource Vue/Vuetify framework for web applications",
"type": "module",
"version": "0.0.9",
"version": "0.0.10",
"main": "./nuxt.config.js",
"dependencies": {
"@mdi/font": "^7.2.96",
Expand Down

0 comments on commit eb2997c

Please sign in to comment.