// Types export interface Conversation { id: string; title: string; avatarEmoji: string; lastMessage: string; timestamp: string; unreadCount?: number; } export interface Message { id: string; conversationId: string; senderType: 'ai' | 'user'; contentType: 'text' | 'image' | 'audio'; content: string; timestamp: string; duration?: number; // for audio messages } export interface Chapter { id: string; number: number; title: string; status: 'complete' | 'partial' | 'pending'; pageCount?: number; content?: string; } export interface Memoir { id: string; title: string; subtitle: string; updatedAt: string; chapters: Chapter[]; } export interface UserProfile { id: string; nickname: string; avatarEmoji: string; planType: 'free' | 'premium'; planLabel: string; } export interface SettingItem { id: string; icon: string; label: string; description?: string; type: 'arrow' | 'toggle'; value?: boolean; } // Mock Conversations export const mockConversations: Conversation[] = [ { id: '1', title: '回忆录助手', avatarEmoji: '📖', lastMessage: '您想从哪里开始呢?可以聊聊童年...', timestamp: '刚刚', }, ]; // Mock Messages for conversation 1 export const mockMessages: Message[] = [ { id: 'm1', conversationId: '1', senderType: 'ai', contentType: 'text', content: '您好!我是您的回忆录助手,很高兴能陪您聊聊往事。😊\n\n您想从哪里开始呢?可以聊聊童年、上学时光,或者任何您想分享的故事。', timestamp: '14:30', }, ]; // AI response templates export const aiResponses: string[] = [ '这个故事真让人感动!😊 能再详细说说当时的场景吗?比如那时候是什么季节?', '听起来是一段珍贵的回忆呢!那个时候您多大年纪?身边有哪些人陪着您?', '太有画面感了!这件事对您的人生有什么特别的影响吗?', '我能感受到您讲述时的情感。这段经历中有没有什么特别难忘的细节?', '真是有意思的往事!那个年代的生活和现在很不一样吧?能说说当时的日常生活是什么样的吗?', '您的故事很生动!除了这件事,那个时期还有什么印象深刻的事情吗?', '这段记忆很宝贵呢。您有没有保留那个时候的照片或者物件?', '听您这么说,我仿佛也看到了当时的情景。后来这件事有什么后续吗?', '这是您人生中很重要的一段经历呢。您觉得它塑造了现在的您吗?', ]; // Get random AI response export const getRandomAIResponse = (): string => { return aiResponses[Math.floor(Math.random() * aiResponses.length)]; }; // Mock Memoir export const mockMemoir: Memoir = { id: '1', title: '这一生', subtitle: '我的回忆录', updatedAt: '2 分钟前', chapters: [ { id: 'c1', number: 1, title: '童年与家庭', status: 'complete', pageCount: 3, content: `我出生在一个普通的农村家庭,那是1955年的深秋。母亲常说,我出生的那天,院子里的老槐树落了一地金黄的叶子,风一吹,像是漫天飞舞的蝴蝶。 "日子虽然清苦,但那时候的快乐是最纯粹的。" 父亲是村里的木匠,手艺在十里八乡都有名气。他的手上满是老茧,却能用那双手雕出最精美的花纹。每到农闲时节,总有人家请他去做嫁妆,一张八仙桌,一对太师椅,都是他的拿手活计。 母亲是个勤快人,总是天不亮就起床,喂鸡、扫院子、生火做饭,一刻也闲不住。她不识字,但会唱很多老歌,夜里纳鞋底的时候,常常哼着小调,那旋律到现在我还记得。 我们家有三个孩子,我排行老二。大姐比我大三岁,小弟比我小五岁。那时候日子虽然清苦,但一家人在一起,总有说不完的话,笑不完的乐子。`, }, { id: 'c2', number: 2, title: '上学的日子', status: 'partial', pageCount: 2, content: `村里的小学离家有三里地,每天早上天刚亮,我就背着布书包出门了。书包是母亲用碎布拼的,虽然不好看,但结实耐用。 那时候的教室是土坯房,冬天冷得厉害,我们都自己带小板凳。老师姓李,是村里唯一的知识分子,写得一手好字。`, }, { id: 'c3', number: 3, title: '工作与事业', status: 'pending', }, { id: 'c4', number: 4, title: '爱情与婚姻', status: 'pending', }, ], }; // Mock User Profile export const mockUserProfile: UserProfile = { id: 'u1', nickname: '李明华', avatarEmoji: '👤', planType: 'free', planLabel: '免费体验版', }; // Settings Configuration export const settingsSections = { payment: { title: '套餐与付费', items: [ { id: 'upgrade', icon: 'layers-outline', label: '升级套餐', description: '解锁完整导出与更多功能', type: 'arrow' as const, }, { id: 'orders', icon: 'download-outline', label: '我的订单', type: 'arrow' as const, }, ], }, // privacy: { // title: '数据与隐私', // items: [ // { // id: 'export', // icon: 'cloud-upload-outline', // label: '导出所有数据', // type: 'arrow' as const, // }, // ], // }, // settings: { // title: '设置', // items: [ // { // id: 'speed', // icon: 'time-outline', // label: '语速', // description: '标准', // type: 'arrow' as const, // }, // { // id: 'largeFont', // icon: 'text-outline', // label: '大字模式', // type: 'toggle' as const, // value: false, // }, // { // id: 'darkMode', // icon: 'moon-outline', // label: '夜间模式', // type: 'toggle' as const, // value: false, // }, // ], // }, help: { title: '帮助', items: [ { id: 'faq', icon: 'help-circle-outline', label: '常见问题', type: 'arrow' as const, }, { id: 'feedback', icon: 'chatbubble-outline', label: '反馈与客服', type: 'arrow' as const, }, { id: 'about', icon: 'information-circle-outline', label: '关于我们', type: 'arrow' as const, }, ], }, }; // Helper function to format timestamp export const formatTimestamp = (date: Date): string => { const now = new Date(); const diff = now.getTime() - date.getTime(); const minutes = Math.floor(diff / 60000); const hours = Math.floor(diff / 3600000); const days = Math.floor(diff / 86400000); if (minutes < 1) return '刚刚'; if (minutes < 60) return `${minutes}分钟前`; if (hours < 24) return `${hours}小时前`; if (days < 7) return `${days}天前`; return date.toLocaleDateString('zh-CN'); }; // Helper function to get current time string export const getCurrentTimeString = (): string => { const now = new Date(); return `${now.getHours().toString().padStart(2, '0')}:${now.getMinutes().toString().padStart(2, '0')}`; };