07d9b56fe7
CI/CD Pipeline / Check if frontend-only change (push) Has been cancelled
CI/CD Pipeline / Validate - Code Quality (push) Has been cancelled
CI/CD Pipeline / Validate - Type Check (mypy) (push) Has been cancelled
CI/CD Pipeline / Validate - Migration (alembic) (push) Has been cancelled
CI/CD Pipeline / Unit Tests (push) Has been cancelled
CI/CD Pipeline / Integration Tests (push) Has been cancelled
CI/CD Pipeline / Frontend Lint (push) Has been cancelled
CI/CD Pipeline / Frontend Unit Tests (push) Has been cancelled
CI/CD Pipeline / PR Build API Image (push) Has been cancelled
CI/CD Pipeline / PR Build Web Image (push) Has been cancelled
CI/CD Pipeline / PR Build Worker Image (push) Has been cancelled
CI/CD Pipeline / Build Staging API Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Web Image (push) Has been cancelled
CI/CD Pipeline / Build Staging Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Has been cancelled
CI/CD Pipeline / Staging E2E Tests (push) Has been cancelled
CI/CD Pipeline / Staging API Integration Tests (push) Has been cancelled
CI/CD Pipeline / Build Production API Image (push) Has been cancelled
CI/CD Pipeline / Build Production Web Image (push) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (push) Has been cancelled
CI/CD Pipeline / Deploy Production (push) Has been cancelled
CI/CD Pipeline / Production Browser E2E (push) Has been cancelled
CI/CD Pipeline / ACR Image Cleanup (push) Has been cancelled
CI/CD Pipeline / Canary Release to Production (push) Has been cancelled
CI/CD Pipeline / CI Gate (push) Has been cancelled
65 lines
1.9 KiB
TypeScript
Executable File
65 lines
1.9 KiB
TypeScript
Executable File
import type { DuplicationStatus } from "@/api/duplication"
|
|
import type { RiskFilter } from "./types"
|
|
|
|
/** 状态配置 */
|
|
export const STATUS_CONFIG: Record<
|
|
DuplicationStatus,
|
|
{
|
|
variant: "primary" | "warning" | "success" | "error"
|
|
text: string
|
|
icon: string
|
|
}
|
|
> = {
|
|
pending: { variant: "primary", text: "等待中", icon: "⏳" },
|
|
processing: { variant: "warning", text: "查重中", icon: "🔄" },
|
|
completed: { variant: "success", text: "已完成", icon: "✅" },
|
|
failed: { variant: "error", text: "失败", icon: "❌" },
|
|
}
|
|
|
|
/** 风险等级描述 */
|
|
export const RISK_DESC: Record<string, string> = {
|
|
low: "查重率较低,内容原创度高",
|
|
medium: "存在一定重复,建议修改部分片段",
|
|
high: "重复率较高,建议大幅修改或替换",
|
|
}
|
|
|
|
/** 风险等级标签变体 */
|
|
export const RISK_TAG_VARIANT: Record<string, "success" | "warning" | "error"> = {
|
|
low: "success",
|
|
medium: "warning",
|
|
high: "error",
|
|
}
|
|
|
|
/** 风险等级文字(详情页用) */
|
|
export const RISK_LABEL: Record<string, string> = {
|
|
low: "低风险",
|
|
medium: "中风险",
|
|
high: "高风险",
|
|
}
|
|
|
|
/** 风险等级标签(列表页用) */
|
|
export const RISK_LABELS: Record<string, string> = {
|
|
low: "低风险",
|
|
medium: "中风险",
|
|
high: "高风险",
|
|
}
|
|
|
|
export const FILTER_OPTIONS: { key: RiskFilter; label: string }[] = [
|
|
{ key: "all", label: "全部" },
|
|
{ key: "low", label: "低风险" },
|
|
{ key: "medium", label: "中风险" },
|
|
{ key: "high", label: "高风险" },
|
|
]
|
|
|
|
/** 支持的视频格式 */
|
|
export const ACCEPT_FORMATS = ".mp4,.avi,.mov,.mkv,.wmv,.flv,.webm"
|
|
export const FORMAT_LIST = ["MP4", "AVI", "MOV", "MKV", "WMV", "FLV", "WebM"]
|
|
/** 最大文件大小:2GB */
|
|
export const MAX_FILE_SIZE = 2 * 1024 * 1024 * 1024
|
|
|
|
/** 简易 toast */
|
|
export interface ToastState {
|
|
message: string
|
|
type: "success" | "error" | "warning"
|
|
}
|