import type { FeedbackSubmission, FeedbackSubmissionType } from '../types'; export const FEEDBACK_TYPE_LABELS: Record = { bug: 'Bug', feature: '需求', other: '其他', }; export const FEEDBACK_STATUS_LABELS: Record = { pending: '待处理', reviewing: '处理中', resolved: '已解决', closed: '已关闭', }; export function formatFeedbackTime(timestamp: number) { return new Date(timestamp).toLocaleString('zh-CN', { year: 'numeric', month: '2-digit', day: '2-digit', hour: '2-digit', minute: '2-digit', }); } export function feedbackImageDataUrl(image: { mimeType: string; dataBase64: string }) { return `data:${image.mimeType || 'image/jpeg'};base64,${image.dataBase64}`; }