Add 'you are a member' line to scene headers and small other tweaks

zio/stable
Paul Frazee 2022-11-09 13:48:40 -06:00
parent 41a18bf32f
commit 93b64cf474
2 changed files with 27 additions and 5 deletions

View File

@ -143,7 +143,9 @@ export const ProfileHeader = observer(function ProfileHeader({
</TouchableOpacity> </TouchableOpacity>
</View> </View>
<View style={styles.displayNameLine}> <View style={styles.displayNameLine}>
<Text style={styles.displayName}>{view.displayName}</Text> <Text style={styles.displayName}>
{view.displayName || view.handle}
</Text>
</View> </View>
<View style={styles.handleLine}> <View style={styles.handleLine}>
{view.isScene ? ( {view.isScene ? (
@ -196,19 +198,31 @@ export const ProfileHeader = observer(function ProfileHeader({
</View> </View>
</View> </View>
{view.description ? ( {view.description ? (
<Text style={[s.mb5, s.f16, s['lh16-1.3']]}>{view.description}</Text> <Text style={styles.description} numberOfLines={3}>
{view.description}
</Text>
) : undefined} ) : undefined}
{view.isScene && view.creator ? ( {view.isScene && view.creator ? (
<View style={styles.relationshipsLine}> <View style={styles.relationshipsLine}>
<Text style={[s.mr2, s.gray5]}>Created by</Text> <FontAwesomeIcon icon={['far', 'user']} style={[s.gray5, s.mr5]} />
<Text style={[s.mr2, s.gray5, s.f15]}>Created by</Text>
<UserInfoText <UserInfoText
style={[s.blue3]} style={[s.blue3, s.f15]}
did={view.creator} did={view.creator}
prefix="@" prefix="@"
asLink asLink
/> />
</View> </View>
) : undefined} ) : undefined}
{view.isScene && view.myState.member ? (
<View style={styles.relationshipsLine}>
<FontAwesomeIcon
icon={['far', 'circle-check']}
style={[s.gray5, s.mr5]}
/>
<Text style={[s.mr2, s.gray5, s.f15]}>You are a member</Text>
</View>
) : undefined}
</View> </View>
</View> </View>
) )
@ -315,9 +329,15 @@ const styles = StyleSheet.create({
fontSize: 15, fontSize: 15,
}, },
description: {
marginBottom: 8,
fontSize: 16,
lineHeight: 20.8, // 1.3 of 16px
},
relationshipsLine: { relationshipsLine: {
flexDirection: 'row', flexDirection: 'row',
alignItems: 'center', alignItems: 'center',
marginBottom: 10, marginBottom: 5,
}, },
}) })

View File

@ -16,6 +16,7 @@ import {faBell as farBell} from '@fortawesome/free-regular-svg-icons/faBell'
import {faBookmark} from '@fortawesome/free-solid-svg-icons/faBookmark' import {faBookmark} from '@fortawesome/free-solid-svg-icons/faBookmark'
import {faBookmark as farBookmark} from '@fortawesome/free-regular-svg-icons/faBookmark' import {faBookmark as farBookmark} from '@fortawesome/free-regular-svg-icons/faBookmark'
import {faCheck} from '@fortawesome/free-solid-svg-icons/faCheck' import {faCheck} from '@fortawesome/free-solid-svg-icons/faCheck'
import {faCircleCheck} from '@fortawesome/free-regular-svg-icons/faCircleCheck'
import {faCircleUser} from '@fortawesome/free-regular-svg-icons/faCircleUser' import {faCircleUser} from '@fortawesome/free-regular-svg-icons/faCircleUser'
import {faClone} from '@fortawesome/free-regular-svg-icons/faClone' import {faClone} from '@fortawesome/free-regular-svg-icons/faClone'
import {faComment} from '@fortawesome/free-regular-svg-icons/faComment' import {faComment} from '@fortawesome/free-regular-svg-icons/faComment'
@ -67,6 +68,7 @@ export function setup() {
faBookmark, faBookmark,
farBookmark, farBookmark,
faCheck, faCheck,
faCircleCheck,
faCircleUser, faCircleUser,
faClone, faClone,
faComment, faComment,