Files
memind/src/utils/feedbackLabels.ts
T
john 18ea4f82fd feat(feedback): 新增用户反馈提交、分页列表与语音描述
支持 Bug/需求提交、截图与聊天同款语音输入,全站反馈分页浏览与详情页,并从聊天与空间页提供入口。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-29 20:49:15 +08:00

29 lines
796 B
TypeScript

import type { FeedbackSubmission, FeedbackSubmissionType } from '../types';
export const FEEDBACK_TYPE_LABELS: Record<FeedbackSubmissionType, string> = {
bug: 'Bug',
feature: '需求',
other: '其他',
};
export const FEEDBACK_STATUS_LABELS: Record<FeedbackSubmission['status'], string> = {
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}`;
}