diff --git a/repo/js/FullyAutoAndSemiAutoTools/config/settings.json b/repo/js/FullyAutoAndSemiAutoTools/config/settings.json index af26405d5..2389cb2be 100644 --- a/repo/js/FullyAutoAndSemiAutoTools/config/settings.json +++ b/repo/js/FullyAutoAndSemiAutoTools/config/settings.json @@ -34,6 +34,16 @@ "label": "配置模式-刷新-清空运行记录", "default": false }, + { + "name": "refresh_record_mode", + "type": "select", + "label": "清空运行记录模式", + "options": [ + "全部", + "UID" + ], + "default": "UID" + }, { "name": "loading_level", "type": "input-text", diff --git a/repo/js/FullyAutoAndSemiAutoTools/main.js b/repo/js/FullyAutoAndSemiAutoTools/main.js index 6d20bb7ff..8f21ed86d 100644 --- a/repo/js/FullyAutoAndSemiAutoTools/main.js +++ b/repo/js/FullyAutoAndSemiAutoTools/main.js @@ -398,9 +398,17 @@ async function initRefresh(settingsConfig) { log.error("[PATH] 保存 PATH_JSON_LIST 失败: {0}", e.message); } if (settings.refresh_record) { + if (settings.refresh_record_mode === "UID") { + RecordList=RecordList.filter(item => item.uid !== Record.uid) + RecordPathList=RecordPathList.filter(item => item.uid !== Record.uid) + file.writeTextSync(json_path_name.RecordPathText, JSON.stringify(RecordPathList)) + file.writeTextSync(json_path_name.RecordText, JSON.stringify(RecordList)) + log.info("已清空UID:{0}记录文件",Record.uid) + return + } file.writeTextSync(json_path_name.RecordPathText, JSON.stringify([])) file.writeTextSync(json_path_name.RecordText, JSON.stringify([])) - log.info("已清空记录文件") + log.info("已清空全部记录文件") } } diff --git a/repo/js/FullyAutoAndSemiAutoTools/settings.json b/repo/js/FullyAutoAndSemiAutoTools/settings.json index af26405d5..2389cb2be 100644 --- a/repo/js/FullyAutoAndSemiAutoTools/settings.json +++ b/repo/js/FullyAutoAndSemiAutoTools/settings.json @@ -34,6 +34,16 @@ "label": "配置模式-刷新-清空运行记录", "default": false }, + { + "name": "refresh_record_mode", + "type": "select", + "label": "清空运行记录模式", + "options": [ + "全部", + "UID" + ], + "default": "UID" + }, { "name": "loading_level", "type": "input-text",