MCPcopy Create free account
hub / github.com/wavetermdev/waveterm / WebViewPreviewFallback

Function WebViewPreviewFallback

frontend/app/view/webview/webview.tsx:828–842  ·  view source on GitHub ↗
({ url }: { url?: string | null })

Source from the content-addressed store, hash-verified

826}
827
828function WebViewPreviewFallback({ url }: { url?: string | null }) {
829 const displayUrl = getWebPreviewDisplayUrl(url);
830
831 return (
832 <div className="flex h-full w-full items-center justify-center bg-panel">
833 <div className="mx-6 flex max-w-[720px] flex-col gap-3 rounded-lg border border-dashed border-border bg-background px-6 py-5 shadow-sm">
834 <div className="text-xs font-mono text-muted">preview mock · electron webview unavailable</div>
835 <div className="text-sm text-foreground">web widget placeholder</div>
836 <div className="rounded-md border border-border bg-panel px-3 py-2 font-mono text-xs text-foreground break-all">
837 {displayUrl}
838 </div>
839 </div>
840 </div>
841 );
842}
843
844const WebView = memo(({ model, onFailLoad, blockRef, initialSrc }: WebViewProps) => {
845 const env = useWaveEnv<WebViewEnv>();

Callers

nothing calls this directly

Calls 1

getWebPreviewDisplayUrlFunction · 0.85

Tested by

no test coverage detected