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