style(ui): família visual de IA local

This commit is contained in:
evandro committed 2026-11-16 00:42:44 -03:00
1 parent f0b7db8c12
commit 07b0eaadca
62 files changed
+918 -853

No files matched your search

+9 -9
View File
@@ -87,16 +87,16 @@ export function GpuDashboard({ gpuId, pollInterval = 2000 }: GpuDashboardProps)
const getStatusColor = (value: number | null, thresholds: { good: number; warning: number }): string => {
if (!value) return 'bg-muted';
if (value < thresholds.good) return 'bg-green-500';
if (value < thresholds.warning) return 'bg-yellow-500';
return 'bg-red-500';
if (value < thresholds.good) return 'bg-success';
if (value < thresholds.warning) return 'bg-warning';
return 'bg-destructive';
};
const getTemperatureColor = (temp: number | null): string => {
if (!temp) return 'text-muted-foreground';
if (temp < 60) return 'text-green-500';
if (temp < 80) return 'text-yellow-500';
return 'text-red-500';
if (temp < 60) return 'text-success';
if (temp < 80) return 'text-warning';
return 'text-destructive';
};
return (
@@ -167,7 +167,7 @@ export function GpuDashboard({ gpuId, pollInterval = 2000 }: GpuDashboardProps)
className="h-2"
/>
{stats.compute_usage_percent !== null && stats.graphics_usage_percent !== null && (
<div className="flex gap-2 text-[10px] text-muted-foreground">
<div className="flex gap-2 text-xs text-muted-foreground">
<span>Compute: {stats.compute_usage_percent.toFixed(1)}%</span>
<span>Graphics: {stats.graphics_usage_percent.toFixed(1)}%</span>
</div>
@@ -190,7 +190,7 @@ export function GpuDashboard({ gpuId, pollInterval = 2000 }: GpuDashboardProps)
</span>
<span className="text-xs text-muted-foreground">°C</span>
{stats.temperature_max_celsius && (
<span className="text-[10px] text-muted-foreground">
<span className="text-xs text-muted-foreground">
/ {stats.temperature_max_celsius.toFixed(0)}°C
</span>
)}
@@ -211,7 +211,7 @@ export function GpuDashboard({ gpuId, pollInterval = 2000 }: GpuDashboardProps)
</span>
<span className="text-xs text-muted-foreground">W</span>
{stats.power_max_watts && (
<span className="text-[10px] text-muted-foreground">
<span className="text-xs text-muted-foreground">
/ {stats.power_max_watts.toFixed(1)}W
</span>
)}
+8 -8
View File
@@ -74,15 +74,15 @@ export function HardwareDashboard() {
};
const getCpuColor = (usage: number): string => {
if (usage < 50) return 'bg-green-500';
if (usage < 80) return 'bg-yellow-500';
return 'bg-red-500';
if (usage < 50) return 'bg-success';
if (usage < 80) return 'bg-warning';
return 'bg-destructive';
};
const getRamColor = (percent: number): string => {
if (percent < 60) return 'bg-blue-500';
if (percent < 85) return 'bg-yellow-500';
return 'bg-red-500';
if (percent < 60) return 'bg-success';
if (percent < 85) return 'bg-warning';
return 'bg-destructive';
};
return (
@@ -174,9 +174,9 @@ export function HardwareDashboard() {
<span className="text-muted-foreground">Usado</span>
<span className="font-medium">{stats.ram_percent.toFixed(1)}%</span>
</div>
<div className="relative h-24 bg-muted rounded-lg overflow-hidden">
<div className="relative h-24 bg-hover rounded-lg overflow-hidden">
<div
className={`absolute bottom-0 left-0 right-0 ${getRamColor(stats.ram_percent)} transition-all duration-300`}
className={`absolute bottom-0 left-0 right-0 ${getRamColor(stats.ram_percent)} opacity-60`}
style={{ height: `${stats.ram_percent}%` }}
/>
<div className="absolute inset-0 flex items-center justify-center text-xs font-medium">