Ajout de l'URL Nextcloud dans la configuration et suppression du calendrier de la page principale. Mise à jour de la barre latérale pour inclure un lien vers l'application calendrier.

This commit is contained in:
Kevin 2025-02-28 03:35:22 +01:00
parent a8547de16a
commit 97eba73158
4 changed files with 16 additions and 23 deletions

View File

@ -5,4 +5,6 @@ KEYCLOAK_CLIENT_ID=front
KEYCLOAK_CLIENT_SECRET=Klsbm7hzyXscypXU0wUPPVBrttFPt6Pn
KEYCLOAK_REALM=master
KEYCLOAK_ISSUER=http://172.16.32.141:8090/realms/master
KEYCLOAK_BASE_URL=http://172.16.32.141:8090
KEYCLOAK_BASE_URL=http://172.16.32.141:8090
NEXTCLOUD_URL=http://cloud.neah.local

View File

@ -1,13 +0,0 @@
export default function CalendarPage() {
return (
<div className="w-full h-[calc(100vh-8rem)]">
<iframe
src="https://example.com/calendar"
className="w-full h-full border-none"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowFullScreen
/>
</div>
)
}

View File

@ -38,7 +38,6 @@ export default async function Page() {
</div>
<div className='col-span-3 space-y-4'>
<Podcast />
<CalendarWidget />
<Todo />
</div>
</div>

View File

@ -11,6 +11,7 @@ import {
Building2,
Users,
User,
Calendar,
} from "lucide-react";
import { Button } from "@/components/ui/button";
import { ScrollArea } from "@/components/ui/scroll-area";
@ -28,10 +29,10 @@ const menuItems = [
href: "/users",
},
{
title: "Chapter",
icon: BookOpen,
href: "/chapter",
iframe: "https://example.com/chapter",
title: "Calendar",
icon: Calendar,
href: "http://cloud.neah.local/apps/calendar/dayGridMonth/now",
external: true,
},
{
title: "Flow",
@ -70,8 +71,12 @@ export function Sidebar({ isOpen, onClose, className }: SidebarProps) {
const router = useRouter();
const pathname = usePathname();
const handleNavigation = (href: string) => {
router.push(href);
const handleNavigation = (href: string, external?: boolean) => {
if (external) {
window.open(href, "_blank");
} else {
router.push(href);
}
onClose();
};
@ -98,9 +103,9 @@ export function Sidebar({ isOpen, onClose, className }: SidebarProps) {
variant='ghost'
className={cn(
"w-full justify-start gap-2 text-white hover:bg-gray-800 hover:text-white",
pathname === item.href && "bg-gray-800"
pathname === item.href && !item.external && "bg-gray-800"
)}
onClick={() => handleNavigation(item.href)}
onClick={() => handleNavigation(item.href, item.external)}
>
<item.icon className='h-5 w-5' />
<span>{item.title}</span>