fix(admin): 转码面板展示实时进度与更新时间
This commit is contained in:
1 parent
0d5d0d841f
commit
9b2ab1a425
6 files changed
+67
No files matched your search
@@ -311,6 +311,7 @@ export interface EpisodeTranscodeItem {
|
||||
progress?: number
|
||||
retryCount?: number
|
||||
errorMsg?: string
|
||||
updatedAt?: string
|
||||
renditions: MediaRenditionItem[]
|
||||
thumbnails?: MediaThumbnailResult | null
|
||||
}
|
||||
|
||||
@@ -535,6 +535,8 @@ export default {
|
||||
statusLabel: 'Status',
|
||||
progress: 'Progress',
|
||||
retryCount: 'Retries',
|
||||
updatedAt: 'Last updated',
|
||||
waitingProgress: 'Processing (waiting for progress report)',
|
||||
reprocess: 'Transcode again',
|
||||
reprocessing: 'Submitting',
|
||||
triggerSuccess: 'Transcode task submitted',
|
||||
|
||||
@@ -529,6 +529,8 @@ export default {
|
||||
statusLabel: '状态',
|
||||
progress: '进度',
|
||||
retryCount: '重试次数',
|
||||
updatedAt: '最近更新',
|
||||
waitingProgress: '处理中(等待进度上报)',
|
||||
reprocess: '重新转码',
|
||||
reprocessing: '正在触发',
|
||||
triggerSuccess: '已提交转码任务',
|
||||
|
||||
@@ -6,6 +6,7 @@ import type { EpisodeTranscodeItem } from '@/api/admin/types'
|
||||
import { AppIcon } from '@/components/AppIcon'
|
||||
import { AppIcons } from '@/constants/icons'
|
||||
import { useI18n } from '@/hooks/web/useI18n'
|
||||
import { formatDateTime } from '@/utils/format'
|
||||
import type { TranscodeProgressStatus, TranscodeTagType } from './episodeTranscodeUi'
|
||||
|
||||
interface StatusView {
|
||||
@@ -64,6 +65,10 @@ const { t } = useI18n()
|
||||
<span>{{ t('episodeTranscode.retryCount') }}</span>
|
||||
<b>{{ detail.retryCount || 0 }}</b>
|
||||
</div>
|
||||
<div class="episode-transcode-status__metric">
|
||||
<span>{{ t('episodeTranscode.updatedAt') }}</span>
|
||||
<b>{{ formatDateTime(detail.updatedAt) }}</b>
|
||||
</div>
|
||||
<el-button
|
||||
class="episode-transcode-status__retry"
|
||||
type="primary"
|
||||
@@ -84,6 +89,9 @@ const { t } = useI18n()
|
||||
:status="view.progressStatus"
|
||||
:stroke-width="8"
|
||||
/>
|
||||
<p v-if="view.isProcessing && view.progress === 0" class="episode-transcode-status__waiting">
|
||||
{{ t('episodeTranscode.waitingProgress') }}
|
||||
</p>
|
||||
<el-alert
|
||||
v-if="detail.errorMsg"
|
||||
class="episode-transcode-status__error-alert"
|
||||
@@ -138,6 +146,12 @@ const { t } = useI18n()
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.episode-transcode-status__waiting {
|
||||
margin: 8px 0 0;
|
||||
font-size: 12px;
|
||||
color: var(--el-color-warning);
|
||||
}
|
||||
|
||||
.episode-transcode-status__error-alert {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user