add text description for rules

This commit is contained in:
Gabe Yuan
2023-08-22 10:35:57 +08:00
parent f463f3ce08
commit 2224455a7f
2 changed files with 19 additions and 4 deletions

View File

@@ -108,9 +108,9 @@ export const I18N = {
zh: `注入订阅规则`,
en: `Inject Subscribe Rules`,
},
edit_rules: {
zh: `编辑规则`,
en: `Edit Rules`,
personal_rules: {
zh: `个人规则`,
en: `Personal Rules`,
},
subscribe_rules: {
zh: `订阅规则`,
@@ -120,6 +120,14 @@ export const I18N = {
zh: `订阅地址`,
en: `Subscribe URL`,
},
rules_warn_1: {
zh: `1、“个人规则”一直生效选择“注入订阅规则”后“订阅规则”才会生效。`,
en: `1. The "Personal Rules" are always in effect. After selecting "Inject Subscription Rules", the "Subscription Rules" will take effect.`,
},
rules_warn_2: {
zh: `2、“订阅规则”的注入位置是倒数第二的位置因此除全局规则(*)外,“个人规则”优先级比“订阅规则”高,“个人规则”填写同样的网址会覆盖”订阅规则“的条目。`,
en: `2. The injection position of "Subscription Rules" is the penultimate position. Therefore, except for the global rules (*), the priority of "Personal Rules" is higher than that of "Subscription Rules". Filling in the same url in "Personal Rules" will overwrite "Subscription Rules" entry.`,
},
sync_warn: {
zh: `如果服务器存在其他客户端同步的数据,第一次同步将直接覆盖本地配置,后面则根据修改时间,新的覆盖旧的。`,
en: `If the server has data synchronized by other clients, the first synchronization will directly overwrite the local configuration, and later, according to the modification time, the new one will overwrite the old one.`,

View File

@@ -3,6 +3,7 @@ import Stack from "@mui/material/Stack";
import TextField from "@mui/material/TextField";
import Button from "@mui/material/Button";
import CircularProgress from "@mui/material/CircularProgress";
import Alert from "@mui/material/Alert";
import {
GLOBAL_KEY,
DEFAULT_RULE,
@@ -738,9 +739,15 @@ export default function Rules() {
return (
<Box>
<Stack spacing={3}>
<Alert severity="info">
{i18n("rules_warn_1")}
<br />
{i18n("rules_warn_2")}
</Alert>
<Box sx={{ borderBottom: 1, borderColor: "divider" }}>
<Tabs value={activeTab} onChange={handleTabChange}>
<Tab label={i18n("edit_rules")} />
<Tab label={i18n("personal_rules")} />
<Tab label={i18n("subscribe_rules")} />
</Tabs>
</Box>