From f2061c17ab3001257c379f5540437e3ee49a2f2c Mon Sep 17 00:00:00 2001 From: Alma Date: Wed, 9 Apr 2025 19:42:35 +0200 Subject: [PATCH] update iframe page message missionboard mail showcase --- .env | 3 ++- app/email/page.tsx | 14 +------------- app/missions-board/page.tsx | 24 +++++++++++++++++++++++- app/showcase/page.tsx | 13 +++++++++++-- app/the-message/page.tsx | 23 +++++++++++++++++++++++ 5 files changed, 60 insertions(+), 17 deletions(-) create mode 100644 app/the-message/page.tsx diff --git a/.env b/.env index 90fb50b6..9a283440 100644 --- a/.env +++ b/.env @@ -11,7 +11,7 @@ NEXTCLOUD_URL=https://espace.slm-lab.net DATABASE_URL="postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:5432/${POSTGRES_DB}?schema=public" - Sidebar iframes +# Sidebar iframes NEXT_PUBLIC_IFRAME_DIARY_URL=https://espace.slm-lab.net/apps/diary NEXT_PUBLIC_IFRAME_MAIL_URL=https://mail.slm-lab.net NEXT_PUBLIC_IFRAME_DRIVE_URL=https://espace.slm-lab.net/apps/files @@ -24,6 +24,7 @@ NEXT_PUBLIC_IFRAME_ARTLAB_URL=https://artlab.slm-lab.net NEXT_PUBLIC_IFRAME_GITE_URL=https://gite.slm-lab.net/user/oauth2/cube NEXT_PUBLIC_IFRAME_CALCULATION_URL=https://calcul.slm-lab.net NEXT_PUBLIC_IFRAME_MEDIATIONS_URL=https://connect.slm-lab.net/realms/cercle/protocol/openid-connect/auth?client_id=mediations.slm-lab.net&redirect_uri=https%3A%2F%2Fmediations.slm-lab.net%2F%3Fopenid_mode%3Dtrue&scope=openid%20profile%20email&response_type=code +NEXT_PUBLIC_IFRAME_SHOWCASE_URL=https://page.slm-lab.net # Navigation bar iframes NEXT_PUBLIC_IFRAME_CONFERENCE_URL=https://vision.slm-lab.net diff --git a/app/email/page.tsx b/app/email/page.tsx index 0857a6cc..27daeca8 100644 --- a/app/email/page.tsx +++ b/app/email/page.tsx @@ -10,24 +10,12 @@ export default async function Page() { redirect("/signin"); } - const mailUrl = process.env.NEXT_PUBLIC_IFRAME_MAIL_URL; - if (!mailUrl) { - console.warn("NEXT_PUBLIC_IFRAME_MAIL_URL is not defined in environment variables"); - } - return (
diff --git a/app/missions-board/page.tsx b/app/missions-board/page.tsx index 0519ecba..df3196dc 100644 --- a/app/missions-board/page.tsx +++ b/app/missions-board/page.tsx @@ -1 +1,23 @@ - \ No newline at end of file +import { getServerSession } from "next-auth/next"; +import { authOptions } from "@/app/api/auth/[...nextauth]/route"; +import { redirect } from "next/navigation"; +import { ResponsiveIframe } from "@/app/components/responsive-iframe"; + +export default async function Page() { + const session = await getServerSession(authOptions); + + if (!session) { + redirect("/signin"); + } + + return ( +
+
+ +
+
+ ); +} \ No newline at end of file diff --git a/app/showcase/page.tsx b/app/showcase/page.tsx index 9a8137af..3074d876 100644 --- a/app/showcase/page.tsx +++ b/app/showcase/page.tsx @@ -1,7 +1,7 @@ import { getServerSession } from "next-auth/next"; import { authOptions } from "@/app/api/auth/[...nextauth]/route"; import { redirect } from "next/navigation"; -import { ShowCaseFrame } from "@/components/showcase/showcase-frame"; +import { ResponsiveIframe } from "@/app/components/responsive-iframe"; export default async function Page() { const session = await getServerSession(authOptions); @@ -10,5 +10,14 @@ export default async function Page() { redirect("/signin"); } - return ; + return ( +
+
+ +
+
+ ); } \ No newline at end of file diff --git a/app/the-message/page.tsx b/app/the-message/page.tsx new file mode 100644 index 00000000..daa667c5 --- /dev/null +++ b/app/the-message/page.tsx @@ -0,0 +1,23 @@ +import { getServerSession } from "next-auth/next"; +import { authOptions } from "@/app/api/auth/[...nextauth]/route"; +import { redirect } from "next/navigation"; +import { ResponsiveIframe } from "@/app/components/responsive-iframe"; + +export default async function Page() { + const session = await getServerSession(authOptions); + + if (!session) { + redirect("/signin"); + } + + return ( +
+
+ +
+
+ ); +} \ No newline at end of file