Compare commits
No commits in common. "560d69321f5f05b7f7f9c3842e822e99637b7e65" and "03e5865856094de16734398ca072912f18ccd851" have entirely different histories.
560d69321f
...
03e5865856
@ -1,24 +1,13 @@
|
|||||||
import { getServerSession } from "next-auth/next";
|
export default function AIAssistantPage() {
|
||||||
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 (
|
||||||
<main className="w-full h-screen bg-black">
|
<div className="w-full h-[calc(100vh-8rem)]">
|
||||||
<div className="w-full h-full px-4 pt-12 pb-4">
|
<iframe
|
||||||
<ResponsiveIframe
|
src="https://example.com/ai-assistant"
|
||||||
src={process.env.NEXT_PUBLIC_IFRAME_AI_ASSISTANT_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>
|
)
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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 { ResponsiveIframe } from "@/app/components/responsive-iframe";
|
import { ConferenceFrame } from "@/components/conference/conference-frame";
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const session = await getServerSession(authOptions);
|
const session = await getServerSession(authOptions);
|
||||||
@ -10,14 +10,5 @@ export default async function Page() {
|
|||||||
redirect("/signin");
|
redirect("/signin");
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return <ConferenceFrame />;
|
||||||
<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,4 +1,5 @@
|
|||||||
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";
|
||||||
@ -10,15 +11,23 @@ export const metadata = {
|
|||||||
|
|
||||||
export default function DashboardPage() {
|
export default function DashboardPage() {
|
||||||
return (
|
return (
|
||||||
<div className="w-full px-4 pt-12 pb-4">
|
<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='grid grid-cols-12 gap-4'>
|
<div className='grid grid-cols-12 gap-4'>
|
||||||
<div className='col-span-4'>
|
<div className='col-span-3'>
|
||||||
<QuoteCard />
|
<QuoteCard />
|
||||||
<div className='mt-4'>
|
<div className='mt-4'>
|
||||||
<News />
|
<News />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='col-span-8 space-y-4'>
|
<div className='col-span-6'>
|
||||||
|
<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 { ResponsiveIframe } from "@/app/components/responsive-iframe";
|
import { RadioFrame } from "@/components/radio/radio-frame";
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const session = await getServerSession(authOptions);
|
const session = await getServerSession(authOptions);
|
||||||
@ -10,14 +10,5 @@ export default async function Page() {
|
|||||||
redirect("/signin");
|
redirect("/signin");
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return <RadioFrame />;
|
||||||
<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,62 +166,37 @@ export function MainNav() {
|
|||||||
// Base menu items (available for everyone)
|
// Base menu items (available for everyone)
|
||||||
const baseMenuItems = [
|
const baseMenuItems = [
|
||||||
{
|
{
|
||||||
title: "TimeTracker",
|
title: "HealthView",
|
||||||
icon: Clock,
|
icon: Heart,
|
||||||
href: '/timetracker',
|
href: '/health-view',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Calendar",
|
title: "MissionView",
|
||||||
icon: Calendar,
|
icon: Target,
|
||||||
href: '/calendar',
|
href: '/mission-view',
|
||||||
},
|
|
||||||
{
|
|
||||||
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: "Announcement",
|
title: "ShowCase",
|
||||||
icon: Megaphone,
|
|
||||||
href: '/announcement',
|
|
||||||
requiredRoles: ["Admin", "Entrepreneurship", "Expression"],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "Artlab",
|
|
||||||
icon: Lightbulb,
|
icon: Lightbulb,
|
||||||
href: '/design',
|
href: '/showcase',
|
||||||
requiredRoles: ["Expression"],
|
requiredRoles: ["Expression"],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Management",
|
title: "UsersView",
|
||||||
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
|
||||||
@ -287,12 +262,10 @@ 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>
|
||||||
{hasRole(["Admin", "Entrepreneurship", "Expression"]) && (
|
|
||||||
<Link href='/announcement' className='text-white/80 hover:text-white'>
|
<Link href='/announcement' className='text-white/80 hover:text-white'>
|
||||||
<Megaphone className='w-5 h-5' />
|
<Megaphone className='w-5 h-5' />
|
||||||
<span className="sr-only">Announcement</span>
|
<span className="sr-only">Announcement</span>
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Right side */}
|
{/* Right side */}
|
||||||
|
|||||||
14
components/messages.tsx
Normal file
14
components/messages.tsx
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
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,20 +5,23 @@ import { useState } from "react";
|
|||||||
|
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import {
|
import {
|
||||||
Clock,
|
BookOpen,
|
||||||
Calendar,
|
Share2,
|
||||||
FileText,
|
|
||||||
Bot,
|
|
||||||
Video,
|
|
||||||
Radio,
|
|
||||||
Eye,
|
|
||||||
Bell,
|
|
||||||
ChevronLeft,
|
|
||||||
ChevronRight,
|
|
||||||
Palette,
|
Palette,
|
||||||
GitFork,
|
GitFork,
|
||||||
Calculator,
|
|
||||||
Building2,
|
Building2,
|
||||||
|
Calendar,
|
||||||
|
Target,
|
||||||
|
Mail,
|
||||||
|
HardDrive,
|
||||||
|
GraduationCap,
|
||||||
|
MessageSquare,
|
||||||
|
FileText,
|
||||||
|
Calculator,
|
||||||
|
Users,
|
||||||
|
Kanban,
|
||||||
|
ChevronLeft,
|
||||||
|
ChevronRight,
|
||||||
} 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";
|
||||||
@ -62,22 +65,13 @@ 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: "TimeTracker",
|
title: "Diary",
|
||||||
icon: Clock,
|
icon: BookOpen,
|
||||||
href: "/timetracker",
|
href: "/diary",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_TIMETRACKER_URL || '',
|
iframe: process.env.NEXT_PUBLIC_IFRAME_DIARY_URL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Calendar",
|
title: "Calendar",
|
||||||
@ -86,40 +80,52 @@ export function Sidebar({ isOpen, onClose }: SidebarProps) {
|
|||||||
external: false,
|
external: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Notes",
|
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",
|
||||||
icon: FileText,
|
icon: FileText,
|
||||||
href: "/notes",
|
href: "/chapter",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_NOTES_URL || '',
|
iframe: process.env.NEXT_PUBLIC_IFRAME_CHAPTER_URL,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "AI Assistant",
|
title: "Agility",
|
||||||
icon: Bot,
|
icon: Share2,
|
||||||
href: "/ai-assistant",
|
href: "/flow",
|
||||||
iframe: process.env.NEXT_PUBLIC_IFRAME_AI_ASSISTANT_URL || '',
|
iframe: process.env.NEXT_PUBLIC_IFRAME_AGILITY_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 || '',
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -129,28 +135,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",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -161,6 +167,15 @@ 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