-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(frontend/MkSignup): prevent uncaught errors from interrupted signup #10265
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #10265 +/- ##
===========================================
- Coverage 70.75% 70.74% -0.01%
===========================================
Files 807 807
Lines 77290 77290
Branches 5383 5384 +1
===========================================
- Hits 54685 54682 -3
- Misses 22605 22608 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
<MkCaptcha v-if="instance.enableHcaptcha" ref="hcaptcha" v-model="hCaptchaResponse" class="captcha" provider="hcaptcha" :sitekey="instance.hcaptchaSiteKey"/> | ||
<MkCaptcha v-if="instance.enableRecaptcha" ref="recaptcha" v-model="reCaptchaResponse" class="captcha" provider="recaptcha" :sitekey="instance.recaptchaSiteKey"/> | ||
<MkCaptcha v-if="instance.enableTurnstile" ref="turnstile" v-model="turnstileResponse" class="captcha" provider="turnstile" :sitekey="instance.turnstileSiteKey"/> | ||
<MkCaptcha v-if="instance.enableHcaptcha && instance.hcaptchaSiteKey" ref="hcaptcha" v-model="hCaptchaResponse" class="captcha" provider="hcaptcha" :sitekey="instance.hcaptchaSiteKey"/> | ||
<MkCaptcha v-if="instance.enableRecaptcha && instance.recaptchaSiteKey" ref="recaptcha" v-model="reCaptchaResponse" class="captcha" provider="recaptcha" :sitekey="instance.recaptchaSiteKey"/> | ||
<MkCaptcha v-if="instance.enableTurnstile && instance.turnstileSiteKey" ref="turnstile" v-model="turnstileResponse" class="captcha" provider="turnstile" :sitekey="instance.turnstileSiteKey"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
管理者が SiteKey を設定し忘れた際にエラー画面が表示されて問題に気付きやすいので、ここは可能ならそのままの方が良さそう
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あ、でしたら代わりにsitekeyをnullableにしてみます(いまはタイプエラーが出ていますので)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
でもsitekeyとenableが共にあるのってちょっと謎なのでは…sitekeyだけでいい気がします
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
例えば
- reCAPTCHA から hCaptcha に乗り換える
- hCaptcha が難しいので reCAPTCHA に戻ろうかなと考える
- enabled が別で存在するならスイッチを切り替えるだけで良いが、そうでない場合は sitekey を入れ直さなくてはならない
みたいなシナリオは想定できるので別に存在するのは非合理的というわけでもない
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
でもpublic APIでフロントエンドに渡すのはやっぱりsitekeyで充分じゃないですか?🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
あー……それはそうかもです
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
と思ったけど管理者画面から表示上消えてしまいそう
これも …私のgitがぶっ壊れてる? |
:soukamo: |
update branchボタンがあったので押してみた |
🙏🏻 |
なにを
onSubmit
をasync functionにしてAPIリクエストエラーなどを全てcatchなんで
#10262 とは別の原因でローカルでcypressテストが落ちるので