Add frontend app and redesign prototype for rule management UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Xin Wang
2026-07-16 11:24:02 +08:00
parent 64d5b82560
commit d093f95197
82 changed files with 12853 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import re
with open('src/components/RuleManagement.tsx', 'r') as f:
content = f.read()
content = re.sub(r" if \(!formCategory\.trim\(\)\) \{\n errors\.category = '类别不能为空';\n \}\n", "", content)
content = re.sub(r" enabled: editingRule \? editingRule\.enabled : true, // default enabled for new\n category: formCategory\.trim\(\),\n severity: formSeverity,\n description: formDescription\.trim\(\) \|\| undefined\n", " enabled: editingRule ? editingRule.enabled : true\n", content)
with open('src/components/RuleManagement.tsx', 'w') as f:
f.write(content)