Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Change to non-interactive turnstile #1678

Merged
merged 1 commit into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ export default defineNuxtConfig({
},
},
turnstile: {
siteKey: '0x4AAAAAAAHWfmKCm7cUG869',
siteKey: '0x4AAAAAAAW3guHM6Eunbgwu',
},
nitro: {
moduleSideEffects: ['@vintl/compact-number/locale-data'],
Expand Down
12 changes: 11 additions & 1 deletion pages/auth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,17 @@
}

.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 {
Expand Down
10 changes: 8 additions & 2 deletions pages/auth/reset-password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<template v-if="step === 'choose_method'">
<p>
{{ formatMessage(methodChoiceMessages.description) }}
<NuxtTurnstile ref="turnstile" v-model="token" class="turnstile" />
</p>

<div class="iconified-input">
Expand All @@ -23,7 +22,14 @@
/>
</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) }}
</button>
</template>
Expand Down
13 changes: 11 additions & 2 deletions pages/auth/sign-in.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,18 @@
/>
</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 />
</button>

Expand Down
15 changes: 12 additions & 3 deletions pages/auth/sign-up.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@
/>
</div>

<NuxtTurnstile ref="turnstile" v-model="token" class="turnstile" />

<Checkbox
v-model="subscribe"
class="subscribe-btn"
Expand All @@ -108,7 +106,18 @@
</IntlFormatted>
</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 />
</button>

Expand Down
Loading