Add frontend app and redesign prototype for rule management UI.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
11
frontend-redesign/patch2.py
Normal file
11
frontend-redesign/patch2.py
Normal 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)
|
||||
Reference in New Issue
Block a user