mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-01 11:20:14 +08:00
fix: correct typos in source code and locales (#3003)
- Fix Countrys -> Countries in comment - Fix Scrolldown -> ScrollDown in variable name - Fix completeTowFactor -> completeTwoFactor (3x) - Fix deactiveTowFactor -> deactivateTwoFactor (3x) - Fix activeOrDeactiveTwoFactor -> activeOrDeactivateTwoFactor - Fix API route /two-factor/deactive -> /two-factor/deactivate - Fix elment -> element in function param - Fix synolog -> synology in comment - Fix Chinese comment 制定 -> 指定 - Fix swapped BARK English translations on lines 360-361
This commit is contained in:
parent
2fe9470ff0
commit
3aab1233bb
|
|
@ -140,12 +140,12 @@ export default (app: Router) => {
|
||||||
);
|
);
|
||||||
|
|
||||||
route.put(
|
route.put(
|
||||||
'/two-factor/deactive',
|
'/two-factor/deactivate',
|
||||||
async (req: Request, res: Response, next: NextFunction) => {
|
async (req: Request, res: Response, next: NextFunction) => {
|
||||||
const logger: Logger = Container.get('logger');
|
const logger: Logger = Container.get('logger');
|
||||||
try {
|
try {
|
||||||
const userService = Container.get(UserService);
|
const userService = Container.get(UserService);
|
||||||
const data = await userService.deactiveTwoFactor();
|
const data = await userService.deactivateTwoFactor();
|
||||||
res.send({ code: 200, data });
|
res.send({ code: 200, data });
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return next(e);
|
return next(e);
|
||||||
|
|
|
||||||
|
|
@ -330,7 +330,7 @@ export default class UserService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public async deactiveTwoFactor() {
|
public async deactivateTwoFactor() {
|
||||||
const authInfo = await this.getAuthInfo();
|
const authInfo = await this.getAuthInfo();
|
||||||
await this.updateAuthInfo(authInfo, {
|
await this.updateAuthInfo(authInfo, {
|
||||||
twoFactorActivated: false,
|
twoFactorActivated: false,
|
||||||
|
|
|
||||||
|
|
@ -1598,7 +1598,7 @@ async function sendNotify(text, desp, params = {}) {
|
||||||
iGotNotify(text, desp, params), // iGot
|
iGotNotify(text, desp, params), // iGot
|
||||||
gobotNotify(text, desp), // go-cqhttp
|
gobotNotify(text, desp), // go-cqhttp
|
||||||
gotifyNotify(text, desp), // gotify
|
gotifyNotify(text, desp), // gotify
|
||||||
chatNotify(text, desp), // synolog chat
|
chatNotify(text, desp), // synology chat
|
||||||
pushDeerNotify(text, desp), // PushDeer
|
pushDeerNotify(text, desp), // PushDeer
|
||||||
aibotkNotify(text, desp), // 智能微秘书
|
aibotkNotify(text, desp), // 智能微秘书
|
||||||
fsBotNotify(text, desp), // 飞书机器人
|
fsBotNotify(text, desp), // 飞书机器人
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,10 @@ const Terminal = ({
|
||||||
const lastLineRef = useRef<null | HTMLElement>(null);
|
const lastLineRef = useRef<null | HTMLElement>(null);
|
||||||
|
|
||||||
// An effect that handles scrolling into view the last line of terminal input or output
|
// An effect that handles scrolling into view the last line of terminal input or output
|
||||||
const performScrolldown = useRef(false);
|
const performScrollDown = useRef(false);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (performScrolldown.current) {
|
if (performScrollDown.current) {
|
||||||
// skip scrolldown when the component first loads
|
// skip scrollDown when the component first loads
|
||||||
setTimeout(
|
setTimeout(
|
||||||
() =>
|
() =>
|
||||||
lastLineRef?.current?.scrollIntoView({
|
lastLineRef?.current?.scrollIntoView({
|
||||||
|
|
@ -42,7 +42,7 @@ const Terminal = ({
|
||||||
500,
|
500,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
performScrolldown.current = true;
|
performScrollDown.current = true;
|
||||||
}, [lineData.length]);
|
}, [lineData.length]);
|
||||||
|
|
||||||
const renderedLineData = lineData.map((ld, i) => {
|
const renderedLineData = lineData.map((ld, i) => {
|
||||||
|
|
|
||||||
|
|
@ -357,8 +357,8 @@
|
||||||
"BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)": "BARK push icon, custom push icon (requires iOS 15 or above to display)",
|
"BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)": "BARK push icon, custom push icon (requires iOS 15 or above to display)",
|
||||||
"BARK推送铃声,铃声列表去APP查看复制填写": "BARK push ringtone, check and copy from the APP's ringtone list",
|
"BARK推送铃声,铃声列表去APP查看复制填写": "BARK push ringtone, check and copy from the APP's ringtone list",
|
||||||
"BARK推送消息的分组,默认为qinglong": "BARK push message grouping, default is qinglong",
|
"BARK推送消息的分组,默认为qinglong": "BARK push message grouping, default is qinglong",
|
||||||
"BARK推送消息的时效性,默认为active": "BARK push message redirecting URL",
|
"BARK推送消息的时效性,默认为active": "BARK push message timeliness, default is active",
|
||||||
"BARK推送消息的跳转URL": "BARK push message grouping, default is qinglong",
|
"BARK推送消息的跳转URL": "BARK push message redirecting URL",
|
||||||
"BARK是否保存推送消息": "Does BARK save push messages",
|
"BARK是否保存推送消息": "Does BARK save push messages",
|
||||||
"telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw": "Telegram Bot token, e.g., 1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw",
|
"telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw": "Telegram Bot token, e.g., 1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw",
|
||||||
"telegram用户的id,例如:129xxx206": "Telegram user ID, e.g., 129xxx206",
|
"telegram用户的id,例如:129xxx206": "Telegram user ID, e.g., 129xxx206",
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ const Login = () => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const completeTowFactor = (values: any) => {
|
const completeTwoFactor = (values: any) => {
|
||||||
setVerifying(true);
|
setVerifying(true);
|
||||||
request
|
request
|
||||||
.put(`${config.apiPrefix}user/two-factor/login`, {
|
.put(`${config.apiPrefix}user/two-factor/login`, {
|
||||||
|
|
@ -129,7 +129,7 @@ const Login = () => {
|
||||||
const { value } = e.target as any;
|
const { value } = e.target as any;
|
||||||
const regx = /^[0-9]{6}$/;
|
const regx = /^[0-9]{6}$/;
|
||||||
if (regx.test(value)) {
|
if (regx.test(value)) {
|
||||||
completeTowFactor({ code: value });
|
completeTwoFactor({ code: value });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -156,7 +156,7 @@ const Login = () => {
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.main}>
|
<div className={styles.main}>
|
||||||
{twoFactor ? (
|
{twoFactor ? (
|
||||||
<Form layout="vertical" onFinish={completeTowFactor}>
|
<Form layout="vertical" onFinish={completeTwoFactor}>
|
||||||
<FormItem
|
<FormItem
|
||||||
name="code"
|
name="code"
|
||||||
label={intl.get('验证码')}
|
label={intl.get('验证码')}
|
||||||
|
|
|
||||||
|
|
@ -37,18 +37,18 @@ const SecuritySettings = ({ user, userChange }: any) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const activeOrDeactiveTwoFactor = () => {
|
const activeOrDeactivateTwoFactor = () => {
|
||||||
if (twoFactorActivated) {
|
if (twoFactorActivated) {
|
||||||
deactiveTowFactor();
|
deactivateTwoFactor();
|
||||||
} else {
|
} else {
|
||||||
getTwoFactorInfo();
|
getTwoFactorInfo();
|
||||||
setTwoFactoring(true);
|
setTwoFactoring(true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const deactiveTowFactor = () => {
|
const deactivateTwoFactor = () => {
|
||||||
request
|
request
|
||||||
.put(`${config.apiPrefix}user/two-factor/deactive`)
|
.put(`${config.apiPrefix}user/two-factor/deactivate`)
|
||||||
.then(({ code, data }) => {
|
.then(({ code, data }) => {
|
||||||
if (code === 200 && data) {
|
if (code === 200 && data) {
|
||||||
setTwoFactorActivated(false);
|
setTwoFactorActivated(false);
|
||||||
|
|
@ -60,7 +60,7 @@ const SecuritySettings = ({ user, userChange }: any) => {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const completeTowFactor = () => {
|
const completeTwoFactor = () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
request
|
request
|
||||||
.put(`${config.apiPrefix}user/two-factor/active`, { code })
|
.put(`${config.apiPrefix}user/two-factor/active`, { code })
|
||||||
|
|
@ -162,7 +162,7 @@ const SecuritySettings = ({ user, userChange }: any) => {
|
||||||
onChange={(e) => setCode(e.target.value)}
|
onChange={(e) => setCode(e.target.value)}
|
||||||
placeholder="123456"
|
placeholder="123456"
|
||||||
/>
|
/>
|
||||||
<Button type="primary" loading={loading} onClick={completeTowFactor}>
|
<Button type="primary" loading={loading} onClick={completeTwoFactor}>
|
||||||
{intl.get('完成设置')}
|
{intl.get('完成设置')}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export default {
|
||||||
|
|
||||||
/* I18n configuration, `languages` and `defaultLanguage` are required currently. */
|
/* I18n configuration, `languages` and `defaultLanguage` are required currently. */
|
||||||
i18n: {
|
i18n: {
|
||||||
/* Countrys flags: https://www.flaticon.com/packs/countrys-flags */
|
/* Countries flags: https://www.flaticon.com/packs/countries-flags */
|
||||||
languages: [
|
languages: [
|
||||||
{
|
{
|
||||||
key: 'pt-br',
|
key: 'pt-br',
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ export default function browserType() {
|
||||||
/**
|
/**
|
||||||
* 获取第一个表格的可视化高度
|
* 获取第一个表格的可视化高度
|
||||||
* @param {*} extraHeight 额外的高度(表格底部的内容高度 Number类型,默认为74)
|
* @param {*} extraHeight 额外的高度(表格底部的内容高度 Number类型,默认为74)
|
||||||
* @param {*} id 当前页面中有多个table时需要制定table的id
|
* @param {*} id 当前页面中有多个table时需要指定table的id
|
||||||
*/
|
*/
|
||||||
export function getTableScroll({
|
export function getTableScroll({
|
||||||
extraHeight,
|
extraHeight,
|
||||||
|
|
@ -208,7 +208,7 @@ export function getTableScroll({
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自动触发点击事件
|
// 自动触发点击事件
|
||||||
function automaticClick(elment: HTMLElement) {
|
function automaticClick(element: HTMLElement) {
|
||||||
const ev = document.createEvent('MouseEvents');
|
const ev = document.createEvent('MouseEvents');
|
||||||
ev.initMouseEvent(
|
ev.initMouseEvent(
|
||||||
'click',
|
'click',
|
||||||
|
|
@ -227,7 +227,7 @@ function automaticClick(elment: HTMLElement) {
|
||||||
0,
|
0,
|
||||||
null,
|
null,
|
||||||
);
|
);
|
||||||
elment.dispatchEvent(ev);
|
element.dispatchEvent(ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导出文件
|
// 导出文件
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user