Fixed memory allocation desync

This commit is contained in:
2026-04-03 17:33:33 +02:00
parent ccdc330bf5
commit 158dab60bc
+16 -6
View File
@@ -115,12 +115,22 @@ const SettingsSection: React.FC = () => {
className="w-full h-2 bg-saturn-border rounded-lg appearance-none cursor-pointer accent-saturn-accent" className="w-full h-2 bg-saturn-border rounded-lg appearance-none cursor-pointer accent-saturn-accent"
/> />
<div className="flex justify-between text-[10px] text-saturn-text-secondary font-bold uppercase tracking-widest"> <div className="relative w-full mt-2 h-6">
<span>1 GB</span> {[1024, 4096, 8192, 12288, 16384].map((value) => {
<span>4 GB</span> const percent =
<span>8 GB</span> (((value - 1024) / (16384 - 1024)) * 100 - 50) * 0.97 +
<span>12 GB</span> 50;
<span>16 GB</span>
return (
<span
key={value}
className="absolute text-[10px] text-saturn-text-secondary font-bold uppercase tracking-widest -translate-x-1/2 whitespace-nowrap"
style={{ left: `${percent}%` }}
>
{value / 1024} GB
</span>
);
})}
</div> </div>
<div className="p-3 bg-blue-500/5 border border-blue-500/10 rounded-lg flex gap-3"> <div className="p-3 bg-blue-500/5 border border-blue-500/10 rounded-lg flex gap-3">