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'); ?>

title) ?>

'btn btn-outline-primary single-download-btn']) ?> 'btn btn-outline-danger batch-delete-btn']) ?> 'btn btn-outline-primary refresh-btn']) ?>
0, 'barOptions' => ['class' => ['bg-success', 'progress-bar-animated', 'progress-bar-striped']], 'label' => '123', //NMD 不是说可选吗 'options' => ['style' => 'display: none;margin-top: 10px;', 'id' => 'progress-bar'] ]); ?> user->id . '.secret/' . $relativePath; ?>
名称 最近修改时间 大小 操作
$item['type'] . ' file_icon']) ?> $relativePath], ['class' => 'file_name']) ?> 'file_name']) ?> formatter->asShortSize($item['size'], 2) : '' ?> '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'], ]) ?> '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' => '删除']) ?>
'

确认删除

', 'id' => 'deleteModal', 'size' => 'modal-sm', ]); echo Html::tag('div', '你确定要删除这个文件吗?', ['class' => 'modal-body']); echo Html::beginForm(['vault/delete'], 'post', ['id' => 'delete-form']); echo Html::hiddenInput('relativePath', '', ['id' => 'deleteRelativePath']); echo Html::submitButton('确认', ['class' => 'btn btn-danger']); echo Html::endForm(); Modal::end(); $this->registerJsFile('@web/js/vault_script.js', ['depends' => [JqueryAsset::class], 'position' => View::POS_END]); $this->registerJsFile('@web/js/vault_core.js', ['position' => View::POS_END]); ?>