Add *captcha settings guide

This commit is contained in:
Acid Chicken (硫酸鶏) 2020-04-29 06:04:05 +09:00
parent 9daa900793
commit 01411327b8
No known key found for this signature in database
GPG key ID: 5388F56C75B677A1
2 changed files with 40 additions and 0 deletions

View file

@ -239,6 +239,7 @@ export default Vue.extend({
data() {
return {
loaded: false,
url,
proxyAccount: null,
proxyAccountId: null,
@ -298,6 +299,41 @@ export default Vue.extend({
},
},
watch: {
enableHcaptcha(enabled) {
if (enabled && this.loaded && this.enableRecaptcha) {
this.$root.dialog({
type: 'question', // warning cancel
showCancelButton: true,
title: this.$t('settingGuide'),
text: this.$t('avoidMultiCaptchaConfirm'),
}).then(({ canceled }) => {
if (canceled) {
return;
}
this.enableRecaptcha = false;
});
}
},
enableRecaptcha(enabled) {
if (enabled && this.loaded && this.enableHcaptcha) {
this.$root.dialog({
type: 'question', // warning cancel
showCancelButton: true,
title: this.$t('settingGuide'),
text: this.$t('avoidMultiCaptchaConfirm'),
}).then(({ canceled }) => {
if (canceled) {
return;
}
this.enableHcaptcha = false;
});
}
}
},
created() {
this.name = this.meta.name;
this.description = this.meta.description;
@ -352,6 +388,8 @@ export default Vue.extend({
this.proxyAccount = proxyAccount;
});
}
this.loaded = true;
},
mounted() {