Security added on delete service and list all node + cleaning some code
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import { NavLink } from '@/components/NavLink';
|
||||
import { Activity, Settings, Server, Menu, X } from 'lucide-react';
|
||||
import { Activity, Settings, Server, Menu, X, Users, LogIn } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useState } from 'react';
|
||||
import { Button } from '@/components/ui/button';
|
||||
@ -53,6 +53,30 @@ export function Layout({ children }: LayoutProps) {
|
||||
<Settings className="w-4 h-4" />
|
||||
Administration
|
||||
</NavLink>
|
||||
<NavLink
|
||||
to="/admin/users"
|
||||
className={cn(
|
||||
'flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium',
|
||||
'text-muted-foreground hover:text-foreground hover:bg-muted/50',
|
||||
'transition-colors'
|
||||
)}
|
||||
activeClassName="bg-muted text-foreground"
|
||||
>
|
||||
<Users className="w-4 h-4" />
|
||||
Utilisateurs
|
||||
</NavLink>
|
||||
<NavLink
|
||||
to="/login"
|
||||
className={cn(
|
||||
'flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium',
|
||||
'text-muted-foreground hover:text-foreground hover:bg-muted/50',
|
||||
'transition-colors'
|
||||
)}
|
||||
activeClassName="bg-muted text-foreground"
|
||||
>
|
||||
<LogIn className="w-4 h-4" />
|
||||
Connexion
|
||||
</NavLink>
|
||||
</nav>
|
||||
|
||||
{/* Mobile Menu Button */}
|
||||
@ -97,6 +121,32 @@ export function Layout({ children }: LayoutProps) {
|
||||
<Settings className="w-5 h-5" />
|
||||
Administration
|
||||
</NavLink>
|
||||
<NavLink
|
||||
to="/admin/users"
|
||||
className={cn(
|
||||
'flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium w-full',
|
||||
'text-muted-foreground hover:text-foreground hover:bg-muted/50',
|
||||
'transition-colors'
|
||||
)}
|
||||
activeClassName="bg-muted text-foreground"
|
||||
onClick={() => setMobileMenuOpen(false)}
|
||||
>
|
||||
<Users className="w-5 h-5" />
|
||||
Utilisateurs
|
||||
</NavLink>
|
||||
<NavLink
|
||||
to="/login"
|
||||
className={cn(
|
||||
'flex items-center gap-3 px-4 py-3 rounded-lg text-sm font-medium w-full',
|
||||
'text-muted-foreground hover:text-foreground hover:bg-muted/50',
|
||||
'transition-colors'
|
||||
)}
|
||||
activeClassName="bg-muted text-foreground"
|
||||
onClick={() => setMobileMenuOpen(false)}
|
||||
>
|
||||
<LogIn className="w-5 h-5" />
|
||||
Connexion
|
||||
</NavLink>
|
||||
</div>
|
||||
</nav>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user