mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-19 19:04:23 +08:00
feat(设置): 添加全局字体选择功能
fix: 自动化不能保存的问题
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
createEmptyTriggerTree,
|
||||
createTriggerQueryConfig,
|
||||
hasUnsupportedTriggerLogic,
|
||||
normalizeActionDrafts,
|
||||
queryTreeToTriggers,
|
||||
triggersToQueryTree,
|
||||
type ActionDraft,
|
||||
@@ -183,7 +184,15 @@ function AutoScoreManager({ canEdit }: AutoScoreManagerProps): React.JSX.Element
|
||||
return
|
||||
}
|
||||
|
||||
const actionPayload = actionDraftsToPayload(actionDrafts)
|
||||
const normalizedActionDrafts = normalizeActionDrafts(actionDrafts)
|
||||
const actionPayload = actionDraftsToPayload(normalizedActionDrafts)
|
||||
if (actionDrafts.length === 0) {
|
||||
setActionDrafts(normalizedActionDrafts)
|
||||
}
|
||||
if (actionPayload.error === "action_required") {
|
||||
messageApi.warning(t("autoScore.actionRequired"))
|
||||
return
|
||||
}
|
||||
if (actionPayload.error === "score_required") {
|
||||
messageApi.warning(t("autoScore.scorePlaceholder"))
|
||||
return
|
||||
@@ -423,7 +432,7 @@ function AutoScoreManager({ canEdit }: AutoScoreManagerProps): React.JSX.Element
|
||||
value={actionDrafts}
|
||||
tagOptions={tagOptions}
|
||||
canEdit={canEdit}
|
||||
onChange={setActionDrafts}
|
||||
onChange={(nextDrafts) => setActionDrafts(normalizeActionDrafts(nextDrafts))}
|
||||
/>
|
||||
|
||||
<div style={{ marginBottom: "24px", display: "flex", gap: "12px" }}>
|
||||
|
||||
Reference in New Issue
Block a user