Add exit button

This commit is contained in:
MotorTruck1221 2023-12-26 14:59:32 -07:00
parent ad67368a45
commit 935f029485
2 changed files with 5 additions and 3 deletions

View file

@ -2,6 +2,7 @@ import { useState } from "preact/hooks";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link } from "preact-router"; import { Link } from "preact-router";
import { RiPictureInPictureExitFill, RiFullscreenFill } from "react-icons/ri"; import { RiPictureInPictureExitFill, RiFullscreenFill } from "react-icons/ri";
import { FaXmark } from "react-icons/fa6";
export function IframeHeader(props: { url: string }) { export function IframeHeader(props: { url: string }) {
const { t } = useTranslation(); const { t } = useTranslation();
@ -41,6 +42,9 @@ export function IframeHeader(props: { url: string }) {
className="duration-0500 h-6 w-6 cursor-pointer text-navbar-text-color transition-all hover:scale-110 hover:brightness-125 active:rotate-90" className="duration-0500 h-6 w-6 cursor-pointer text-navbar-text-color transition-all hover:scale-110 hover:brightness-125 active:rotate-90"
onClick={() => setFullScreen(true)} onClick={() => setFullScreen(true)}
/> />
<Link href="/">
<FaXmark className="duration-0500 h-6 w-6 cursor-pointer text-navbar-text-color transition-all hover:rotate-[360deg] hover:scale-110 hover:brightness-125" />
</Link>
</div> </div>
</div> </div>
</div> </div>

View file

@ -77,9 +77,7 @@ export function ProxyFrame(props: { url: string }) {
<div class="h-screen w-screen bg-primary"> <div class="h-screen w-screen bg-primary">
{proxyMode === "direct" && <h1>Loading {localProxy}...</h1>} {proxyMode === "direct" && <h1>Loading {localProxy}...</h1>}
{proxyMode === "aboutblank" && <h1>Loading {localProxy}...</h1>} {proxyMode === "aboutblank" && <h1>Loading {localProxy}...</h1>}
{proxyMode === "embed" && ( {proxyMode === "embed" && <Iframe url={ProxiedUrl} />}
<Iframe url={ProxiedUrl} normalUrl={decodedUrl} />
)}
</div> </div>
); );
} }