feat: Enhance AutoScore functionality with interval triggers and JSON tree support

- Added support for trigger trees in AutoScoreRule interface.
- Implemented functions to convert query trees to JSON and vice versa.
- Updated IntervalValue to use days, hours, and minutes instead of a single amount and unit.
- Refactored IntervalValueWidget to allow separate input for days, hours, and minutes.
- Added validation to ensure at least one interval trigger is present.
- Enhanced user interface with informative alerts and tooltips for better user experience.
- Updated localization files to include new strings for interval triggers and UI elements.
This commit is contained in:
NanGua-QWQ
2026-04-10 21:09:04 +08:00
parent 3caea0afe5
commit eef6b703f7
13 changed files with 931 additions and 294 deletions
@@ -1,5 +1,5 @@
import React, { useMemo } from "react"
import { Card } from "antd"
import { Alert, Card } from "antd"
import {
Builder,
Query,
@@ -46,6 +46,12 @@ export const TriggerRuleBuilder: React.FC<TriggerRuleBuilderProps> = ({
style={{ marginBottom: "24px", backgroundColor: "var(--ss-card-bg)" }}
title={t("autoScore.whenTriggered")}
>
<Alert
type="info"
showIcon
style={{ marginBottom: "16px" }}
title={t("autoScore.triggerScheduleHint")}
/>
<div
className="query-builder-container"
style={{