mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-05-07 04:52:54 +08:00
refactor(app): 优化批量任务完成消息显示逻辑
- 提取批量标签变量以支持不同模式下的消息显示 - 将硬编码的 Outlook 批量文本替换为动态标签 - 统一成功和警告消息中的批量任务名称显示 - 保持原有的日志记录功能不变
This commit is contained in:
@@ -1289,12 +1289,13 @@ function connectBatchWebSocket(batchId) {
|
||||
if (!toastShown) {
|
||||
toastShown = true;
|
||||
if (data.status === 'completed') {
|
||||
addLog('success', `[完成] Outlook 批量任务完成!成功: ${data.success}, 失败: ${data.failed}, 跳过: ${data.skipped || 0}`);
|
||||
const batchLabel = isOutlookBatchMode ? 'Outlook 批量' : '批量';
|
||||
addLog('success', `[完成] ${batchLabel}任务完成!成功: ${data.success}, 失败: ${data.failed}, 跳过: ${data.skipped || 0}`);
|
||||
if (data.success > 0) {
|
||||
toast.success(`Outlook 批量注册完成,成功 ${data.success} 个`);
|
||||
toast.success(`${batchLabel}注册完成,成功 ${data.success} 个`);
|
||||
loadRecentAccounts();
|
||||
} else {
|
||||
toast.warning('Outlook 批量注册完成,但没有成功注册任何账号');
|
||||
toast.warning(`${batchLabel}注册完成,但没有成功注册任何账号`);
|
||||
}
|
||||
} else if (data.status === 'failed') {
|
||||
addLog('error', '[错误] 批量任务执行失败');
|
||||
|
||||
Reference in New Issue
Block a user