feat: 增强错误处理逻辑,添加 Cloudflare 风控和网络超时拦截提示

This commit is contained in:
QLHazyCoder
2026-04-18 20:54:00 +08:00
parent 82471af931
commit 609cdeaeb5
12 changed files with 440 additions and 17 deletions
+11
View File
@@ -3896,6 +3896,17 @@ chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
return true;
}
case 'SECURITY_BLOCKED_ALERT': {
openConfirmModal({
title: message.payload?.title || '流程已完全停止',
message: message.payload?.message || '检测到安全风控,当前流程已完全停止。',
alert: message.payload?.alert || { text: '检测到 Cloudflare 风控,请暂停当前操作。', tone: 'danger' },
confirmLabel: '我知道了',
confirmVariant: 'btn-danger',
}).catch(() => {});
break;
}
case 'LOG_ENTRY':
appendLog(message.payload);
if (message.payload.level === 'error') {