title = '文件保险箱'; $this->params['breadcrumbs'][] = $this->title; $totalUsed_F = FileSizeHelper::formatBytes($usedSpace + $vaultUsedSpace); //总已用空间 格式化文本 $storageLimit_F = FileSizeHelper::formatMegaBytes($storageLimit); //存储限制 格式化文本 $is_unlimited = ($storageLimit === -1); //检查是否为无限制容量 $usedPercent = $is_unlimited ? 0 : round($usedSpace / ($storageLimit * 1024 * 1024) * 100); //网盘已用百分比 $vaultUsedPercent = $is_unlimited ? 0 : round($vaultUsedSpace / ($storageLimit * 1024 * 1024) * 100); //保险箱已用百分比 $totalUsedPercent = min(($usedPercent + $vaultUsedPercent), 100); //总已用百分比 $freeSpace = $is_unlimited ? 'unlimited' : ($storageLimit * 1024 * 1024 - $usedSpace - $vaultUsedSpace); //剩余空间 FontAwesomeAsset::register($this); JqueryAsset::register($this); $this->registerCssFile('@web/css/home_style.css'); ?>
名称 | 最近修改时间 | 大小 | 操作 | |
---|---|---|---|---|
= Html::tag('i', '', ['class' => $item['type'] . ' file_icon']) ?> $relativePath], ['class' => 'file_name']) ?> = Html::beginTag('span', ['class' => 'file_name']) ?> = $item['name'] ?> = Html::endTag('span') ?> | = date('Y-m-d H:i:s', $item['lastModified']) ?> | = $item['size'] !== null ? Yii::$app->formatter->asShortSize($item['size'], 2) : '' ?> | = Html::button(Html::tag('i', '', ['class' => 'fa-regular fa-circle-down']), [ 'value' => Url::to(['vault/download', 'relativePath' => $relativePath]), 'class' => 'btn btn-outline-primary download-btn', 'data-bs-toggle' => 'tooltip', 'data-bs-placement' => 'top', 'data-bs-title' => '下载', 'data-filename' => $item['name'], ]) ?> = Html::button(Html::tag('i', '', ['class' => 'fa-regular fa-trash-can']), ['value' => $relativePath, 'class' => 'btn btn-outline-danger delete-btn', 'data-bs-toggle' => 'tooltip', 'data-bs-placement' => 'top', 'data-bs-title' => '删除']) ?> |