Browse Source

Show used space in mb instead of %

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
tags/v17.0.0beta1
Daniel Kesselberg 5 years ago
parent
commit
d059ee34a0
No account linked to committer's email address

+ 1
- 1
apps/files/lib/Controller/ViewController.php View File

@@ -227,7 +227,7 @@ class ViewController extends Controller {

$nav->assign('navigationItems', $navItems);

$nav->assign('usage', \OC_Helper::humanFileSize($storageInfo['used']));
$nav->assign('usage', \OC_Helper::humanFileSize(ceil($storageInfo['used'] / 102400) * 102400));
if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) {
$totalSpace = $this->l10n->t('Unlimited');
} else {

+ 2
- 2
apps/files/templates/appnavigation.php View File

@@ -17,9 +17,9 @@
</li>
<?php else: ?>
<li id="quota" class="has-tooltip pinned <?php p($pinned === 0 ? 'first-pinned ' : '') ?>"
title="<?php p($_['usage_relative'] . '%, '); p($l->t('%s of %s used', [$_['usage'], $_['total_space']])); ?>">
title="<?php p($l->t('%s (%s%%) of %s used', [$_['usage'], $_['usage_relative'], $_['total_space']])); ?>">
<a href="#" class="icon-quota svg">
<p id="quotatext"><?php p($l->t('%1$s%% of %2$s used', [round($_['usage_relative'], 1), $_['total_space']])); ?></p>
<p id="quotatext"><?php p($l->t('%1$s of %2$s used', [$_['usage'], $_['total_space']])); ?></p>
<div class="quota-container">
<progress value="<?php p($_['usage_relative']); ?>" max="100" class="<?= ($_['usage_relative'] > 80) ? 'warn' : '' ?>"></progress>
</div>

Loading…
Cancel
Save