add new proofsystem

This commit is contained in:
rodrigo committed 2025-07-27 19:20:10 -03:00
1 parent a63aaeb655
commit 2399cb1f2d
11 files changed
+2009 -6

No files matched your search

+104
View File
@@ -0,0 +1,104 @@
import React from 'react';
import { Link, useLocation } from 'react-router-dom';
import { useAuth } from '../../hooks/useAuth';
import {
HomeIcon,
DocumentTextIcon,
UserIcon,
CogIcon,
LogoutIcon,
ShieldCheckIcon,
ViewGridIcon,
ClipboardListIcon
} from '@heroicons/react/outline';
const Sidebar: React.FC = () => {
const { pathname } = useLocation();
const { user, logout } = useAuth();
const isActive = (path: string) => {
return pathname === path ? 'bg-blue-500 text-white' : 'text-gray-700';
};
const menuItems = [
{
name: 'Início',
icon: HomeIcon,
href: '/'
},
{
name: 'Provas Digitais',
icon: DocumentTextIcon,
children: [
{ name: 'Verificar Prova', href: '/provas/verificar' },
{ name: 'Enviar Prova', href: '/provas/upload' },
{ name: 'Status da Prova', href: '/provas/status' },
{ name: 'Captura Web', href: '/web-proofs/capture' },
{ name: 'Relatórios Web', href: '/web-proofs' }
]
},
{
name: 'Usuário',
icon: UserIcon,
href: '/profile'
},
{
name: 'Configurações',
icon: CogIcon,
href: '/settings'
},
{
name: 'Sair',
icon: LogoutIcon,
action: logout
}
];
return (
<div className="bg-white shadow-md rounded-lg p-4">
<div className="flex items-center justify-between mb-4">
<h2 className="text-lg font-semibold text-gray-800">Painel de Controle</h2>
</div>
<nav>
<ul className="space-y-2">
{menuItems.map((item) => (
<li key={item.name}>
{item.children ? (
<div>
<p className="text-xs font-semibold text-gray-500 uppercase">{item.name}</p>
<ul className="mt-1 space-y-1">
{item.children.map((child) => (
<li key={child.name}>
<Link
to={child.href}
className={`flex items-center p-2 text-sm rounded-md transition-all duration-200
${isActive(child.href)} hover:bg-blue-600 hover:text-white`}
>
<ViewGridIcon className="w-5 h-5 mr-2" />
{child.name}
</Link>
</li>
))}
</ul>
</div>
) : (
<Link
to={item.href}
onClick={item.action}
className={`flex items-center p-2 text-sm rounded-md transition-all duration-200
${isActive(item.href)} hover:bg-blue-600 hover:text-white`}
>
<item.icon className="w-5 h-5 mr-2" />
{item.name}
</Link>
)}
</li>
))}
</ul>
</nav>
</div>
);
};
export default Sidebar;