diff --git a/src/locales/zh-CN.json b/src/locales/zh-CN.json index f382b838..b5897801 100644 --- a/src/locales/zh-CN.json +++ b/src/locales/zh-CN.json @@ -337,7 +337,7 @@ "飞书机器人": "飞书机器人", "自定义通知": "自定义通知", "已关闭": "已关闭", - "gotify的url地址,例如 https://push.example.de:8080": "gotify的url地址,例如 https://push.example.de:8080", + "gotify的url地址,例如 https://push.example.de:8080": "gotify的url地址,例如 https://push.example.de:8080", "gotify的消息应用token码": "gotify的消息应用token码", "推送消息的优先级": "推送消息的优先级", "chat的url地址": "chat的url地址", @@ -349,21 +349,21 @@ "PushDeer的Key,https://github.com/easychen/pushdeer": "PushDeer的Key,https://github.com/easychen/pushdeer", "PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push": "PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push", "Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX": "Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX", - "BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)": "BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)", - "BARK推送铃声,铃声列表去APP查看复制填写": "BARK推送铃声,铃声列表去APP查看复制填写", - "BARK推送消息的分组, 默认为qinglong": "BARK推送消息的分组, 默认为qinglong", + "BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)": "BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)", + "BARK推送铃声,铃声列表去APP查看复制填写": "BARK推送铃声,铃声列表去APP查看复制填写", + "BARK推送消息的分组,默认为qinglong": "BARK推送消息的分组,默认为qinglong", "telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw": "telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw", "telegram用户的id,例如:129xxx206": "telegram用户的id,例如:129xxx206", "代理IP": "代理IP", "代理端口": "代理端口", - "telegram代理配置认证参数, 用户名与密码用英文冒号连接 user:password": "telegram代理配置认证参数, 用户名与密码用英文冒号连接 user:password", + "telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password": "telegram代理配置认证参数, 用户名与密码用英文冒号连接 user:password", "telegram api自建的反向代理地址,默认tg官方api": "telegram api自建的反向代理地址,默认tg官方api", "钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd": "钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd", "密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串": "密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串", - "企业微信机器人的 webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa": "企业微信机器人的 webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa", + "企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa": "企业微信机器人的 webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa", "企业微信代理地址": "企业微信代理地址", - "corpid,corpsecret,touser(注:多个成员ID使用|隔开),agentid,消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat": "corpid,corpsecret,touser(注:多个成员ID使用|隔开),agentid,消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat", - "密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql": "密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql", + "corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat": "corpid,corpsecret,touser(注:多个成员ID使用|隔开),agentid,消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat", + "密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql": "密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql", "发送的目标,群组或者好友": "发送的目标,群组或者好友", "请输入要发送的目标": "请输入要发送的目标", "群聊": "群聊", diff --git a/src/pages/setting/index.tsx b/src/pages/setting/index.tsx index 20aab29c..c349309a 100644 --- a/src/pages/setting/index.tsx +++ b/src/pages/setting/index.tsx @@ -33,6 +33,7 @@ import { useOutletContext } from '@umijs/max'; import { SharedContext } from '@/layouts'; import './index.less'; import CodeMirror from '@uiw/react-codemirror'; +import useResizeObserver from '@react-hook/resize-observer'; const { Text } = Typography; const isDemoEnv = window.__ENV__DeployEnv === 'demo'; @@ -117,7 +118,15 @@ const Setting = () => { const [loginLogData, setLoginLogData] = useState([]); const [systemLogData, setSystemLogData] = useState(''); const [notificationInfo, setNotificationInfo] = useState(); - const systemLogRef = useRef(); + const containergRef = useRef(null); + const [height, setHeight] = useState(0); + + useResizeObserver(containergRef, (entry) => { + const _height = entry.target.parentElement?.parentElement?.offsetHeight; + if (_height && height !== _height - 66) { + setHeight(_height - 66); + } + }); const getApps = () => { setLoading(true); @@ -301,90 +310,88 @@ const Setting = () => { : [] } > - - ), - }, - ] - : []), - { - key: 'app', - label: intl.get('应用设置'), - children: ( - - ), - }, - { - key: 'notification', - label: intl.get('通知设置'), - children: , - }, - { - key: 'syslog', - label: intl.get('系统日志'), - children: ( - { - setTimeout(() => { - view.scrollDOM.scrollTo({ - top: view.scrollDOM.scrollHeight, - behavior: 'smooth', - }); - }, 300); - }} - readOnly={true} - theme={theme.includes('dark') ? 'dark' : 'light'} - /> - ), - }, - { - key: 'login', - label: intl.get('登录日志'), - children: , - }, - { - key: 'other', - label: intl.get('其他设置'), - children: ( - - ), - }, - { - key: 'about', - label: intl.get('关于'), - children: , - }, - ]} - > +
+ + ), + }, + ] + : []), + { + key: 'app', + label: intl.get('应用设置'), + children: ( +
+ ), + }, + { + key: 'notification', + label: intl.get('通知设置'), + children: , + }, + { + key: 'syslog', + label: intl.get('系统日志'), + children: ( + { + setTimeout(() => { + view.scrollDOM.scrollTo({ + top: view.scrollDOM.scrollHeight, + behavior: 'smooth', + }); + }, 300); + }} + readOnly={true} + theme={theme.includes('dark') ? 'dark' : 'light'} + /> + ), + }, + { + key: 'login', + label: intl.get('登录日志'), + children: , + }, + { + key: 'other', + label: intl.get('其他设置'), + children: ( + + ), + }, + { + key: 'about', + label: intl.get('关于'), + children: , + }, + ]} + > + { hasFeedback style={{ maxWidth: 300 }} > - + { hasFeedback style={{ maxWidth: 300 }} > - +