refactor(admin): consolidate duplicate configuration

Remove duplicate comment, captcha, filing, and website-security configuration paths.

Move front submission verification to the captcha scene matrix and retire obsolete admin routes and components.
This commit is contained in:
2026-08-13 02:26:17 +08:00
parent 0752a2fbf6
commit ab70a5eae9
32 changed files with 86 additions and 912 deletions
+24
View File
@@ -210,6 +210,11 @@
submit: function (btn, action) {
var self = this;
if (action !== 'posts_draft' && !this.requestCaptcha(function () {
self.submit(btn, action);
})) {
return;
}
this.isSubmitting = true;
var original = btn.innerHTML;
btn.disabled = true;
@@ -292,6 +297,25 @@
});
},
requestCaptcha: function (onVerified) {
var verified = this.form.querySelector('input[name="captcha_verified"]');
if (verified && verified.value === '1') {
return true;
}
var captcha = window.AKSRTCaptchaState &&
window.AKSRTCaptchaState.scenes &&
window.AKSRTCaptchaState.scenes.front_submit;
if (!captcha || typeof captcha.verify !== 'function') {
return true;
}
captcha.verify(function (passed) {
if (passed) {
onVerified();
}
});
return false;
},
bindDraftDelete: function () {
document.addEventListener('click', function (e) {
var btn = e.target.closest('.aksrt-submit-drafts__delete');