mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-17 15:52:15 +00:00
- Zero capacity storage
- Set 0 storage capacity after creating order
This commit is contained in:
@@ -400,7 +400,11 @@ function get_storage_fill_percentage($used, $capacity)
|
||||
$total = intval(Metric::gigabytes($capacity)->numberOfBytes());
|
||||
|
||||
// Count progress
|
||||
$progress = ($used * 100) / $total;
|
||||
if ($total == 0) {
|
||||
$progress = 100;
|
||||
} else {
|
||||
$progress = ($used * 100) / $total;
|
||||
}
|
||||
|
||||
// Return in 2 decimal
|
||||
return number_format((float)$progress, 2, '.', '');
|
||||
@@ -409,6 +413,8 @@ function get_storage_fill_percentage($used, $capacity)
|
||||
/**
|
||||
* Get user capacity fill by percentage
|
||||
*
|
||||
* @param $id
|
||||
* @param null $additionals
|
||||
* @return string
|
||||
*/
|
||||
function user_storage_percentage($id, $additionals = null)
|
||||
|
||||
@@ -44,14 +44,20 @@
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="cell-item">
|
||||
<span v-if="row.data.attributes.storage.capacity !== 0" class="cell-item">
|
||||
{{ row.data.attributes.storage.used_formatted }}
|
||||
</span>
|
||||
<span v-if="row.data.attributes.storage.capacity == 0" class="cell-item">
|
||||
-
|
||||
</span>
|
||||
</td>
|
||||
<td v-if="config.storageLimit">
|
||||
<span class="cell-item">
|
||||
<span v-if="row.data.attributes.storage.capacity !== 0" class="cell-item">
|
||||
{{ row.data.attributes.storage.capacity_formatted }}
|
||||
</span>
|
||||
<span v-if="row.data.attributes.storage.capacity == 0" class="cell-item">
|
||||
-
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="cell-item">
|
||||
|
||||
Reference in New Issue
Block a user