mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-10 17:26:38 +08:00
fix(frontend): optimization
This commit is contained in:
@@ -94,7 +94,7 @@ export function ErrorPageTab({
|
||||
<div className='space-y-1.5'>
|
||||
<CardTitle className='text-base'>触发策略</CardTitle>
|
||||
<CardDescription>
|
||||
配置源站错误页的启用条件与触发状态码。修改后需点击保存。
|
||||
配置源站错误页的启用条件与触发状态码。
|
||||
</CardDescription>
|
||||
</div>
|
||||
<Button
|
||||
@@ -133,8 +133,7 @@ export function ErrorPageTab({
|
||||
<div className='space-y-1'>
|
||||
<Label className='text-sm font-medium'>仅针对 GET 请求</Label>
|
||||
<p className='text-sm text-muted-foreground'>
|
||||
开启后仅对 GET 请求的匹配错误状态码返回自定义错误页;POST/PUT
|
||||
等其它方法直接透传源站响应。
|
||||
开启后仅对 GET 请求的匹配错误状态码返回自定义错误页。
|
||||
</p>
|
||||
</div>
|
||||
<Switch
|
||||
@@ -157,8 +156,7 @@ export function ErrorPageTab({
|
||||
触发状态码
|
||||
</Label>
|
||||
<p className='text-sm text-muted-foreground'>
|
||||
支持单码(如 502)或闭区间(如 500-599),范围 400–599。默认
|
||||
500-599。
|
||||
支持单码(如 502)或闭区间(如 500-599)。
|
||||
</p>
|
||||
</div>
|
||||
<TagsInput
|
||||
@@ -189,7 +187,7 @@ export function ErrorPageTab({
|
||||
<Button variant='outline' size='sm' asChild>
|
||||
<Link href='/responses/error-page/preview'>
|
||||
<Expand className='size-3.5' />
|
||||
真实预览
|
||||
预览
|
||||
</Link>
|
||||
</Button>
|
||||
<Button size='sm' asChild>
|
||||
|
||||
@@ -91,10 +91,10 @@ export function OfflinePageTab({
|
||||
<Card className='border-dashed shadow-none'>
|
||||
<CardHeader className='flex flex-row items-start justify-between gap-4 space-y-0'>
|
||||
<div className='space-y-1.5'>
|
||||
<CardTitle className='text-base'>离线兜底</CardTitle>
|
||||
<CardTitle className='text-base'>离线页</CardTitle>
|
||||
<CardDescription>
|
||||
启用后给启用 HTTPS 的网站下发 Service
|
||||
Worker,域名被墙时浏览器从缓存展示此离线页。
|
||||
Worker,域名无法访问时浏览器从缓存展示此离线页。
|
||||
</CardDescription>
|
||||
</div>
|
||||
<Button
|
||||
@@ -115,10 +115,10 @@ export function OfflinePageTab({
|
||||
<div className='flex items-start justify-between gap-6'>
|
||||
<div className='space-y-1'>
|
||||
<Label className='text-sm font-medium'>
|
||||
启用 Service Worker 离线兜底
|
||||
启用 Service Worker 离线页
|
||||
</Label>
|
||||
<p className='text-sm text-muted-foreground'>
|
||||
仅对 HTTPS 网站生效;未启用的站点不受影响。
|
||||
仅对 HTTPS 网站生效。
|
||||
</p>
|
||||
</div>
|
||||
<Switch
|
||||
@@ -126,7 +126,7 @@ export function OfflinePageTab({
|
||||
onCheckedChange={(enabled) =>
|
||||
setFields((prev) => ({ ...prev, enabled }))
|
||||
}
|
||||
aria-label='启用离线兜底'
|
||||
aria-label='启用离线页'
|
||||
className='mt-0.5 shrink-0'
|
||||
/>
|
||||
</div>
|
||||
@@ -194,7 +194,7 @@ export function OfflinePageTab({
|
||||
<Button variant='outline' size='sm' asChild>
|
||||
<Link href='/responses/offline/preview'>
|
||||
<Expand className='size-3.5' />
|
||||
真实预览
|
||||
预览
|
||||
</Link>
|
||||
</Button>
|
||||
<Button size='sm' asChild>
|
||||
|
||||
Reference in New Issue
Block a user