Compare commits
2 Commits
03e5865856
...
560d69321f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
560d69321f | ||
|
|
b33e07f7cc |
@ -1,13 +1,24 @@
|
|||||||
export default function AIAssistantPage() {
|
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 (
|
return (
|
||||||
<div className="w-full h-[calc(100vh-8rem)]">
|
<main className="w-full h-screen bg-black">
|
||||||
<iframe
|
<div className="w-full h-full px-4 pt-12 pb-4">
|
||||||
src="https://example.com/ai-assistant"
|
<ResponsiveIframe
|
||||||
className="w-full h-full border-none"
|
src={process.env.NEXT_PUBLIC_IFRAME_AI_ASSISTANT_URL || ''}
|
||||||
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>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +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 { ConferenceFrame } from "@/components/conference/conference-frame";
|
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);
|
||||||
@ -10,5 +10,14 @@ export default async function Page() {
|
|||||||
redirect("/signin");
|
redirect("/signin");
|
||||||
}
|
}
|
||||||
|
|
||||||
return <ConferenceFrame />;
|
return (
|
||||||
|
<main className="w-full h-screen bg-black">
|
||||||
|
<div className="w-full h-full px-4 pt-12 pb-4">
|
||||||
|
<ResponsiveIframe
|
||||||
|
src={process.env.NEXT_PUBLIC_IFRAME_CONFERENCE_URL || ''}
|
||||||
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
15
app/page.tsx
15
app/page.tsx
@ -1,5 +1,4 @@
|
|||||||
import { QuoteCard } from "@/components/quote-card";
|
import { QuoteCard } from "@/components/quote-card";
|
||||||
import { Messages } from "@/components/messages";
|
|
||||||
import { Podcast } from "@/components/podcast";
|
import { Podcast } from "@/components/podcast";
|
||||||
import { CalendarWidget } from "@/components/calendar-widget";
|
import { CalendarWidget } from "@/components/calendar-widget";
|
||||||
import { News } from "@/components/news";
|
import { News } from "@/components/news";
|
||||||
@ -11,23 +10,15 @@ export const metadata = {
|
|||||||
|
|
||||||
export default function DashboardPage() {
|
export default function DashboardPage() {
|
||||||
return (
|
return (
|
||||||
<div className="container mx-auto p-6 mt-12">
|
<div className="w-full px-4 pt-12 pb-4">
|
||||||
{/* Empty welcome section with reduced height */}
|
|
||||||
<div className='max-w-4xl mx-auto flex justify-between items-center mb-4'>
|
|
||||||
<div className='h-4'></div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className='grid grid-cols-12 gap-4'>
|
<div className='grid grid-cols-12 gap-4'>
|
||||||
<div className='col-span-3'>
|
<div className='col-span-4'>
|
||||||
<QuoteCard />
|
<QuoteCard />
|
||||||
<div className='mt-4'>
|
<div className='mt-4'>
|
||||||
<News />
|
<News />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='col-span-6'>
|
<div className='col-span-8 space-y-4'>
|
||||||
<Messages />
|
|
||||||
</div>
|
|
||||||
<div className='col-span-3 space-y-4'>
|
|
||||||
<Podcast />
|
<Podcast />
|
||||||
<CalendarWidget />
|
<CalendarWidget />
|
||||||
<Todo />
|
<Todo />
|
||||||
|
|||||||
@ -1,7 +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 { RadioFrame } from "@/components/radio/radio-frame";
|
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);
|
||||||
@ -10,5 +10,14 @@ export default async function Page() {
|
|||||||
redirect("/signin");
|
redirect("/signin");
|
||||||
}
|
}
|
||||||
|
|
||||||
return <RadioFrame />;
|
return (
|
||||||
|
<main className="w-full h-screen bg-black">
|
||||||
|
<div className="w-full h-full px-4 pt-12 pb-4">
|
||||||
|
<ResponsiveIframe
|
||||||
|
src={process.env.NEXT_PUBLIC_IFRAME_RADIO_URL || ''}
|
||||||
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
@ -166,37 +166,62 @@ export function MainNav() {
|
|||||||
// Base menu items (available for everyone)
|
// Base menu items (available for everyone)
|
||||||
const baseMenuItems = [
|
const baseMenuItems = [
|
||||||
{
|
{
|
||||||
title: "HealthView",
|
title: "TimeTracker",
|
||||||
icon: Heart,
|
icon: Clock,
|
||||||
href: '/health-view',
|
href: '/timetracker',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "MissionView",
|
title: "Calendar",
|
||||||
icon: Target,
|
icon: Calendar,
|
||||||
href: '/mission-view',
|
href: '/calendar',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Notes",
|
||||||
|
icon: PenLine,
|
||||||
|
href: '/notes',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "AI Assistant",
|
||||||
|
icon: Robot,
|
||||||
|
href: '/ai-assistant',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Conference",
|
||||||
|
icon: Video,
|
||||||
|
href: '/conference',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Radio",
|
||||||
|
icon: RadioIcon,
|
||||||
|
href: '/radio',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Observatory",
|
||||||
|
icon: Telescope,
|
||||||
|
href: '/observatory',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
// Role-specific menu items
|
// Role-specific menu items
|
||||||
const roleSpecificItems = [
|
const roleSpecificItems = [
|
||||||
{
|
{
|
||||||
title: "ShowCase",
|
title: "Announcement",
|
||||||
|
icon: Megaphone,
|
||||||
|
href: '/announcement',
|
||||||
|
requiredRoles: ["Admin", "Entrepreneurship", "Expression"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Artlab",
|
||||||
icon: Lightbulb,
|
icon: Lightbulb,
|
||||||
href: '/showcase',
|
href: '/design',
|
||||||
requiredRoles: ["Expression"],
|
requiredRoles: ["Expression"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "UsersView",
|
title: "Management",
|
||||||
icon: UserCog,
|
icon: UserCog,
|
||||||
href: '/management',
|
href: '/management',
|
||||||
requiredRoles: ["Admin", "Entrepreneurship"],
|
requiredRoles: ["Admin", "Entrepreneurship"],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: "TheMessage",
|
|
||||||
icon: Mail,
|
|
||||||
href: '/the-message',
|
|
||||||
requiredRoles: ["Mediation", "Expression"],
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// Get visible menu items based on user roles
|
// Get visible menu items based on user roles
|
||||||
@ -262,10 +287,12 @@ export function MainNav() {
|
|||||||
<RadioIcon className='w-5 h-5' />
|
<RadioIcon className='w-5 h-5' />
|
||||||
<span className="sr-only">Radio</span>
|
<span className="sr-only">Radio</span>
|
||||||
</Link>
|
</Link>
|
||||||
<Link href='/announcement' className='text-white/80 hover:text-white'>
|
{hasRole(["Admin", "Entrepreneurship", "Expression"]) && (
|
||||||
<Megaphone className='w-5 h-5' />
|
<Link href='/announcement' className='text-white/80 hover:text-white'>
|
||||||
<span className="sr-only">Announcement</span>
|
<Megaphone className='w-5 h-5' />
|
||||||
</Link>
|
<span className="sr-only">Announcement</span>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Right side */}
|
{/* Right side */}
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
|
||||||
|
|
||||||
export function Messages() {
|
|
||||||
return (
|
|
||||||
<Card className='transition-transform duration-500 ease-in-out transform hover:scale-105'>
|
|
||||||
<CardHeader>
|
|
||||||
<CardTitle>Messages - Non Lu</CardTitle>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent className='p-6 text-center text-gray-500'>
|
|
||||||
Aucun nouveau messages
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@ -5,23 +5,20 @@ import { useState } from "react";
|
|||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import {
|
import {
|
||||||
BookOpen,
|
Clock,
|
||||||
Share2,
|
|
||||||
Palette,
|
|
||||||
GitFork,
|
|
||||||
Building2,
|
|
||||||
Calendar,
|
Calendar,
|
||||||
Target,
|
|
||||||
Mail,
|
|
||||||
HardDrive,
|
|
||||||
GraduationCap,
|
|
||||||
MessageSquare,
|
|
||||||
FileText,
|
FileText,
|
||||||
Calculator,
|
Bot,
|
||||||
Users,
|
Video,
|
||||||
Kanban,
|
Radio,
|
||||||
|
Eye,
|
||||||
|
Bell,
|
||||||
ChevronLeft,
|
ChevronLeft,
|
||||||
ChevronRight,
|
ChevronRight,
|
||||||
|
Palette,
|
||||||
|
GitFork,
|
||||||
|
Calculator,
|
||||||
|
Building2,
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
import { ScrollArea } from "@/components/ui/scroll-area";
|
||||||
@ -65,13 +62,22 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleNavigation = (href: string, external?: boolean) => {
|
||||||
|
if (external && href) {
|
||||||
|
window.open(href, "_blank");
|
||||||
|
} else {
|
||||||
|
router.push(href);
|
||||||
|
}
|
||||||
|
onClose();
|
||||||
|
};
|
||||||
|
|
||||||
// Base menu items (available for everyone)
|
// Base menu items (available for everyone)
|
||||||
const baseMenuItems: MenuItem[] = [
|
const baseMenuItems: MenuItem[] = [
|
||||||
{
|
{
|
||||||
title: "Diary",
|
title: "TimeTracker",
|
||||||
icon: BookOpen,
|
icon: Clock,
|
||||||
href: "/diary",
|
href: "/timetracker",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_DIARY_URL,
|
iframe: process.env.NEXT_PUBLIC_IFRAME_TIMETRACKER_URL || '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Calendar",
|
title: "Calendar",
|
||||||
@ -80,52 +86,40 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
|
|||||||
external: false,
|
external: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Email",
|
title: "Notes",
|
||||||
icon: Mail,
|
|
||||||
href: "/email",
|
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_MAIL_URL,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Drive",
|
|
||||||
icon: HardDrive,
|
|
||||||
href: "/drive",
|
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_DRIVE_URL,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Contacts",
|
|
||||||
icon: Users,
|
|
||||||
href: "/contacts",
|
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_CONTACTS_URL,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Learn",
|
|
||||||
icon: GraduationCap,
|
|
||||||
href: "/learn",
|
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_LEARN_URL,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Parole",
|
|
||||||
icon: MessageSquare,
|
|
||||||
href: "/parole",
|
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_PAROLE_URL,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "MissionsBoard",
|
|
||||||
icon: Kanban,
|
|
||||||
href: "/missions-board",
|
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_MISSIONSBOARD_URL,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Chapter",
|
|
||||||
icon: FileText,
|
icon: FileText,
|
||||||
href: "/chapter",
|
href: "/notes",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_CHAPTER_URL,
|
iframe: process.env.NEXT_PUBLIC_IFRAME_NOTES_URL || '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Agility",
|
title: "AI Assistant",
|
||||||
icon: Share2,
|
icon: Bot,
|
||||||
href: "/flow",
|
href: "/ai-assistant",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_AGILITY_URL,
|
iframe: process.env.NEXT_PUBLIC_IFRAME_AI_ASSISTANT_URL || '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Conference",
|
||||||
|
icon: Video,
|
||||||
|
href: "/conference",
|
||||||
|
iframe: process.env.NEXT_PUBLIC_IFRAME_CONFERENCE_URL || '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Radio",
|
||||||
|
icon: Radio,
|
||||||
|
href: "/radio",
|
||||||
|
iframe: process.env.NEXT_PUBLIC_IFRAME_RADIO_URL || '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Observatory",
|
||||||
|
icon: Eye,
|
||||||
|
href: "/observatory",
|
||||||
|
iframe: process.env.NEXT_PUBLIC_IFRAME_OBSERVATORY_URL || '',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Announcement",
|
||||||
|
icon: Bell,
|
||||||
|
href: "/announcement",
|
||||||
|
iframe: process.env.NEXT_PUBLIC_IFRAME_ANNOUNCEMENT_URL || '',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -135,28 +129,28 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
|
|||||||
title: "Artlab",
|
title: "Artlab",
|
||||||
icon: Palette,
|
icon: Palette,
|
||||||
href: "/design",
|
href: "/design",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_ARTLAB_URL,
|
iframe: process.env.NEXT_PUBLIC_IFRAME_ARTLAB_URL || '',
|
||||||
requiredRole: "Expression",
|
requiredRole: "Expression",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Gite",
|
title: "Gite",
|
||||||
icon: GitFork,
|
icon: GitFork,
|
||||||
href: "/gite",
|
href: "/gite",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_GITE_URL,
|
iframe: process.env.NEXT_PUBLIC_IFRAME_GITE_URL || '',
|
||||||
requiredRole: "Coding",
|
requiredRole: "Coding",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Calculation",
|
title: "Calculation",
|
||||||
icon: Calculator,
|
icon: Calculator,
|
||||||
href: "/calculation",
|
href: "/calculation",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_CALCULATION_URL,
|
iframe: process.env.NEXT_PUBLIC_IFRAME_CALCULATION_URL || '',
|
||||||
requiredRole: "DataIntelligence",
|
requiredRole: "DataIntelligence",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Mediations",
|
title: "Mediations",
|
||||||
icon: Building2,
|
icon: Building2,
|
||||||
href: "/crm",
|
href: "/crm",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_MEDIATIONS_URL,
|
iframe: process.env.NEXT_PUBLIC_IFRAME_MEDIATIONS_URL || '',
|
||||||
requiredRole: "Mediation",
|
requiredRole: "Mediation",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -167,15 +161,6 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
|
|||||||
...roleSpecificItems.filter(item => hasRole(item.requiredRole))
|
...roleSpecificItems.filter(item => hasRole(item.requiredRole))
|
||||||
];
|
];
|
||||||
|
|
||||||
const handleNavigation = (href: string, external?: boolean) => {
|
|
||||||
if (external && href) {
|
|
||||||
window.open(href, "_blank");
|
|
||||||
} else {
|
|
||||||
router.push(href);
|
|
||||||
}
|
|
||||||
onClose();
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* Backdrop */}
|
{/* Backdrop */}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user