mobile test1
#deploy
This commit is contained in:
parent
26fcadc747
commit
3ea8990128
@ -4,7 +4,7 @@ import { LogOut, Menu } from 'lucide-react';
|
||||
import { useAuth } from '@/contexts/AuthContext';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import DashboardContainer from '../dashboard/DashboardContainer';
|
||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@/components/ui/dropdown-menu';
|
||||
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu';
|
||||
import { HeaderProvider, useHeader } from '@/contexts/HeaderContext';
|
||||
|
||||
const MainShell: React.FC = () => {
|
||||
@ -61,9 +61,9 @@ const MainShell: React.FC = () => {
|
||||
return (
|
||||
<div className="min-h-screen bg-background">
|
||||
{/* Header */}
|
||||
<header className="sticky top-0 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
||||
<div className="container flex h-16 items-center justify-between px-4">
|
||||
<div className="flex items-center gap-2">
|
||||
<header className="sticky top-0 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 pointer-events-none">
|
||||
<div className="container grid h-16 grid-cols-[auto,1fr,auto] items-center px-4">
|
||||
<div className="flex items-center gap-2 pointer-events-auto">
|
||||
<div
|
||||
className="flex items-center gap-2 cursor-pointer"
|
||||
onClick={() => navigate('/')}
|
||||
@ -82,36 +82,39 @@ const MainShell: React.FC = () => {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{header.mobileMenu ? (
|
||||
<DropdownMenu>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button variant="ghost" size="icon" className="md:hidden" aria-label="Menü">
|
||||
<Menu className="h-5 w-5" />
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent align="start">{header.mobileMenu}</DropdownMenuContent>
|
||||
<DropdownMenuContent align="start">
|
||||
{header.mobileMenu}
|
||||
{header.mobileMenu ? <DropdownMenuSeparator /> : null}
|
||||
<DropdownMenuItem onClick={logout} className="gap-2">
|
||||
<LogOut className="h-4 w-4" />
|
||||
<span>Abmelden</span>
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
) : null}
|
||||
|
||||
{header.left ? (
|
||||
<div className="hidden md:flex items-center gap-2">{header.left}</div>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
{header.title && (
|
||||
<div className="absolute left-1/2 -translate-x-1/2 text-center text-sm font-medium">
|
||||
{header.title}
|
||||
<div className="text-center text-sm font-medium pointer-events-none">
|
||||
{header.title || ''}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex items-center gap-2 pointer-events-auto">
|
||||
<div className="hidden md:block text-sm text-muted-foreground">
|
||||
Hallo, {user?.name?.split(' ')[0] || 'Benutzer'}
|
||||
</div>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="gap-1.5 text-sm"
|
||||
className="gap-1.5 text-sm hidden md:inline-flex"
|
||||
onClick={logout}
|
||||
>
|
||||
<LogOut className="h-4 w-4" />
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import React, { useState } from 'react';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { Card, CardHeader, CardTitle, CardDescription } from "@/components/ui/card";
|
||||
import { type Event } from '@/features/event/api/eventService';
|
||||
import { type DashboardModule, type DashboardModuleContext } from '@/components/dashboard/dashboardModuleTypes';
|
||||
@ -66,9 +66,9 @@ const Dashboard: React.FC<DashboardProps> = ({ onActionClick, hasActiveEvent, cu
|
||||
? visibleModules.find((m) => m.id === activeModuleId) || null
|
||||
: null;
|
||||
|
||||
const handleBackToOverview = () => {
|
||||
const handleBackToOverview = useCallback(() => {
|
||||
setActiveModuleId(null);
|
||||
};
|
||||
}, []);
|
||||
|
||||
const renderContent = () => {
|
||||
if (activeModule) {
|
||||
|
||||
@ -501,12 +501,12 @@ const EventFormInline: React.FC<EventFormInlineProps> = ({ onSuccess, onCancel,
|
||||
isActive
|
||||
? 'bg-primary/10 text-primary shadow-sm'
|
||||
: 'text-foreground/80 hover:bg-primary/5 hover:text-foreground'
|
||||
}`
|
||||
} focus-visible:ring-0 focus-visible:ring-offset-0`
|
||||
: `relative w-10 h-10 justify-center rounded-xl px-0 transition-colors ${
|
||||
isActive
|
||||
? 'bg-primary/10 text-primary shadow-sm'
|
||||
: 'text-foreground/80 hover:bg-primary/5 hover:text-foreground'
|
||||
}`
|
||||
} focus-visible:ring-0 focus-visible:ring-offset-0`
|
||||
}
|
||||
onClick={() => setActiveTab(tab)}
|
||||
>
|
||||
@ -538,7 +538,7 @@ const EventFormInline: React.FC<EventFormInlineProps> = ({ onSuccess, onCancel,
|
||||
type="button"
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className={`flex-1 h-11 px-1 justify-center rounded-xl transition-colors ${
|
||||
className={`flex-1 h-11 px-1 justify-center rounded-xl transition-colors focus-visible:ring-0 focus-visible:ring-offset-0 ${
|
||||
isActive ? 'bg-primary/10 text-primary' : 'text-muted-foreground hover:bg-primary/5 hover:text-foreground'
|
||||
}`}
|
||||
onClick={() => setActiveTab(tab)}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user