feat: 完善媒体管理与备份迁移流程
- 视频上传生成缩略图并提供占位封面和失败原因展示 - 支持 HLS 按需重新封装 MP4,并限制临时文件生命周期与访问权限 - 完善视频、文件 API 文档、搜索、批量删除和单次转码质量参数 - 修复备份恢复与跨后端迁移遗漏缩略图、HLS 清单和分片的问题 - 将备份任务、归档和下载权限按用户隔离 - 增加仅清理当前用户数据的高危存储清空流程和二次文字确认 - 修复 S3 中文文件名元数据及 CLI 数据库连接问题 - 补充备份恢复、用户隔离、媒体资源和转码相关测试
This commit is contained in:
1 parent
9ebab8270c
commit
a64be50b73
60 files changed
+2703
-325
No files matched your search
@@ -20,6 +20,17 @@ const deleteOpen = ref(false)
|
||||
const deleteTarget = ref<StorageBackendItem | null>(null)
|
||||
const deleteConfirmName = ref('')
|
||||
const deleting = ref(false)
|
||||
const clearStorageOpen = ref(false)
|
||||
const backupPanelKey = ref(0)
|
||||
|
||||
function openClearStorage() {
|
||||
clearStorageOpen.value = true
|
||||
}
|
||||
|
||||
function handleStorageCleared() {
|
||||
backupPanelKey.value += 1
|
||||
void loadStorage()
|
||||
}
|
||||
|
||||
const backupPanelRef = ref<{ applySyncDraft: (draft: { fromBackendId: string, toBackendId: string }) => void } | null>(null)
|
||||
|
||||
@@ -389,11 +400,36 @@ watch(isAuthenticated, async (authed) => {
|
||||
|
||||
<StorageBackupPanel
|
||||
v-if="!storageData.envOverride"
|
||||
:key="backupPanelKey"
|
||||
ref="backupPanelRef"
|
||||
:backends="storageData.backends"
|
||||
/>
|
||||
|
||||
<StorageSupportedBackends />
|
||||
|
||||
<section class="rounded-2xl border border-error/30 bg-error/5 p-5 sm:p-6">
|
||||
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
||||
<div class="min-w-0">
|
||||
<h2 class="flex items-center gap-2 text-base font-semibold text-error">
|
||||
<UIcon
|
||||
name="i-lucide-trash-2"
|
||||
class="size-5"
|
||||
/>
|
||||
{{ t('storage.clearStorageTitle') }}
|
||||
</h2>
|
||||
<p class="mt-1 text-sm leading-relaxed text-muted">
|
||||
{{ t('storage.clearStorageDescription') }}
|
||||
</p>
|
||||
</div>
|
||||
<UButton
|
||||
:label="t('storage.clearStorage')"
|
||||
icon="i-lucide-trash-2"
|
||||
color="error"
|
||||
class="shrink-0"
|
||||
@click="openClearStorage"
|
||||
/>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
</section>
|
||||
</AppShell>
|
||||
@@ -447,5 +483,10 @@ watch(isAuthenticated, async (authed) => {
|
||||
</div>
|
||||
</template>
|
||||
</UModal>
|
||||
|
||||
<ClearStorageModal
|
||||
v-model:open="clearStorageOpen"
|
||||
@cleared="handleStorageCleared"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
Reference in new issue
Block a user