ci / ci (22, ubuntu-latest) (push) Canceled after 0s
文件床 - 新增 files/ 存储前缀与 media_type 索引列,图片、视频、文件三类资源独立 - 新增文件上传、列表、删除、批量删除接口,禁止 html/htm/svg - 支持公开直链与 Token 访问两种模式,后台可切换,直链强制附件下载 视频床 - 新增 videos/ 存储前缀与视频上传接口,单文件上限 500MB - 接入 ffmpeg 转码队列,并发数与单任务核心数可配,默认串行 - 五档转码质量:直接封装 / 速度 / 平衡 / 质量 / 压缩(压缩档可调码率比例) - 码率控制避免转码后体积反超源文件,音频跟随源音轨不放大不压缩 - 转码进度实时上报,成功后删除源文件,失败时保留源文件与可用链接 - 上传时自动抽帧生成封面,视频与封面各有独立链接 - 删除视频时中断转码并清理切片、封面与源文件 媒体库 - 图库、视频库、文件库三套独立统计,含趋势、占用与来源分布 - 统一筛选、多选、批量删除、批量标签、网格/列表切换,显示方式按类型分别记忆 - 视频详情对齐图片详情,视频库支持在线播放(hls.js,兼容回退原文件) 修复 - 清理无主的切片、封面与开发期遗留的 ffmpeg 进程 - 源文件按设计删除后,索引不再被启动孤儿清理误删 - 视频统计口径与列表一致,转码中的视频不计入统计 - 转码失败时回收已写入的部分切片,避免残留 - 设置页停用检查更新(与上游版本号已不对应) 其他 - Docker 镜像安装 ffmpeg - git remote 指向内网仓库
73 lines
1.8 KiB
Vue
73 lines
1.8 KiB
Vue
<script setup lang="ts">
|
|
import type { UploadMediaKind } from '~/composables/useUploadPreferences'
|
|
|
|
const props = withDefaults(defineProps<{
|
|
disabled?: boolean
|
|
/** 上传页类型:决定默认可选文件类型、粘贴支持与偏好面板内容 */
|
|
kind?: UploadMediaKind
|
|
title?: string
|
|
hint?: string
|
|
formats?: string
|
|
accept?: string
|
|
heroImage?: string
|
|
backgroundImage?: string
|
|
pasteEnabled?: boolean
|
|
}>(), {
|
|
kind: 'image'
|
|
})
|
|
|
|
const emit = defineEmits<{
|
|
upload: [files: File[]]
|
|
}>()
|
|
|
|
const flipped = ref(false)
|
|
|
|
const mediaKind = computed(() => (props.kind === 'file' ? 'any' : props.kind))
|
|
const pasteEnabled = computed(() => props.pasteEnabled ?? props.kind === 'image')
|
|
const defaultAccept = computed(() => {
|
|
if (props.kind === 'video') return 'video/*,.mp4,.webm,.mov,.mkv,.avi,.m4v'
|
|
if (props.kind === 'file') return ''
|
|
return undefined
|
|
})
|
|
const accept = computed(() => props.accept ?? defaultAccept.value)
|
|
|
|
function onOpenSettings() {
|
|
flipped.value = true
|
|
}
|
|
|
|
function onBack() {
|
|
flipped.value = false
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
class="upload-card-flip"
|
|
:class="{ 'is-flipped': flipped }"
|
|
>
|
|
<div class="upload-card-flip-inner">
|
|
<div class="upload-card-face upload-card-face--front">
|
|
<UploadCard
|
|
:disabled="disabled"
|
|
:title="title"
|
|
:hint="hint"
|
|
:formats="formats"
|
|
:accept="accept"
|
|
:hero-image="heroImage"
|
|
:background-image="backgroundImage"
|
|
:media-kind="mediaKind"
|
|
:paste-enabled="pasteEnabled"
|
|
@upload="emit('upload', $event)"
|
|
@open-settings="onOpenSettings"
|
|
/>
|
|
</div>
|
|
<div class="upload-card-face upload-card-face--back">
|
|
<UploadPreferencesPanel
|
|
:kind="kind"
|
|
@back="onBack"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|