mirror of
https://github.com/fankes/beszel.git
synced 2025-10-18 17:29:28 +08:00
updates
This commit is contained in:
@@ -17,7 +17,7 @@ export function Home() {
|
||||
setSystems((curSystems) => {
|
||||
const i = curSystems.findIndex((s) => s.id === e.record.id)
|
||||
if (i > -1) {
|
||||
const newSystems = [...systems]
|
||||
const newSystems = [...curSystems]
|
||||
newSystems[i] = e.record
|
||||
return newSystems
|
||||
} else {
|
||||
|
@@ -27,13 +27,13 @@ function CellFormatter(info: CellContext<SystemRecord, unknown>) {
|
||||
}
|
||||
return (
|
||||
<div class="flex gap-2 items-center">
|
||||
<span>{val.toFixed(2)}%</span>
|
||||
<span class="grow block bg-secondary h-4 relative rounded-sm overflow-hidden">
|
||||
<span
|
||||
className="absolute inset-0 w-full h-full origin-left"
|
||||
className="absolute inset-0 w-full h-full origin-left transition-all duration-500 ease-in-out"
|
||||
style={{ transform: `scalex(${val}%)`, background }}
|
||||
></span>
|
||||
</span>
|
||||
<span class="w-14">{val.toFixed(2)}%</span>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user