feat(ui): redesign system message item with card-style layout and add title validation
All checks were successful
Frontend CI / build-and-push-web (push) Successful in 2m39s
Frontend CI / ota-android (push) Successful in 12m4s
Frontend CI / build-android-apk (push) Successful in 44m0s

- Refactor SystemMessageItem with modern card design, gradient colors, and improved visual hierarchy
- Add unread indicator, status badges, and enhanced avatar badges for message types
- Update CreatePostScreen to require title input and improve placeholder text
- Add Android back button handling for notification screens in embedded mode
- Replace manual shadow styles with theme shadow utilities across message screens
This commit is contained in:
lafay
2026-03-21 12:08:45 +08:00
parent a8c78f0c3f
commit 37ddfa8ed6
4 changed files with 326 additions and 173 deletions

View File

@@ -337,6 +337,11 @@ export const CreatePostScreen: React.FC<CreatePostScreenProps> = (props) => {
// 防止重复点击
if (posting) return;
if (!title.trim()) {
Alert.alert('错误', '请输入帖子标题');
return;
}
if (!content.trim()) {
Alert.alert('错误', '请输入帖子内容');
return;
@@ -365,7 +370,7 @@ export const CreatePostScreen: React.FC<CreatePostScreenProps> = (props) => {
// 创建投票帖子
await voteService.createVotePost({
title: title.trim() || '无标题',
title: title.trim(),
content: content.trim(),
images: imageUrls,
vote_options: validOptions,
@@ -383,7 +388,7 @@ export const CreatePostScreen: React.FC<CreatePostScreenProps> = (props) => {
} else {
if (isEditMode && editPostID) {
const updated = await postService.updatePost(editPostID, {
title: title.trim() || '无标题',
title: title.trim(),
content: content.trim(),
images: imageUrls,
});
@@ -403,7 +408,7 @@ export const CreatePostScreen: React.FC<CreatePostScreenProps> = (props) => {
} else {
// 创建普通帖子
await postService.createPost({
title: title.trim() || '无标题',
title: title.trim(),
content: content.trim(),
images: imageUrls,
});
@@ -562,7 +567,7 @@ export const CreatePostScreen: React.FC<CreatePostScreenProps> = (props) => {
]}
value={title}
onChangeText={setTitle}
placeholder="添加标题(可选"
placeholder="请输入标题(必填"
placeholderTextColor={colors.text.hint}
maxLength={MAX_TITLE_LENGTH}
/>