feat: styling/copy cleanup

zio/stable
Eric Bailey 2023-06-16 15:16:40 -05:00
parent 73c6afc7fb
commit 20f77ae7b7
2 changed files with 69 additions and 52 deletions

View File

@ -23,10 +23,12 @@ function RepliesThresholdInput({enabled}: {enabled: boolean}) {
marginTop: 10, marginTop: 10,
opacity: enabled ? 1 : 0.3, opacity: enabled ? 1 : 0.3,
}}> }}>
<Text> <Text type="xs">
{value === 0 {value === 0
? `Show all replies` ? `Show all replies`
: `Show replies with greater than ${value} likes`} : `Show replies with greater than ${value} ${
value > 1 ? `likes` : `like`
}`}
</Text> </Text>
<Slider <Slider
value={value} value={value}
@ -53,18 +55,24 @@ export const Component = observer(function Component() {
<View <View
testID="preferencesHomeFeedModal" testID="preferencesHomeFeedModal"
style={[pal.view, styles.container]}> style={[pal.view, styles.container]}>
<View style={{padding: 20, paddingBottom: 30}}>
<Text type="title-lg" style={[pal.text, styles.title]}> <Text type="title-lg" style={[pal.text, styles.title]}>
Home Feed Preferences Home Feed Preferences
</Text> </Text>
<Text type="xl" style={[pal.textLight, styles.description]}>
Fine-tune the content you see on your home screen.
</Text>
</View>
<ScrollView> <ScrollView>
<View style={{paddingHorizontal: 20}}>
<View style={[styles.card]}> <View style={[styles.card]}>
<Text type="title-sm" style={[s.pb5]}> <Text type="title-sm" style={[s.pb5]}>
Show Replies Show Replies
</Text> </Text>
<Text style={[s.pb10]}> <Text style={[s.pb10]}>
Replies are shown in your home feed by default. If this setting is Adjust the number of likes a reply must have to be shown in your
disabled, you'll see only new posts and threads. feed.
</Text> </Text>
<ToggleButton <ToggleButton
type="default-light" type="default-light"
@ -82,7 +90,9 @@ export const Component = observer(function Component() {
<Text type="title-sm" style={[s.pb5]}> <Text type="title-sm" style={[s.pb5]}>
Show Reposts Show Reposts
</Text> </Text>
<Text style={[s.pb10]}>Description</Text> <Text style={[s.pb10]}>
Disable this setting to hide all reposts from your feed.
</Text>
<ToggleButton <ToggleButton
type="default-light" type="default-light"
label={store.preferences.homeFeedRepostsEnabled ? 'Yes' : 'No'} label={store.preferences.homeFeedRepostsEnabled ? 'Yes' : 'No'}
@ -95,7 +105,10 @@ export const Component = observer(function Component() {
<Text type="title-sm" style={[s.pb5]}> <Text type="title-sm" style={[s.pb5]}>
Show Quote Posts Show Quote Posts
</Text> </Text>
<Text style={[s.pb10]}>Description</Text> <Text style={[s.pb10]}>
Disable this setting to hide all quote posts from your feed.
Reposts will still be visible.
</Text>
<ToggleButton <ToggleButton
type="default-light" type="default-light"
label={store.preferences.homeFeedQuotePostsEnabled ? 'Yes' : 'No'} label={store.preferences.homeFeedQuotePostsEnabled ? 'Yes' : 'No'}
@ -103,6 +116,7 @@ export const Component = observer(function Component() {
onPress={store.preferences.toggleHomeFeedQuotePostsEnabled} onPress={store.preferences.toggleHomeFeedQuotePostsEnabled}
/> />
</View> </View>
</View>
</ScrollView> </ScrollView>
<View style={[styles.btnContainer, pal.borderDark]}> <View style={[styles.btnContainer, pal.borderDark]}>
@ -125,15 +139,18 @@ export const Component = observer(function Component() {
const styles = StyleSheet.create({ const styles = StyleSheet.create({
container: { container: {
flex: 1, flex: 1,
padding: 20,
paddingBottom: isDesktopWeb ? 0 : 60, paddingBottom: isDesktopWeb ? 0 : 60,
}, },
title: { title: {
textAlign: 'center', textAlign: 'center',
marginBottom: 20, marginBottom: 5,
},
description: {
textAlign: 'center',
paddingHorizontal: 32,
}, },
card: { card: {
...s.p20, padding: 16,
backgroundColor: s.gray1.color, backgroundColor: s.gray1.color,
borderRadius: 10, borderRadius: 10,
marginBottom: 20, marginBottom: 20,
@ -147,8 +164,8 @@ const styles = StyleSheet.create({
backgroundColor: colors.blue3, backgroundColor: colors.blue3,
}, },
btnContainer: { btnContainer: {
paddingTop: 10, paddingTop: 20,
paddingHorizontal: 10, paddingHorizontal: 20,
borderTopWidth: isDesktopWeb ? 0 : 1, borderTopWidth: isDesktopWeb ? 0 : 1,
}, },
}) })

View File

@ -396,7 +396,7 @@ export const SettingsScreen = withAuthRequired(
/> />
</View> </View>
<Text type="lg" style={pal.text}> <Text type="lg" style={pal.text}>
Preferences Home Feed Preferences
</Text> </Text>
</TouchableOpacity> </TouchableOpacity>
<TouchableOpacity <TouchableOpacity