Change to non-interactive turnstile (#1678)

This commit is contained in:
Prospector 2024-04-18 16:36:26 -07:00 committed by GitHub
parent 6808d270a7
commit 5a166d2455
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 43 additions and 9 deletions

View File

@ -366,7 +366,7 @@ export default defineNuxtConfig({
}, },
}, },
turnstile: { turnstile: {
siteKey: '0x4AAAAAAAHWfmKCm7cUG869', siteKey: '0x4AAAAAAAW3guHM6Eunbgwu',
}, },
nitro: { nitro: {
moduleSideEffects: ['@vintl/compact-number/locale-data'], moduleSideEffects: ['@vintl/compact-number/locale-data'],

View File

@ -61,7 +61,17 @@
} }
.turnstile { .turnstile {
display: none; display: flex;
justify-content: center;
overflow: hidden;
border-radius: var(--radius-md);
border: 2px solid var(--color-button-bg);
height: 66px;
iframe {
margin: -1px;
min-width: calc(100% + 2px);
}
} }
.auth-form { .auth-form {

View File

@ -5,7 +5,6 @@
<template v-if="step === 'choose_method'"> <template v-if="step === 'choose_method'">
<p> <p>
{{ formatMessage(methodChoiceMessages.description) }} {{ formatMessage(methodChoiceMessages.description) }}
<NuxtTurnstile ref="turnstile" v-model="token" class="turnstile" />
</p> </p>
<div class="iconified-input"> <div class="iconified-input">
@ -23,7 +22,14 @@
/> />
</div> </div>
<button class="btn btn-primary centered-btn" @click="recovery"> <NuxtTurnstile
ref="turnstile"
v-model="token"
class="turnstile"
:options="{ theme: $colorMode.value === 'light' ? 'light' : 'dark' }"
/>
<button class="btn btn-primary centered-btn" :disabled="!token" @click="recovery">
<SendIcon /> {{ formatMessage(methodChoiceMessages.action) }} <SendIcon /> {{ formatMessage(methodChoiceMessages.action) }}
</button> </button>
</template> </template>

View File

@ -81,9 +81,18 @@
/> />
</div> </div>
<NuxtTurnstile ref="turnstile" v-model="token" class="turnstile" /> <NuxtTurnstile
ref="turnstile"
v-model="token"
class="turnstile"
:options="{ theme: $colorMode.value === 'light' ? 'light' : 'dark' }"
/>
<button class="btn btn-primary continue-btn centered-btn" @click="beginPasswordSignIn()"> <button
class="btn btn-primary continue-btn centered-btn"
:disabled="!token"
@click="beginPasswordSignIn()"
>
{{ formatMessage(commonMessages.signInButton) }} <RightArrowIcon /> {{ formatMessage(commonMessages.signInButton) }} <RightArrowIcon />
</button> </button>

View File

@ -84,8 +84,6 @@
/> />
</div> </div>
<NuxtTurnstile ref="turnstile" v-model="token" class="turnstile" />
<Checkbox <Checkbox
v-model="subscribe" v-model="subscribe"
class="subscribe-btn" class="subscribe-btn"
@ -108,7 +106,18 @@
</IntlFormatted> </IntlFormatted>
</p> </p>
<button class="btn btn-primary continue-btn centered-btn" @click="createAccount"> <NuxtTurnstile
ref="turnstile"
v-model="token"
class="turnstile"
:options="{ theme: $colorMode.value === 'light' ? 'light' : 'dark' }"
/>
<button
class="btn btn-primary continue-btn centered-btn"
:disabled="!token"
@click="createAccount"
>
{{ formatMessage(messages.createAccountButton) }} <RightArrowIcon /> {{ formatMessage(messages.createAccountButton) }} <RightArrowIcon />
</button> </button>