feat(admin): 转码设置页新增立即补齐转码按钮
This commit is contained in:
1 parent
d7d43fed44
commit
e51d371e07
7 files changed
+86
-5
No files matched your search
@@ -13,7 +13,11 @@ import {
|
||||
positiveEvenRule,
|
||||
positiveIntegerRule
|
||||
} from './transcodeProfileRules'
|
||||
import { loadTranscodeProfile, saveTranscodeProfile } from './transcodeSettingsActions'
|
||||
import {
|
||||
loadTranscodeProfile,
|
||||
runTranscodeBackfill,
|
||||
saveTranscodeProfile
|
||||
} from './transcodeSettingsActions'
|
||||
|
||||
/** 转码设置页的响应式状态与动作装配。 */
|
||||
export function useTranscodeSettings() {
|
||||
@@ -22,10 +26,11 @@ export function useTranscodeSettings() {
|
||||
const formRef = ref<FormInstance>()
|
||||
const loading = ref(false)
|
||||
const saving = ref(false)
|
||||
const backfilling = ref(false)
|
||||
const loadError = ref('')
|
||||
const form = reactive<MediaTranscodeProfile>(defaultProfile())
|
||||
const canManage = computed(() => can('episode:upload'))
|
||||
const context = { form, formRef, loading, saving, loadError, canManage, t }
|
||||
const context = { form, formRef, loading, saving, backfilling, loadError, canManage, t }
|
||||
const rules = computed(() => createProfileRules(t))
|
||||
const enabledRules = computed(() => createEnabledRules(form, t))
|
||||
const qualityRules = (index: number) => createQualityRules(form, index, t)
|
||||
@@ -50,6 +55,7 @@ export function useTranscodeSettings() {
|
||||
rules,
|
||||
loading,
|
||||
saving,
|
||||
backfilling,
|
||||
loadError,
|
||||
canManage,
|
||||
qualityRules,
|
||||
@@ -59,6 +65,7 @@ export function useTranscodeSettings() {
|
||||
loadProfile,
|
||||
addRung,
|
||||
deleteRung,
|
||||
saveProfile
|
||||
saveProfile,
|
||||
runBackfill: () => runTranscodeBackfill(context)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user