update iframe rules
This commit is contained in:
parent
7f71d422a6
commit
cea6930ddf
@ -1,6 +1,7 @@
|
|||||||
import { getServerSession } from "next-auth/next";
|
import { getServerSession } from "next-auth/next";
|
||||||
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
|
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
import { ResponsiveIframe } from "@/app/components/responsive-iframe";
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const session = await getServerSession(authOptions);
|
const session = await getServerSession(authOptions);
|
||||||
@ -11,12 +12,10 @@ export default async function Page() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="w-full h-screen bg-black">
|
<main className="w-full h-screen bg-black">
|
||||||
<div className="w-full h-full pt-16">
|
<div className="w-full h-full px-4 pt-12 pb-4">
|
||||||
<iframe
|
<ResponsiveIframe
|
||||||
src="https://gite.slm-lab.net/user/oauth2/cube"
|
src={process.env.NEXT_PUBLIC_IFRAME_CHAPTER_URL || ''}
|
||||||
className="w-full h-full border-none"
|
|
||||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
allowFullScreen
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
@ -14,7 +14,7 @@ export default async function Page() {
|
|||||||
<main className="w-full h-screen bg-black">
|
<main className="w-full h-screen bg-black">
|
||||||
<div className="w-full h-full px-4 pt-12 pb-4">
|
<div className="w-full h-full px-4 pt-12 pb-4">
|
||||||
<ResponsiveIframe
|
<ResponsiveIframe
|
||||||
src={process.env.NEXT_PUBLIC_IFRAME_FLOW_URL || ''}
|
src={process.env.NEXT_PUBLIC_IFRAME_AGILITY_URL || ''}
|
||||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
import { getServerSession } from "next-auth/next";
|
|
||||||
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
|
|
||||||
import { redirect } from "next/navigation";
|
|
||||||
import { MissionsFrame } from "@/components/missions/missions-frame";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
const session = await getServerSession(authOptions);
|
|
||||||
|
|
||||||
if (!session) {
|
|
||||||
redirect("/signin");
|
|
||||||
}
|
|
||||||
|
|
||||||
return <MissionsFrame />;
|
|
||||||
}
|
|
||||||
@ -1,14 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
export function GitLabFrame() {
|
|
||||||
return (
|
|
||||||
<div className="w-full h-[calc(100vh-8rem)]">
|
|
||||||
<iframe
|
|
||||||
src="https://gite.slm-lab.net/user/oauth2/cube"
|
|
||||||
className="w-full h-full border-none"
|
|
||||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
|
||||||
allowFullScreen
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -109,7 +109,7 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
|
|||||||
{
|
{
|
||||||
title: "Chapter",
|
title: "Chapter",
|
||||||
icon: FileText,
|
icon: FileText,
|
||||||
href: "/missions",
|
href: "/chapter",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_CHAPTER_URL,
|
iframe: process.env.NEXT_PUBLIC_IFRAME_CHAPTER_URL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -132,7 +132,7 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
|
|||||||
{
|
{
|
||||||
title: "Gite",
|
title: "Gite",
|
||||||
icon: GitFork,
|
icon: GitFork,
|
||||||
href: "/gitlab",
|
href: "/gite",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_GITE_URL,
|
iframe: process.env.NEXT_PUBLIC_IFRAME_GITE_URL,
|
||||||
requiredRole: "Coding",
|
requiredRole: "Coding",
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user