|
|
|
@ -14,8 +14,7 @@ export default function Disk({ options }) {
|
|
|
|
|
<div className="flex-none flex flex-row items-center justify-center">
|
|
|
|
|
<BiError className="text-theme-800 dark:text-theme-200 w-5 h-5" />
|
|
|
|
|
<div className="flex flex-col ml-3 text-left font-mono">
|
|
|
|
|
<span className="text-theme-800 dark:text-theme-200 text-xs">Resources</span>
|
|
|
|
|
<span className="text-theme-800 dark:text-theme-200 text-xs">Error</span>
|
|
|
|
|
<span className="text-theme-800 dark:text-theme-200 text-xs">API Error</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
@ -26,23 +25,32 @@ export default function Disk({ options }) {
|
|
|
|
|
<div className="flex-none flex flex-row items-center justify-center">
|
|
|
|
|
<FiHardDrive className="text-theme-800 dark:text-theme-200 w-5 h-5" />
|
|
|
|
|
<div className="flex flex-col ml-3 text-left font-mono">
|
|
|
|
|
<span className="text-theme-800 dark:text-theme-200 text-xs">- Free</span>
|
|
|
|
|
<span className="text-theme-800 dark:text-theme-200 text-xs">- Used</span>
|
|
|
|
|
<span className="text-theme-800 dark:text-theme-200 text-xs">-</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const percent = Math.round((data.drive.usedGb / data.drive.totalGb) * 100);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex-none flex flex-row items-center justify-center">
|
|
|
|
|
<div className="flex-none flex flex-row items-center justify-center group">
|
|
|
|
|
<FiHardDrive className="text-theme-800 dark:text-theme-200 w-5 h-5" />
|
|
|
|
|
<div className="flex flex-col ml-3 text-left font-mono">
|
|
|
|
|
<span className="text-theme-800 dark:text-theme-200 text-xs">
|
|
|
|
|
{formatBytes(data.drive.freeGb * 1024 * 1024 * 1024)} Free
|
|
|
|
|
<div className="flex flex-col ml-3 text-left font-mono ">
|
|
|
|
|
<span className="text-theme-800 dark:text-theme-200 text-xs group-hover:hidden">
|
|
|
|
|
{formatBytes(data.drive.freeGb * 1024 * 1024 * 1024, 0)} Free
|
|
|
|
|
</span>
|
|
|
|
|
<span className="text-theme-800 dark:text-theme-200 text-xs">
|
|
|
|
|
{formatBytes(data.drive.usedGb * 1024 * 1024 * 1024)} Used
|
|
|
|
|
<span className="text-theme-800 dark:text-theme-200 text-xs hidden group-hover:block">
|
|
|
|
|
{formatBytes(data.drive.totalGb * 1024 * 1024 * 1024, 0)} Total
|
|
|
|
|
</span>
|
|
|
|
|
<div className="w-full bg-gray-200 rounded-full h-1 dark:bg-gray-700">
|
|
|
|
|
<div
|
|
|
|
|
className="bg-theme-600 h-1 rounded-full dark:bg-theme-500"
|
|
|
|
|
style={{
|
|
|
|
|
width: `${percent}%`,
|
|
|
|
|
}}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|