加入保险箱已用空间
不再是原来的0B 前端一丁点的修改
This commit is contained in:
parent
abda4fdcc0
commit
6b4e54aff3
@ -103,8 +103,8 @@ class HomeController extends Controller
|
|||||||
$rawType = is_file($absolutePath) ? mime_content_type($absolutePath) : null;
|
$rawType = is_file($absolutePath) ? mime_content_type($absolutePath) : null;
|
||||||
$directoryContents[$key] = ['name' => $item, 'type' => $type, 'lastModified' => $lastModified, 'size' => $size, 'rawType' => $rawType];
|
$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);
|
$usedSpace = FileSizeHelper::getUserHomeDirSize();
|
||||||
$vaultUsedSpace = 0; // 保险箱已用空间,暂时为0
|
$vaultUsedSpace = FileSizeHelper::getUserVaultDirSize();
|
||||||
$storageLimit = $model->storage_limit;
|
$storageLimit = $model->storage_limit;
|
||||||
return $this->render('index', [
|
return $this->render('index', [
|
||||||
'directoryContents' => $directoryContents,
|
'directoryContents' => $directoryContents,
|
||||||
|
@ -80,7 +80,7 @@ $this->registerCssFile('@web/css/home_style.css');
|
|||||||
</div>
|
</div>
|
||||||
<button type="button" class="btn btn-primary" data-bs-toggle="popover" data-bs-title="容量使用情况"
|
<button type="button" class="btn btn-primary" data-bs-toggle="popover" data-bs-title="容量使用情况"
|
||||||
data-bs-placement="bottom"
|
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
|
<i
|
||||||
class="fa-solid fa-info"></i>
|
class="fa-solid fa-info"></i>
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
Reference in New Issue
Block a user