diff --git a/docs/changelog/index.md b/docs/changelog/index.md index ebbe7db6..d17c9e8d 100644 --- a/docs/changelog/index.md +++ b/docs/changelog/index.md @@ -34,6 +34,8 @@ sidebar: false ### 改进 - 响应页面统一:将源站错误页与 Service Worker 离线兜底联系页整合至统一的「响应页面」(`/responses`)标签页中,移除原 `/error-pages` 独立路由。 +- 响应页面 Tab 状态 URL 同步:响应页面(`/responses`)的 Tab 状态增加 URL 查询参数 `tab` 支持,刷新页面时自动保持当前选中的标签页。 +- 响应页面编辑与真实预览独立路由:为「源站错误页」与「离线联系页」提供独立的 `/responses/error-page/edit`、`/responses/error-page/preview`、`/responses/contact/edit` 及 `/responses/contact/preview` 路由入口,恢复默认展示网页预览图、点击编辑进入包含预制模板与代码编辑器的独立编辑页逻辑。 ## [v3.4.5] - 2026-08-08 diff --git a/frontend/app/(main)/responses/components/contact-page-tab.tsx b/frontend/app/(main)/responses/components/contact-page-tab.tsx index 84e67fb8..ec24e2a0 100644 --- a/frontend/app/(main)/responses/components/contact-page-tab.tsx +++ b/frontend/app/(main)/responses/components/contact-page-tab.tsx @@ -1,8 +1,9 @@ 'use client'; +import Link from 'next/link'; import { useEffect, useState } from 'react'; import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'; -import { Loader2, Plus, Save, X } from 'lucide-react'; +import { Expand, Loader2, Pencil, Plus, Save, X } from 'lucide-react'; import { toast } from 'sonner'; import { Badge } from '@/components/ui/badge'; @@ -16,13 +17,11 @@ import { } from '@/components/ui/card'; import { Label } from '@/components/ui/label'; import { Switch } from '@/components/ui/switch'; -import { HtmlEditorWorkspace } from '@/components/common/html-editor-workspace'; import { OptionService, ZoneService, zoneQueryKey, } from '@/lib/services/openflare'; -import { cn } from '@/lib/utils'; import { ScopeDomainDialog } from './scope-domain-dialog'; import { @@ -180,22 +179,35 @@ export function ContactPageTab({ - - - 联系页 HTML - 留空则使用内置默认模板。 + + +
+ 页面预览 +
+
+ + +
- - setFields((prev) => ({ ...prev, html: v }))} - preview={(html) => html} - footerHint={null} - showPreviewLink={false} - previewTitle='离线联系页实时预览' - /> + +
+