Make the disk space meter visible and show used percent.
Use an inline-colored full-width progress bar so the fill renders without relying on purged Tailwind classes.
This commit is contained in:
@@ -33,24 +33,6 @@ class DiskSpaceBar extends Component
|
||||
return $this->disk !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Progress fill color based on remaining free space.
|
||||
*/
|
||||
public function barColor(): string
|
||||
{
|
||||
$freePercent = $this->disk['free_percent'] ?? 100;
|
||||
|
||||
if ($freePercent <= 5) {
|
||||
return 'bg-red-600';
|
||||
}
|
||||
|
||||
if ($freePercent <= 15) {
|
||||
return 'bg-amber-500';
|
||||
}
|
||||
|
||||
return 'bg-teal-600';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the view / contents that represent the component.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user