mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-24 18:00:40 +00:00
V 1.1 Beta
This commit is contained in:
+12
-2
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user