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 (
|
||||
<div className="w-full h-[calc(100vh-8rem)]">
|
||||
<iframe
|
||||
src="https://example.com/ai-assistant"
|
||||
className="w-full h-full border-none"
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
allowFullScreen
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
<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_AI_ASSISTANT_URL || ''}
|
||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
|
||||
/>
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { getServerSession } from "next-auth/next";
|
||||
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
|
||||
import { redirect } from "next/navigation";
|
||||
import { ConferenceFrame } from "@/components/conference/conference-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 <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 { Messages } from "@/components/messages";
|
||||
import { Podcast } from "@/components/podcast";
|
||||
import { CalendarWidget } from "@/components/calendar-widget";
|
||||
import { News } from "@/components/news";
|
||||
@ -11,23 +10,15 @@ export const metadata = {
|
||||
|
||||
export default function DashboardPage() {
|
||||
return (
|
||||
<div className="container mx-auto p-6 mt-12">
|
||||
{/* 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="w-full px-4 pt-12 pb-4">
|
||||
<div className='grid grid-cols-12 gap-4'>
|
||||
<div className='col-span-3'>
|
||||
<div className='col-span-4'>
|
||||
<QuoteCard />
|
||||
<div className='mt-4'>
|
||||
<News />
|
||||
</div>
|
||||
</div>
|
||||
<div className='col-span-6'>
|
||||
<Messages />
|
||||
</div>
|
||||
<div className='col-span-3 space-y-4'>
|
||||
<div className='col-span-8 space-y-4'>
|
||||
<Podcast />
|
||||
<CalendarWidget />
|
||||
<Todo />
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import { getServerSession } from "next-auth/next";
|
||||
import { authOptions } from "@/app/api/auth/[...nextauth]/route";
|
||||
import { redirect } from "next/navigation";
|
||||
import { RadioFrame } from "@/components/radio/radio-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 <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)
|
||||
const baseMenuItems = [
|
||||
{
|
||||
title: "HealthView",
|
||||
icon: Heart,
|
||||
href: '/health-view',
|
||||
title: "TimeTracker",
|
||||
icon: Clock,
|
||||
href: '/timetracker',
|
||||
},
|
||||
{
|
||||
title: "MissionView",
|
||||
icon: Target,
|
||||
href: '/mission-view',
|
||||
title: "Calendar",
|
||||
icon: Calendar,
|
||||
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
|
||||
const roleSpecificItems = [
|
||||
{
|
||||
title: "ShowCase",
|
||||
title: "Announcement",
|
||||
icon: Megaphone,
|
||||
href: '/announcement',
|
||||
requiredRoles: ["Admin", "Entrepreneurship", "Expression"],
|
||||
},
|
||||
{
|
||||
title: "Artlab",
|
||||
icon: Lightbulb,
|
||||
href: '/showcase',
|
||||
href: '/design',
|
||||
requiredRoles: ["Expression"],
|
||||
},
|
||||
{
|
||||
title: "UsersView",
|
||||
title: "Management",
|
||||
icon: UserCog,
|
||||
href: '/management',
|
||||
requiredRoles: ["Admin", "Entrepreneurship"],
|
||||
},
|
||||
{
|
||||
title: "TheMessage",
|
||||
icon: Mail,
|
||||
href: '/the-message',
|
||||
requiredRoles: ["Mediation", "Expression"],
|
||||
},
|
||||
];
|
||||
|
||||
// Get visible menu items based on user roles
|
||||
@ -262,10 +287,12 @@ export function MainNav() {
|
||||
<RadioIcon className='w-5 h-5' />
|
||||
<span className="sr-only">Radio</span>
|
||||
</Link>
|
||||
<Link href='/announcement' className='text-white/80 hover:text-white'>
|
||||
<Megaphone className='w-5 h-5' />
|
||||
<span className="sr-only">Announcement</span>
|
||||
</Link>
|
||||
{hasRole(["Admin", "Entrepreneurship", "Expression"]) && (
|
||||
<Link href='/announcement' className='text-white/80 hover:text-white'>
|
||||
<Megaphone className='w-5 h-5' />
|
||||
<span className="sr-only">Announcement</span>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 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 {
|
||||
BookOpen,
|
||||
Share2,
|
||||
Palette,
|
||||
GitFork,
|
||||
Building2,
|
||||
Clock,
|
||||
Calendar,
|
||||
Target,
|
||||
Mail,
|
||||
HardDrive,
|
||||
GraduationCap,
|
||||
MessageSquare,
|
||||
FileText,
|
||||
Calculator,
|
||||
Users,
|
||||
Kanban,
|
||||
Bot,
|
||||
Video,
|
||||
Radio,
|
||||
Eye,
|
||||
Bell,
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
Palette,
|
||||
GitFork,
|
||||
Calculator,
|
||||
Building2,
|
||||
} from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
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)
|
||||
const baseMenuItems: MenuItem[] = [
|
||||
{
|
||||
title: "Diary",
|
||||
icon: BookOpen,
|
||||
href: "/diary",
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_DIARY_URL,
|
||||
title: "TimeTracker",
|
||||
icon: Clock,
|
||||
href: "/timetracker",
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_TIMETRACKER_URL || '',
|
||||
},
|
||||
{
|
||||
title: "Calendar",
|
||||
@ -80,52 +86,40 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
|
||||
external: false,
|
||||
},
|
||||
{
|
||||
title: "Email",
|
||||
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",
|
||||
title: "Notes",
|
||||
icon: FileText,
|
||||
href: "/chapter",
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_CHAPTER_URL,
|
||||
href: "/notes",
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_NOTES_URL || '',
|
||||
},
|
||||
{
|
||||
title: "Agility",
|
||||
icon: Share2,
|
||||
href: "/flow",
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_AGILITY_URL,
|
||||
title: "AI Assistant",
|
||||
icon: Bot,
|
||||
href: "/ai-assistant",
|
||||
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",
|
||||
icon: Palette,
|
||||
href: "/design",
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_ARTLAB_URL,
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_ARTLAB_URL || '',
|
||||
requiredRole: "Expression",
|
||||
},
|
||||
{
|
||||
title: "Gite",
|
||||
icon: GitFork,
|
||||
href: "/gite",
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_GITE_URL,
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_GITE_URL || '',
|
||||
requiredRole: "Coding",
|
||||
},
|
||||
{
|
||||
title: "Calculation",
|
||||
icon: Calculator,
|
||||
href: "/calculation",
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_CALCULATION_URL,
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_CALCULATION_URL || '',
|
||||
requiredRole: "DataIntelligence",
|
||||
},
|
||||
{
|
||||
title: "Mediations",
|
||||
icon: Building2,
|
||||
href: "/crm",
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_MEDIATIONS_URL,
|
||||
iframe: process.env.NEXT_PUBLIC_IFRAME_MEDIATIONS_URL || '',
|
||||
requiredRole: "Mediation",
|
||||
},
|
||||
];
|
||||
@ -167,15 +161,6 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
|
||||
...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 (
|
||||
<>
|
||||
{/* Backdrop */}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user