chore: upgrade dependence

This commit is contained in:
ryan
2026-08-06 17:41:06 +08:00
parent 16f34928c9
commit d17d8457f3
20 changed files with 3538 additions and 3306 deletions
@@ -244,8 +244,12 @@ function PieDistributionCard({
}
/>
<ChartLegend
content={<ChartLegendContent nameKey='name' />}
className='flex-wrap justify-center gap-x-4 gap-y-1 pt-2 text-[11px]'
content={
<ChartLegendContent
nameKey='name'
className='flex-wrap justify-center gap-x-4 gap-y-1 pt-2 text-[11px]'
/>
}
/>
</PieChart>
</ChartContainer>
@@ -484,8 +484,12 @@ export function FileStats() {
}
/>
<ChartLegend
content={<ChartLegendContent nameKey='name' />}
className='flex-wrap justify-center gap-x-4 gap-y-1 text-[11px] pt-4'
content={
<ChartLegendContent
nameKey='name'
className='flex-wrap justify-center gap-x-4 gap-y-1 text-[11px] pt-4'
/>
}
/>
</PieChart>
</ChartContainer>
@@ -577,8 +581,12 @@ export function FileStats() {
}
/>
<ChartLegend
content={<ChartLegendContent nameKey='name' />}
className='flex-wrap justify-center gap-x-4 gap-y-1 text-[11px] pt-4'
content={
<ChartLegendContent
nameKey='name'
className='flex-wrap justify-center gap-x-4 gap-y-1 text-[11px] pt-4'
/>
}
/>
</PieChart>
</ChartContainer>
@@ -72,7 +72,9 @@ export function HtmlEditorWorkspace({
{value.trim() === '' ? ' · 空则使用内置默认' : ''}
</span>
</div>
<div className='flex items-center gap-1.5 flex-wrap'>{toolbarRight}</div>
<div className='flex items-center gap-1.5 flex-wrap'>
{toolbarRight}
</div>
</div>
<div className='flex flex-1 min-h-0 overflow-hidden'>
@@ -113,9 +113,7 @@ export default function ErrorPageEditPage() {
<div className='flex items-center gap-2'>
<FileCode2 className='size-5 text-primary' />
<div>
<h1 className='text-2xl font-semibold tracking-tight'>
编辑
</h1>
<h1 className='text-2xl font-semibold tracking-tight'>编辑</h1>
</div>
</div>
</div>
+4 -10
View File
@@ -3,13 +3,7 @@
import Link from 'next/link';
import { useEffect, useMemo, useState } from 'react';
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
import {
Expand,
FileWarning,
Loader2,
Pencil,
Save,
} from 'lucide-react';
import { Expand, FileWarning, Loader2, Pencil, Save } from 'lucide-react';
import { toast } from 'sonner';
import { useAuth } from '@/components/providers/auth-provider';
@@ -135,8 +129,8 @@ export default function ErrorPagesPage() {
<div className='space-y-1.5'>
<CardTitle className='text-base'>触发状态码</CardTitle>
<CardDescription>
支持单码(如 502)或闭区间(如 500-599),范围
400–599。默认 500-599。修改启用开关或状态码后需点击保存。
支持单码(如 502)或闭区间(如 500-599),范围 400–599。默认
500-599。修改启用开关或状态码后需点击保存。
</CardDescription>
</div>
<Button
@@ -170,7 +164,7 @@ export default function ErrorPagesPage() {
/>
{tagError ? (
<p className='text-xs text-destructive'>{tagError}</p>
) : (null)}
) : null}
</CardContent>
</Card>
@@ -34,10 +34,7 @@ export default function ErrorPagePreviewPage() {
return mapOptionsToFields(optionsToMap(optionsQuery.data)).html;
}, [optionsQuery.data]);
const previewSrcDoc = useMemo(
() => previewOriginErrorPageHTML(html),
[html],
);
const previewSrcDoc = useMemo(() => previewOriginErrorPageHTML(html), [html]);
return (
<ErrorPageGate optionsQuery={optionsQuery}>
@@ -59,7 +59,9 @@ it('restores declined Back and Forward transitions by indexed delta', async () =
);
});
expect(go).toHaveBeenLastCalledWith(1);
expect(await screen.findByText('存在未保存的更改,确定离开吗?')).toBeTruthy();
expect(
await screen.findByText('存在未保存的更改,确定离开吗?'),
).toBeTruthy();
await user.click(screen.getByRole('button', { name: '取消' }));
act(() => {
@@ -86,7 +88,9 @@ it('prompts and restores the current URL for an unknown unindexed history entry'
);
});
expect(await screen.findByText('存在未保存的更改,确定离开吗?')).toBeTruthy();
expect(
await screen.findByText('存在未保存的更改,确定离开吗?'),
).toBeTruthy();
expect(push).toHaveBeenCalledWith(
expect.objectContaining({ __wafEditorIndex: 4 }),
'',
+15 -2
View File
@@ -1,5 +1,4 @@
import { ImageResponse } from 'next/og';
import { WavesIcon } from 'lucide-react';
export const dynamic = 'force-static';
@@ -22,7 +21,21 @@ export default function Icon() {
borderRadius: '20%',
}}
>
<WavesIcon color='white' size={20} />
{/* lucide-react 1.x 将图标标记为客户端组件,无法在 ImageResponse 服务端渲染,改用内联 SVG */}
<svg
width={20}
height={20}
viewBox='0 0 24 24'
fill='none'
stroke='white'
strokeWidth={2}
strokeLinecap='round'
strokeLinejoin='round'
>
<path d='M2 12q2.5 2 5 0t5 0 5 0 5 0' />
<path d='M2 19q2.5 2 5 0t5 0 5 0 5 0' />
<path d='M2 5q2.5 2 5 0t5 0 5 0 5 0' />
</svg>
</div>,
{
...size,