style: 修复主分支现存的 ESLint 错误 (#2046)

- 修复 7 个文件中全部 21 个 ESLint 错误(缩进、注释空格、引号、函数括号空格、三元表达式换行、JSX 缩进)
- dashboard/config/index.tsx 中写在 JSX children 里的 // 注释会被当作文本节点渲染到 WebUI 配置页,改为 JSX 注释
- 验证:npx eslint . 退出码 0;pnpm run typecheck 全部包通过
This commit is contained in:
Shxiao authored and GitHub committed 2026-09-08 18:18:46 +08:00
1 parent eecb02140f
commit 96de2314b0
4 files changed
+10 -6

No files matched your search

@@ -249,7 +249,7 @@ export class PluginLoader {
if (hit) {
return `sensitive keyword "${hit}"`;
}
return "not in official plugin whitelist";
return 'not in official plugin whitelist';
}
/**
@@ -102,7 +102,7 @@ export default function ConfigPage () {
<LoginConfigCard />
</ConfigPageItem>
</Tab>
//把修改密码移动到WebUI栏目中
{/* 把修改密码移动到WebUI栏目中 */}
{
/*
<Tab title='修改密码' key='token'>
@@ -457,7 +457,8 @@ const WebUIConfigCard = () => {
</span>
</div>
{twoFAStatus.enable2FA ? (
{twoFAStatus.enable2FA
? (
<div className='bg-green-50 border border-green-200 rounded-lg p-4'>
<div className='text-sm text-green-700 mb-3'>✅ 双因素认证已启用</div>
<div className='mb-3'>
@@ -484,7 +485,8 @@ const WebUIConfigCard = () => {
禁用双因素认证
</Button>
</div>
) : (
)
: (
<>
<div className='text-sm text-default-400 mb-2'>
启用双因素认证后,登录时需要额外输入Authenticator应用生成的验证码
@@ -238,7 +238,8 @@ export default function WebLoginPage () {
)}
{/* 2FA验证步骤 */}
{require2FA ? (
{require2FA
? (
<>
<Button
isIconOnly
@@ -307,7 +308,8 @@ export default function WebLoginPage () {
验证
</Button>
</>
) : (
)
: (
<>
<form
onSubmit={(e) => {