fork/gdu

git clone https://git.julia.blue/fork/gdu

Daniel Mildefeat: add web UI (#617)d672bf4

subvolume
657 B23 linesraw
1import type { Progress } from '../types';
2import { formatCount, formatSize } from '../format';
3
4interface ProgressBarProps {
5  progress: Progress;
6  useSIPrefix: boolean;
7}
8
9export function ProgressBar({ progress, useSIPrefix }: ProgressBarProps) {
10  return (
11    <div className="scanning">
12      <div className="spinner" />
13      <h2>Scanning…</h2>
14      <div className="scan-stats">
15        <span>{formatCount(progress.itemCount)} items</span>
16        <span>{formatSize(progress.totalUsage, useSIPrefix)}</span>
17      </div>
18      <div className="scan-current" title={progress.currentItem}>
19        {progress.currentItem}
20      </div>
21    </div>
22  );
23}