fix(duplication): 恢复constants.ts中被误删的共享常量
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 26s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m1s
CI/CD Pipeline / Validate - Type Check (mypy) (pull_request) Successful in 1m27s
CI/CD Pipeline / Validate - Migration (alembic) (pull_request) Successful in 1m33s
CI/CD Pipeline / Validate - Code Quality (pull_request) Failing after 3m6s
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m18s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Failing after 45s
Preview Deploy / Deploy Preview Environment (pull_request) Successful in 1m28s
CI/CD Pipeline / PR Build Web Image (pull_request) Successful in 2m9s
CI/CD Pipeline / PR Build Worker Image (pull_request) Successful in 2m3s
AI Code Review / AI Code Review (pull_request) Successful in 2m51s
CI/CD Pipeline / PR Build API Image (pull_request) Successful in 7m14s
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 9m23s
CI/CD Pipeline / Production Browser E2E (pull_request) Failing after 1202h17m41s
CI/CD Pipeline / Staging API Integration Tests (pull_request) Failing after 1202h17m43s
CI/CD Pipeline / Staging E2E Tests (pull_request) Failing after 1202h17m45s
CI/CD Pipeline / Deploy Production (pull_request) Failing after 1202h22m47s
CI/CD Pipeline / Integration Tests (pull_request) Failing after 1202h22m49s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Failing after 1202h23m6s
CI/CD Pipeline / Build Production Worker Image (pull_request) Failing after 1202h24m44s
CI/CD Pipeline / Unit Tests (pull_request) Failing after 1202h25m24s
CI/CD Pipeline / Build Production Web Image (pull_request) Failing after 1202h24m44s
CI/CD Pipeline / Build Staging Worker Image (pull_request) Failing after 1202h26m4s
CI/CD Pipeline / Build Staging Web Image (pull_request) Failing after 1202h26m4s
CI/CD Pipeline / Build Staging API Image (pull_request) Failing after 1202h26m5s
CI/CD Pipeline / ACR Image Cleanup (pull_request) Failing after 1202h50m40s
CI/CD Pipeline / Build Production API Image (pull_request) Failing after 1202h57m43s

This commit is contained in:
2026-07-28 12:56:17 +08:00
parent 8682391379
commit cea91e7779
@@ -1,3 +1,56 @@
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"]