Skip to content

Commit

Permalink
なしでも保存できるようにした
Browse files Browse the repository at this point in the history
  • Loading branch information
samunohito committed Dec 19, 2024
1 parent 41d5afb commit cf57926
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/frontend/src/pages/admin/bot-protection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template v-else-if="botProtectionForm.savedState.provider === 'turnstile'" #suffix>Turnstile</template>
<template v-else-if="botProtectionForm.savedState.provider === 'testcaptcha'" #suffix>testCaptcha</template>
<template v-else #suffix>{{ i18n.ts.none }} ({{ i18n.ts.notRecommended }})</template>
<template v-if="botProtectionForm.modified.value" #footer>
<template #footer>
<MkFormFooter :canSaving="canSaving" :form="botProtectionForm"/>
</template>

Expand Down Expand Up @@ -145,7 +145,8 @@ const turnstileResponse = ref<string | null>(null);
const testCaptchaResponse = ref<string | null>(null);

const canSaving = computed((): boolean => {
return (botProtectionForm.state.provider === 'hcaptcha' && !!hCaptchaResponse.value) ||
return (botProtectionForm.state.provider === null) ||
(botProtectionForm.state.provider === 'hcaptcha' && !!hCaptchaResponse.value) ||
(botProtectionForm.state.provider === 'mcaptcha' && !!mCaptchaResponse.value) ||
(botProtectionForm.state.provider === 'recaptcha' && !!reCaptchaResponse.value) ||
(botProtectionForm.state.provider === 'turnstile' && !!turnstileResponse.value) ||
Expand Down

0 comments on commit cf57926

Please sign in to comment.