This commit is contained in:
Michael Freno
2026-02-04 00:06:16 -05:00
parent f08afb2ed1
commit 7b5c256e07
38 changed files with 933 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
type SyncProgressProps = {
value: number
}
export function SyncProgress(props: SyncProgressProps) {
const width = 30
let filled = (props.value / 100) * width
filled = filled >= 0 ? filled : 0
filled = filled <= width ? filled : width
filled = filled | 0
if (filled < 0) filled = 0
if (filled > width) filled = width
let bar = ""
for (let i = 0; i < width; i += 1) {
bar += i < filled ? "#" : "-"
}
return (
<box style={{ flexDirection: "column" }}>
<text>{bar}</text>
<text>{props.value}%</text>
</box>
)
}