mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 15:06:36 +08:00
fix(openflare): improve SWOfflineDomains validation and snapshot diff logic
This commit is contained in:
@@ -194,6 +194,7 @@ export function ContactPageTab({
|
||||
preview={(html) => html}
|
||||
footerHint={null}
|
||||
showPreviewLink={false}
|
||||
previewTitle='离线联系页实时预览'
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -42,9 +42,7 @@ export function ErrorPageTab({
|
||||
optionMap: Record<string, string>;
|
||||
}) {
|
||||
const queryClient = useQueryClient();
|
||||
const [fields, setFields] = useState<ErrorPageFields>(
|
||||
defaultErrorPageFields,
|
||||
);
|
||||
const [fields, setFields] = useState<ErrorPageFields>(defaultErrorPageFields);
|
||||
const [tagError, setTagError] = useState<string | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -21,6 +21,7 @@ type HtmlEditorWorkspaceProps = {
|
||||
preview?: (html: string) => string;
|
||||
footerHint?: React.ReactNode;
|
||||
showPreviewLink?: boolean;
|
||||
previewTitle?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -38,6 +39,7 @@ export function HtmlEditorWorkspace({
|
||||
</>
|
||||
),
|
||||
showPreviewLink = true,
|
||||
previewTitle = '源站错误页实时预览',
|
||||
}: HtmlEditorWorkspaceProps) {
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const [editorWidthPercent, setEditorWidthPercent] = useState(48);
|
||||
@@ -145,7 +147,7 @@ export function HtmlEditorWorkspace({
|
||||
</div>
|
||||
<div className='flex-1 min-h-0 overflow-hidden bg-background'>
|
||||
<iframe
|
||||
title='源站错误页实时预览'
|
||||
title={previewTitle}
|
||||
sandbox=''
|
||||
srcDoc={previewSrcDoc}
|
||||
className='h-full w-full border-0 bg-background'
|
||||
|
||||
Reference in New Issue
Block a user