Skip to content

Commit e42b2e7

Browse files
committed
optimize
1 parent 880ddee commit e42b2e7

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/lang/en/acl.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
"login": {
2929
"sso_login": "Login with Single Sign-On"
3030
},
31-
"is_regex": "Match Path as Regular Expression",
31+
"is_regex": "Match role using regular expressions",
3232
"exclude_subfolder": "Exclude subfolders (do not match /* automatically)"
3333
}

src/lang/zh-CN/acl.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
"login": {
2929
"sso_login": "统一身份认证"
3030
},
31-
"is_regex": "使用正则表达式匹配路径",
32-
"exclude_subfolder": "不包含子文件夹(不自动匹配/*)"
31+
"is_regex": "使用正则表达式匹配角色",
32+
"exclude_subfolder": "不包含子文件夹(不自动匹配.../*)"
3333
}

src/pages/manage/acl/AddOrEdit.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ const AddOrEditACL = () => {
8484
placeholder="e.g., admin, editor, viewer"
8585
onChange={(value) => setRule("role", value)}
8686
/>
87+
<Checkbox
88+
checked={!!rule.is_regex}
89+
onChange={() => setRule("is_regex", (v) => !v)}
90+
>
91+
{t(`acl.is_regex`)}
92+
</Checkbox>
8793
<Item
8894
name="path"
8995
type={ACLItemType.String}
@@ -92,27 +98,21 @@ const AddOrEditACL = () => {
9298
placeholder="e.g., / or /folder/subfolder"
9399
onChange={(value) => setRule("path", value)}
94100
/>
95-
<Item
96-
name="priority"
97-
type={ACLItemType.Number}
98-
value={rule.priority}
99-
min={0}
100-
onChange={(value) => setRule("priority", value)}
101-
/>
102-
<Checkbox
103-
checked={!!rule.is_regex}
104-
onChange={() => setRule("is_regex", (v) => !v)}
105-
>
106-
{t(`acl.is_regex`)}
107-
</Checkbox>
108101
<Checkbox
109102
checked={!!rule.exclude_subfolder}
110103
onChange={() => setRule("exclude_subfolder", (v) => !v)}
111104
>
112105
{t("acl.exclude_subfolder", {
113-
default: "不包含子文件夹(不自动匹配/*)",
106+
default: "不包含子文件夹(不自动匹配../*)",
114107
})}
115108
</Checkbox>
109+
<Item
110+
name="priority"
111+
type={ACLItemType.Number}
112+
value={rule.priority}
113+
min={0}
114+
onChange={(value) => setRule("priority", value)}
115+
/>
116116
</ResponsiveGrid>
117117

118118
<Container mt="$4" w="$full">

0 commit comments

Comments
 (0)