refactor(TabsLayout, ImageGallery, ChatScreen, GroupInfoScreen, PrivateChatInfoScreen): enhance UI components and improve layout structure
- Adjusted tab bar dimensions and margins in TabsLayout for better visual consistency. - Streamlined ImageGallery by removing loading states and optimizing image transition handling. - Updated ChatScreen to utilize SafeAreaView for improved layout on different devices. - Enhanced GroupInfoScreen and PrivateChatInfoScreen with a consistent page header layout, including back navigation. - Refactored ChatHeader to simplify structure and improve maintainability.
This commit is contained in:
@@ -30,6 +30,7 @@ import { userManager } from '../../stores/userManager';
|
||||
import { Avatar, Text, Button, Loading, Divider } from '../../components/common';
|
||||
import { User } from '../../types';
|
||||
import * as hrefs from '../../navigation/hrefs';
|
||||
import { AppBackButton } from '../../components/common';
|
||||
|
||||
const PrivateChatInfoScreen: React.FC = () => {
|
||||
const router = useRouter();
|
||||
@@ -309,7 +310,12 @@ const PrivateChatInfoScreen: React.FC = () => {
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['bottom']}>
|
||||
<SafeAreaView style={styles.container} edges={['top', 'bottom']}>
|
||||
<View style={styles.pageHeader}>
|
||||
<AppBackButton onPress={() => router.back()} />
|
||||
<Text variant="h3" style={styles.pageTitle}>私聊信息</Text>
|
||||
<View style={styles.pageHeaderPlaceholder} />
|
||||
</View>
|
||||
<Loading />
|
||||
</SafeAreaView>
|
||||
);
|
||||
@@ -322,7 +328,12 @@ const PrivateChatInfoScreen: React.FC = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['bottom']}>
|
||||
<SafeAreaView style={styles.container} edges={['top', 'bottom']}>
|
||||
<View style={styles.pageHeader}>
|
||||
<AppBackButton onPress={() => router.back()} />
|
||||
<Text variant="h3" style={styles.pageTitle}>私聊信息</Text>
|
||||
<View style={styles.pageHeaderPlaceholder} />
|
||||
</View>
|
||||
<ScrollView
|
||||
style={styles.scrollView}
|
||||
contentContainerStyle={styles.scrollContent}
|
||||
@@ -414,6 +425,23 @@ const styles = StyleSheet.create({
|
||||
flex: 1,
|
||||
backgroundColor: colors.background.default,
|
||||
},
|
||||
pageHeader: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
paddingHorizontal: spacing.md,
|
||||
paddingVertical: spacing.sm,
|
||||
backgroundColor: colors.background.paper,
|
||||
borderBottomWidth: 1,
|
||||
borderBottomColor: colors.divider,
|
||||
},
|
||||
pageTitle: {
|
||||
fontWeight: '600',
|
||||
},
|
||||
pageHeaderPlaceholder: {
|
||||
width: 40,
|
||||
height: 40,
|
||||
},
|
||||
scrollView: {
|
||||
flex: 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user