Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions frontend/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ server {
root /usr/share/nginx/html;
index index.html;

# Permite uploads de até 12MB (limite do backend é 10MB)
client_max_body_size 12m;

# Gzip
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml image/svg+xml;
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

html { scroll-behavior: smooth; }

html, body {
max-width: 100%;
overflow-x: hidden;
}

body {
margin: 0;
font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
Expand Down
56 changes: 29 additions & 27 deletions frontend/src/pages/Alunos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,34 +75,36 @@ export function Alunos() {

{!carregandoAlunos && alunos.length > 0 && (
<Card className="overflow-hidden p-0">
<table className="w-full text-sm">
<thead className="border-b border-white/8 bg-white/3">
<tr>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Nome</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">E-mail</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Matrícula</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Status</th>
</tr>
</thead>
<tbody>
{alunos.map((aluno) => (
<tr key={aluno.id} className="border-b border-white/6 transition-colors hover:bg-white/3">
<td className="px-4 py-3 font-medium text-white">{aluno.nome}</td>
<td className="px-4 py-3 text-white/55">{aluno.email}</td>
<td className="px-4 py-3 text-white/55">{aluno.matricula ?? '—'}</td>
<td className="px-4 py-3">
<span className={`rounded-full border px-2.5 py-0.5 text-xs font-medium ${
aluno.ativo
? 'border-[#618C7C]/30 bg-[#618C7C]/15 text-[#7AAA9A]'
: 'border-red-500/30 bg-red-500/15 text-red-300'
}`}>
{aluno.ativo ? 'Ativo' : 'Inativo'}
</span>
</td>
<div className="overflow-x-auto">
<table className="w-full min-w-[520px] text-sm">
<thead className="border-b border-white/8 bg-white/3">
<tr>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Nome</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">E-mail</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Matrícula</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Status</th>
</tr>
))}
</tbody>
</table>
</thead>
<tbody>
{alunos.map((aluno) => (
<tr key={aluno.id} className="border-b border-white/6 transition-colors hover:bg-white/3">
<td className="px-4 py-3 font-medium text-white">{aluno.nome}</td>
<td className="px-4 py-3 text-white/55">{aluno.email}</td>
<td className="px-4 py-3 text-white/55">{aluno.matricula ?? '—'}</td>
<td className="px-4 py-3">
<span className={`rounded-full border px-2.5 py-0.5 text-xs font-medium ${
aluno.ativo
? 'border-[#618C7C]/30 bg-[#618C7C]/15 text-[#7AAA9A]'
: 'border-red-500/30 bg-red-500/15 text-red-300'
}`}>
{aluno.ativo ? 'Ativo' : 'Inativo'}
</span>
</td>
</tr>
))}
</tbody>
</table>
</div>
</Card>
)}
</>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/DetalheDocumento.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ export function DetalheDocumento() {
{ label: 'Tamanho', value: formatBytes(doc.tamanho_arquivo) },
{ label: 'Submetido em', value: formatDate(doc.criado_em) },
].map(({ label, value }) => (
<div key={label}>
<div key={label} className="min-w-0">
<dt className="text-xs font-medium uppercase tracking-wide text-white/35">{label}</dt>
<dd className="mt-1 text-sm text-white">{value}</dd>
<dd className="mt-1 break-words text-sm text-white">{value}</dd>
</div>
))}
</dl>
Expand Down
56 changes: 29 additions & 27 deletions frontend/src/pages/Documentos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,34 +84,36 @@ export function Documentos() {

{data && data.dados.length > 0 && (
<Card className="overflow-hidden p-0">
<table className="w-full text-sm">
<thead className="border-b border-white/8 bg-white/3">
<tr>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Título</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Tipo</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Carga (h)</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Status</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Data</th>
<th className="px-4 py-3" />
</tr>
</thead>
<tbody>
{data.dados.map((doc) => (
<tr key={doc.id} className="border-b border-white/6 transition-colors hover:bg-white/3">
<td className="px-4 py-3 font-medium text-white">{doc.titulo}</td>
<td className="px-4 py-3 text-white/55">{doc.tipo}</td>
<td className="px-4 py-3 text-white/55">{doc.carga_horaria}h</td>
<td className="px-4 py-3"><BadgeStatus status={doc.status} /></td>
<td className="px-4 py-3 text-white/40">{new Date(doc.criado_em.replace(' ', 'T')).toLocaleDateString('pt-BR')}</td>
<td className="px-4 py-3 text-right">
<Link to={`/documentos/${doc.id}`} className="text-sm text-[#618C7C] hover:text-[#7AAA9A] transition-colors">
Ver →
</Link>
</td>
<div className="overflow-x-auto">
<table className="w-full min-w-[640px] text-sm">
<thead className="border-b border-white/8 bg-white/3">
<tr>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Título</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Tipo</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Carga (h)</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Status</th>
<th className="px-4 py-3 text-left text-xs font-medium uppercase tracking-wide text-white/40">Data</th>
<th className="px-4 py-3" />
</tr>
))}
</tbody>
</table>
</thead>
<tbody>
{data.dados.map((doc) => (
<tr key={doc.id} className="border-b border-white/6 transition-colors hover:bg-white/3">
<td className="px-4 py-3 font-medium text-white">{doc.titulo}</td>
<td className="px-4 py-3 text-white/55">{doc.tipo}</td>
<td className="px-4 py-3 text-white/55">{doc.carga_horaria}h</td>
<td className="px-4 py-3"><BadgeStatus status={doc.status} /></td>
<td className="px-4 py-3 text-white/40">{new Date(doc.criado_em.replace(' ', 'T')).toLocaleDateString('pt-BR')}</td>
<td className="px-4 py-3 text-right">
<Link to={`/documentos/${doc.id}`} className="text-sm text-[#618C7C] hover:text-[#7AAA9A] transition-colors">
Ver →
</Link>
</td>
</tr>
))}
</tbody>
</table>
</div>
</Card>
)}

Expand Down
3 changes: 3 additions & 0 deletions infra/nginx/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ server {
# HSTS — força HTTPS por 2 anos
add_header Strict-Transport-Security "max-age=63072000" always;

# Permite uploads de até 12MB (limite do backend é 10MB)
client_max_body_size 12m;

location / {
proxy_pass http://frontend;
proxy_http_version 1.1;
Expand Down
Loading