({ url }: { url?: string | null })
| 826 | } |
| 827 | |
| 828 | function 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 | |
| 844 | const WebView = memo(({ model, onFailLoad, blockRef, initialSrc }: WebViewProps) => { |
| 845 | const env = useWaveEnv<WebViewEnv>(); |
nothing calls this directly
no test coverage detected