summaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/Controller/ViewController.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index f7a4318e595..fc59622af89 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -174,6 +174,17 @@ class ViewController extends Controller {
});
$nav->assign('navigationItems', $navItems);
+
+ $nav->assign('usage', \OC_Helper::humanFileSize($storageInfo['used']));
+ if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) {
+ $totalSpace = $this->l10n->t('Unlimited');
+ } else {
+ $totalSpace = \OC_Helper::humanFileSize($storageInfo['total']);
+ }
+ $nav->assign('total_space', $totalSpace);
+ $nav->assign('quota', $storageInfo['quota']);
+ $nav->assign('usage_relative', $storageInfo['relative']);
+
$contentItems = [];
// render the container content for every navigation item