Skip to content

Commit 8f6c94c

Browse files
committed
refactor(okww): 收窄 ErrorLog 默认关键词为 info_set 错误,移除前端表单隐性默认值
- _DEFAULT_OKWW_ERROR_LOG / OkwwConfig 默认 ErrorLog:「错误」→「info_set 错误」 - OkwwScriptEdit.vue:去除 SuccessLog/ErrorLog 的表单隐性默认值(空字符串) 这两个字段未在 Okww 表单中暴露为可编辑项,默认值应交由后端兜底
1 parent 71ccd3f commit 8f6c94c

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

app/models/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ def __init__(self) -> None:
21012101
self.Script_ErrorLog = ConfigItem(
21022102
"Script",
21032103
"ErrorLog",
2104-
"connected:False|游戏更新成功, 游戏即将重启|错误",
2104+
"connected:False|游戏更新成功, 游戏即将重启|info_set 错误",
21052105
)
21062106

21072107
## Game ------------------------------------------------------------

app/task/Okww/AutoProxy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def _yes_no(value: bool) -> str:
5050
)
5151

5252
# prepare 中 ErrorLog 经清洗后为空时回退(与 OkwwConfig 默认串一致)
53-
_DEFAULT_OKWW_ERROR_LOG = "connected:False|游戏更新成功, 游戏即将重启|错误"
53+
_DEFAULT_OKWW_ERROR_LOG = "connected:False|游戏更新成功, 游戏即将重启|info_set 错误"
5454

5555

5656
def _split_args(raw: object) -> list[str]:

frontend/src/views/EditView/Script/OkwwScriptEdit.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,8 @@ const okwwConfig = reactive<OkwwConfig>({
348348
LogTimeStart: 1,
349349
LogTimeEnd: 23,
350350
LogTimeFormat: '%Y-%m-%d %H:%M:%S,%f',
351-
SuccessLog: '任务执行完成 | task completed',
352-
ErrorLog: 'connected:False|游戏更新成功, 游戏即将重启|错误',
351+
SuccessLog: '',
352+
ErrorLog: '',
353353
},
354354
Game: {
355355
Enabled: false,

0 commit comments

Comments
 (0)