Translate to pt, fix some ui details, add proper icon and logo

This commit is contained in:
litoral05
2026-05-11 17:17:50 +01:00
parent c1e9aeb386
commit 12358327c9
73 changed files with 529 additions and 598 deletions
+38 -22
View File
@@ -38,6 +38,22 @@ const sources: Array<'all' | ActivityLogSource> = [
'vps',
];
const levelLabels: Record<'all' | ActivityLogLevel, string> = {
all: 'Todos',
info: 'Info',
success: 'Sucesso',
warning: 'Aviso',
error: 'Erro',
};
const sourceLabels: Record<'all' | ActivityLogSource, string> = {
all: 'Todas',
desktop: 'Desktop',
router: 'Router',
backend: 'Backend',
vps: 'VPS',
};
function levelTone(level: ActivityLogLevel) {
if (level === 'success') return 'green';
if (level === 'warning') return 'purple';
@@ -120,12 +136,12 @@ export function ActivityLogs() {
<div className="mb-5 flex items-center justify-between">
<div>
<h2 className="text-3xl font-bold tracking-tight text-white">
Activity Logs
Registos de Atividade
</h2>
<p className="mt-1 text-slate-400">
Local provisioning audit trail for
technicians.
Histórico local de auditoria de
provisionamento para técnicos.
</p>
</div>
@@ -138,7 +154,7 @@ export function ActivityLogs() {
}}
>
<Download size={16} />
Export JSON
Exportar JSON
</Button>
<Button
@@ -150,7 +166,7 @@ export function ActivityLogs() {
}}
>
<Trash2 size={16} />
Clear Logs
Limpar Registos
</Button>
</div>
</div>
@@ -159,7 +175,7 @@ export function ActivityLogs() {
<div className="grid grid-cols-12 gap-4">
<div className="col-span-6">
<label className="mb-2 block text-xs font-medium uppercase tracking-wide text-slate-500">
Search
Pesquisa
</label>
<div className="flex items-center gap-2 rounded-xl border border-white/10 bg-ink-950 px-3">
@@ -173,7 +189,7 @@ export function ActivityLogs() {
onChange={(event) =>
setQuery(event.target.value)
}
placeholder="Search action, VPN IP, router IP, message..."
placeholder="Pesquisar ação, IP VPN, IP router, mensagem..."
className="w-full bg-transparent py-3 text-sm text-white outline-none placeholder:text-slate-600"
/>
</div>
@@ -181,7 +197,7 @@ export function ActivityLogs() {
<div className="col-span-3">
<label className="mb-2 block text-xs font-medium uppercase tracking-wide text-slate-500">
Level
Nível
</label>
<Select
@@ -189,14 +205,14 @@ export function ActivityLogs() {
onChange={setLevelFilter}
options={levels.map((level) => ({
value: level,
label: level,
label: levelLabels[level],
}))}
/>
</div>
<div className="col-span-3">
<label className="mb-2 block text-xs font-medium uppercase tracking-wide text-slate-500">
Source
Origem
</label>
<Select
@@ -204,7 +220,7 @@ export function ActivityLogs() {
onChange={setSourceFilter}
options={sources.map((source) => ({
value: source,
label: source,
label: sourceLabels[source],
}))}
/>
</div>
@@ -214,11 +230,11 @@ export function ActivityLogs() {
<Card className="relative z-10 flex min-h-0 flex-1 flex-col overflow-hidden">
<div className="mb-4 flex items-center justify-between">
<h3 className="font-semibold text-white">
Audit Events
Eventos de Auditoria
</h3>
<span className="text-sm text-slate-500">
{filteredLogs.length} shown /{' '}
{filteredLogs.length} apresentados /{' '}
{logs.length} total
</span>
</div>
@@ -235,27 +251,27 @@ export function ActivityLogs() {
<thead className="sticky top-0 z-10 bg-slate-950 text-left text-xs uppercase tracking-wide text-slate-500">
<tr>
<th className="w-[180px] px-4 py-3">
Time
Hora
</th>
<th className="w-[110px] px-4 py-3">
Level
Nível
</th>
<th className="w-[120px] px-4 py-3">
Source
Origem
</th>
<th className="w-[190px] px-4 py-3">
Action
Ação
</th>
<th className="px-4 py-3">
Message
Mensagem
</th>
<th className="w-[160px] px-4 py-3">
VPN IP
IP VPN
</th>
</tr>
</thead>
@@ -274,12 +290,12 @@ export function ActivityLogs() {
<td className="px-4 py-3">
<Badge tone={levelTone(log.level)}>
{log.level}
{levelLabels[log.level]}
</Badge>
</td>
<td className="px-4 py-3 text-slate-300">
{log.source}
{sourceLabels[log.source]}
</td>
<td className="truncate px-4 py-3 font-medium text-white">
@@ -302,7 +318,7 @@ export function ActivityLogs() {
colSpan={6}
className="px-4 py-10 text-center text-slate-500"
>
No activity logs found.
Nenhum registo de atividade encontrado.
</td>
</tr>
)}