V 1.1 Beta

This commit is contained in:
MakingCG
2020-03-11 10:36:10 +01:00
parent 3285a7e1c2
commit 2deca027cd
33 changed files with 837 additions and 1148 deletions
+12 -2
View File
@@ -73,7 +73,6 @@ function make_single_input($request)
*/
function format_gigabytes($megabytes)
{
return Metric::megabytes($megabytes)->format();
}
@@ -86,7 +85,6 @@ function format_gigabytes($megabytes)
*/
function get_storage_fill_percentage($used, $capacity)
{
// Format gigabytes to bytes
$total = intval(Metric::megabytes($capacity)->numberOfBytes());
@@ -97,6 +95,18 @@ function get_storage_fill_percentage($used, $capacity)
return number_format((float)$progress, 2, '.', '');
}
/**
* Get user capacity fill percentage
*
* @return string
*/
function user_storage_percentage() {
$user = \Illuminate\Support\Facades\Auth::user();
return get_storage_fill_percentage($user->used_capacity, config('vuefilemanager.user_storage_capacity'));
}
/**
* Find all key values in recursive array
*