Apply formatting and minor style fixes across repo

Normalize code style across multiple packages: whitespace cleanup, consistent commas and trailing commas in arrays/enums/objects, fix table markdown lines in CI comment template, ensure newline at EOF, normalize header/object property quoting and spacing, remove stray blank lines and minor non-functional comment tweaks. These are formatting-only changes and small type/annotation spacing adjustments; no functional behavior changes intended.
This commit is contained in:
手瓜一十雪 committed 2026-03-05 18:45:50 +08:00
1 parent d2d0b258bc
commit 974528fe7e
186 files changed
+1367 -1233

No files matched your search

@@ -35,7 +35,6 @@ const handleImportConfig = async (event: React.ChangeEvent<HTMLInputElement>) =>
} else {
toast.error(`配置导入失败: ${result.data?.message || '未知错误'}`);
}
} catch (error) {
const msg = (error as Error).message;
toast.error(`导入配置失败: ${msg}`);
@@ -88,26 +87,26 @@ const BackupConfigCard: React.FC = () => {
<div className='flex flex-wrap gap-3'>
<Button
isIconOnly
className="bg-primary hover:bg-primary/90 text-white"
className='bg-primary hover:bg-primary/90 text-white'
radius='full'
onPress={handleExportConfig}
title="导出配置"
title='导出配置'
>
<LuDownload size={20} />
</Button>
<label className="cursor-pointer">
<label className='cursor-pointer'>
<input
type="file"
accept=".zip"
type='file'
accept='.zip'
onChange={handleImportConfig}
className="hidden"
className='hidden'
/>
<Button
isIconOnly
className="bg-primary hover:bg-primary/90 text-white"
className='bg-primary hover:bg-primary/90 text-white'
radius='full'
as="span"
title="导入配置"
as='span'
title='导入配置'
>
<LuUpload size={20} />
</Button>
@@ -126,4 +125,4 @@ const BackupConfigCard: React.FC = () => {
);
};
export default BackupConfigCard;
export default BackupConfigCard;
@@ -18,7 +18,6 @@ interface BypassFormData {
o3HookMode: boolean;
}
const BypassConfigCard = () => {
const [loading, setLoading] = useState(true);
const {
@@ -38,7 +38,8 @@ const ConfigPageItem: React.FC<ConfigPageProps> = ({
'max-w-3xl': size === 'md',
'max-w-6xl': size === 'lg',
}
)}>
)}
>
<CardBody className='py-6 px-4 md:py-8 md:px-12'>
<div className='w-full flex flex-col gap-5'>
{children}
@@ -273,7 +273,7 @@ const ServerConfigCard = () => {
<textarea
value={ipListText}
onChange={(e) => setIpListText(e.target.value)}
placeholder={`每行一个IP地址或规则\n支持格式:\nIPv4:\n- 精确IP: 192.168.1.100\n- 通配符: 192.168.1.*\n- CIDR: 192.168.1.0/24\nIPv6:\n- 精确IP: 2001:db8::1\n- CIDR: 2001:db8::/32`}
placeholder={'每行一个IP地址或规则\n支持格式:\nIPv4:\n- 精确IP: 192.168.1.100\n- 通配符: 192.168.1.*\n- CIDR: 192.168.1.0/24\nIPv6:\n- 精确IP: 2001:db8::1\n- CIDR: 2001:db8::/32'}
disabled={!!configError}
rows={10}
className='w-full px-3 py-2 bg-default-100/50 dark:bg-white/5 backdrop-blur-md border border-transparent hover:bg-default-200/50 dark:hover:bg-white/10 transition-all shadow-sm hover:border-default-300 rounded-lg text-default-700 dark:text-default-300 placeholder:text-default-400 font-mono text-sm resize-y focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent disabled:opacity-50 disabled:cursor-not-allowed'
@@ -348,7 +348,7 @@ const ThemeConfigCard = () => {
>
保存应用
</Button>
<div className='w-px h-6 bg-divider mx-1 hidden sm:block'></div>
<div className='w-px h-6 bg-divider mx-1 hidden sm:block' />
<Button
size='sm'
isIconOnly
@@ -364,22 +364,22 @@ const ThemeConfigCard = () => {
<div className='px-4 pt-0 pb-4 w-full h-full'>
<Tabs
aria-label="Theme Config Options"
color="primary"
variant="underlined"
aria-label='Theme Config Options'
color='primary'
variant='underlined'
disableAnimation
classNames={{
tabList: "gap-8 w-full relative rounded-none p-0 border-b border-divider overflow-x-auto no-scrollbar",
cursor: "w-full bg-primary h-[3px] -bottom-[1.5px]",
tab: "max-w-fit px-0 h-12 hover:opacity-100 opacity-70 data-[selected=true]:opacity-100",
tabContent: "font-semibold py-2",
panel: "py-4"
tabList: 'gap-8 w-full relative rounded-none p-0 border-b border-divider overflow-x-auto no-scrollbar',
cursor: 'w-full bg-primary h-[3px] -bottom-[1.5px]',
tab: 'max-w-fit px-0 h-12 hover:opacity-100 opacity-70 data-[selected=true]:opacity-100',
tabContent: 'font-semibold py-2',
panel: 'py-4',
}}
>
<Tab
key="font"
key='font'
title={
<div className="flex items-center space-x-2">
<div className='flex items-center space-x-2'>
<FaFont />
<span>字体设置</span>
</div>
@@ -463,9 +463,9 @@ const ThemeConfigCard = () => {
</Tab>
<Tab
key="theme"
key='theme'
title={
<div className="flex items-center space-x-2">
<div className='flex items-center space-x-2'>
<IoIosColorPalette size={18} />
<span>选择主题</span>
</div>
@@ -486,9 +486,9 @@ const ThemeConfigCard = () => {
</Tab>
<Tab
key="custom-color"
key='custom-color'
title={
<div className="flex items-center space-x-2">
<div className='flex items-center space-x-2'>
<FaPaintbrush />
<span>自定义配色</span>
</div>
@@ -499,7 +499,7 @@ const ThemeConfigCard = () => {
<Card key={mode} className={clsx('border shadow-sm', mode === 'dark' ? 'bg-[#18181b] border-zinc-800' : 'bg-white border-zinc-200')}>
<CardHeader className='pb-0 pt-4 px-4 flex-col items-start'>
<div className='flex items-center gap-2 mb-1'>
{mode === 'dark' ? <MdDarkMode className="text-zinc-400" size={20} /> : <MdLightMode className="text-orange-400" size={20} />}
{mode === 'dark' ? <MdDarkMode className='text-zinc-400' size={20} /> : <MdLightMode className='text-orange-400' size={20} />}
<h4 className={clsx('font-bold text-large', mode === 'dark' ? 'text-white' : 'text-black')}>
{mode === 'dark' ? '深色模式' : '浅色模式'}
</h4>
@@ -153,7 +153,7 @@ const WebUIConfigCard = () => {
challenge: base64UrlToUint8Array(registrationOptions.challenge) as BufferSource,
rp: {
name: registrationOptions.rp.name,
id: registrationOptions.rp.id
id: registrationOptions.rp.id,
},
user: {
id: base64UrlToUint8Array(registrationOptions.user.id) as BufferSource,