feat(life): add community feed for user posts

Add life_posts schema and CRUD API endpoints
Implement LifeView with inline composer and feed display
This commit is contained in:
2026-05-01 21:03:09 +08:00
parent 49aae3bd7c
commit cd1891cc82
11 changed files with 680 additions and 2 deletions

View File

@@ -44,6 +44,7 @@ const messages = {
items: 'Items',
recipes: 'Recipes',
checklist: 'CheckList',
life: 'Life',
admin: 'Admin',
main: 'Main navigation',
language: 'Language',
@@ -220,6 +221,35 @@ const messages = {
newTask: 'New task',
editTask: 'Edit task'
},
life: {
title: 'Life',
subtitle: 'Share favourite thoughts, tips, and community finds.',
kicker: 'Community Feed',
composerTitle: 'Share something',
composerPrompt: 'What would you like to share?',
bodyLabel: 'Post',
bodyPlaceholder: 'Share a thought, tip, or discovery...',
publish: 'Post',
publishing: 'Posting',
update: 'Update',
updating: 'Updating',
cancelEdit: 'Cancel edit',
empty: 'No posts yet',
loading: 'Loading Life feed',
loginPrompt: 'Log in with a verified email to post.',
verifyPrompt: 'Complete email verification to post.',
editPost: 'Edit post',
deletePost: 'Delete post',
saveEdit: 'Save edit',
postFailed: 'Post failed',
saveFailed: 'Save failed',
deleteFailed: 'Delete failed',
bodyRequired: 'Please enter a post.',
byUnknown: 'Community member',
edited: 'Edited',
deleteConfirm: 'Delete this post?',
charactersLeft: '{count} characters left'
},
admin: {
title: 'Admin',
subtitle: 'Maintain system configuration and manage Wiki records.',
@@ -327,6 +357,7 @@ const messages = {
items: '物品',
recipes: '材料单',
checklist: 'CheckList',
life: 'Life',
admin: '管理',
main: '主导航',
language: '语言',
@@ -503,6 +534,35 @@ const messages = {
newTask: '新增 Task',
editTask: '编辑 Task'
},
life: {
title: 'Life',
subtitle: '分享喜欢的心得、想法和社区发现。',
kicker: '社区动态',
composerTitle: '分享动态',
composerPrompt: '想分享什么?',
bodyLabel: '动态内容',
bodyPlaceholder: '分享一段想法、心得或发现……',
publish: '发布',
publishing: '发布中',
update: '更新',
updating: '更新中',
cancelEdit: '取消编辑',
empty: '暂无动态',
loading: '正在加载 Life 动态',
loginPrompt: '使用已验证邮箱登录后即可发布。',
verifyPrompt: '完成邮箱验证后即可发布。',
editPost: '编辑动态',
deletePost: '删除动态',
saveEdit: '保存编辑',
postFailed: '发布失败',
saveFailed: '保存失败',
deleteFailed: '删除失败',
bodyRequired: '请输入动态内容。',
byUnknown: '社区成员',
edited: '已编辑',
deleteConfirm: '确认删除这条动态?',
charactersLeft: '还可以输入 {count} 个字符'
},
admin: {
title: '管理',
subtitle: '维护系统配置,查看并删除 Wiki 数据记录。',