加入保险箱已用空间

不再是原来的0B
前端一丁点的修改
This commit is contained in:
Chenx221 2024-03-10 16:38:39 +08:00
parent abda4fdcc0
commit 6b4e54aff3
Signed by: chenx221
GPG Key ID: D7A9EC07024C3021
2 changed files with 3 additions and 3 deletions

View File

@ -103,8 +103,8 @@ class HomeController extends Controller
$rawType = is_file($absolutePath) ? mime_content_type($absolutePath) : null;
$directoryContents[$key] = ['name' => $item, 'type' => $type, 'lastModified' => $lastModified, 'size' => $size, 'rawType' => $rawType];
}
$usedSpace = FileSizeHelper::getDirectorySize(Yii::getAlias(Yii::$app->params['dataDirectory']) . '/' . Yii::$app->user->id);
$vaultUsedSpace = 0; // 保险箱已用空间暂时为0
$usedSpace = FileSizeHelper::getUserHomeDirSize();
$vaultUsedSpace = FileSizeHelper::getUserVaultDirSize();
$storageLimit = $model->storage_limit;
return $this->render('index', [
'directoryContents' => $directoryContents,

View File

@ -80,7 +80,7 @@ $this->registerCssFile('@web/css/home_style.css');
</div>
<button type="button" class="btn btn-primary" data-bs-toggle="popover" data-bs-title="容量使用情况"
data-bs-placement="bottom"
data-bs-content="已用:<?= $totalUsed_F ?>/ <?= $storageLimit_F ?><?= $freeSpace == 'unlimited' ? '' : ($freeSpace <= 0 ? ' 容量超限' : '') ?>">
data-bs-content="已用:<?= $totalUsed_F ?>/ <?= $storageLimit_F ?><?= $freeSpace == 'unlimited' ? '' : ($freeSpace <= 0 ? ' 容量超限,功能受限' : '') ?>">
<i
class="fa-solid fa-info"></i>
</button>