From d51b9bfc255c2ce80c56f3d0adaa76e64751b086 Mon Sep 17 00:00:00 2001 From: incognitotgt Date: Wed, 27 Dec 2023 13:39:06 -0500 Subject: [PATCH] Added Eruda support for iframe view. ts-ignore is since typescript can't tell the iframe is not in the same file as IframeHeader.tsx --- src/components/iframe/IframeHeader.tsx | 30 +++++++++++++++++++++++++- src/pages/ProxyFrame.tsx | 1 + 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/components/iframe/IframeHeader.tsx b/src/components/iframe/IframeHeader.tsx index 8493793..c9bddfa 100644 --- a/src/components/iframe/IframeHeader.tsx +++ b/src/components/iframe/IframeHeader.tsx @@ -2,12 +2,13 @@ import { useState } from "preact/hooks"; import { useTranslation } from "react-i18next"; import { Link } from "preact-router"; import { RiPictureInPictureExitFill, RiFullscreenFill } from "react-icons/ri"; +import { IoCodeSlashSharp } from "react-icons/io5"; import { FaXmark } from "react-icons/fa6"; - export function IframeHeader(props: { url: string }) { const { t } = useTranslation(); const [showPopout, setShowPopout] = useState(false); const [showFullScreen, setFullScreen] = useState(false); + if (showPopout) { window.location.replace(props.url); } @@ -34,6 +35,33 @@ export function IframeHeader(props: { url: string }) {