tweak padding

This commit is contained in:
Hailey
2024-06-11 23:53:22 -07:00
parent e16c83c40c
commit 68f6a3e4dd
3 changed files with 24 additions and 15 deletions
@@ -9,10 +9,12 @@ import {
import {AppBskyGraphDefs, AppBskyGraphGetActorStarterPacks} from '@atproto/api' import {AppBskyGraphDefs, AppBskyGraphGetActorStarterPacks} from '@atproto/api'
import {msg, Trans} from '@lingui/macro' import {msg, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {useNavigation} from '@react-navigation/native'
import {InfiniteData, UseInfiniteQueryResult} from '@tanstack/react-query' import {InfiniteData, UseInfiniteQueryResult} from '@tanstack/react-query'
import {logger} from '#/logger' import {logger} from '#/logger'
import {isNative, isWeb} from '#/platform/detection' import {isNative, isWeb} from '#/platform/detection'
import {NavigationProp} from 'lib/routes/types'
import {List, ListRef} from 'view/com/util/List' import {List, ListRef} from 'view/com/util/List'
import {Text} from 'view/com/util/text/Text' import {Text} from 'view/com/util/text/Text'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
@@ -130,6 +132,7 @@ export const ProfileStarterPacks = React.forwardRef<
function EmptyComponent() { function EmptyComponent() {
const {_} = useLingui() const {_} = useLingui()
const t = useTheme() const t = useTheme()
const navigation = useNavigation<NavigationProp>()
return ( return (
<View style={[a.mt_xl, a.px_2xl, a.gap_2xl]}> <View style={[a.mt_xl, a.px_2xl, a.gap_2xl]}>
@@ -150,7 +153,8 @@ function EmptyComponent() {
label={_(msg`Create a starter pack`)} label={_(msg`Create a starter pack`)}
variant="solid" variant="solid"
color="primary" color="primary"
size="medium"> size="medium"
onPress={() => navigation.navigate('StarterPackWizard')}>
<ButtonText> <ButtonText>
<Trans>Create a starter pack</Trans> <Trans>Create a starter pack</Trans>
</ButtonText> </ButtonText>
@@ -34,7 +34,7 @@ export function StepDetails() {
</Text> </Text>
<Text style={[a.text_center, a.text_md, a.px_md]}> <Text style={[a.text_center, a.text_md, a.px_md]}>
<Trans> <Trans>
Invite friends directly to follow your favorite feeds and people{' '} Invite your friends to follow your favorite feeds and people
</Trans> </Trans>
</Text> </Text>
</View> </View>
+18 -13
View File
@@ -56,8 +56,7 @@ import {Provider} from './State'
export function Wizard({ export function Wizard({
route, route,
}: NativeStackScreenProps<CommonNavigatorParams, 'StarterPackWizard'>) { }: NativeStackScreenProps<CommonNavigatorParams, 'StarterPackWizard'>) {
const params = route.params const {name, rkey} = route.params ?? {}
const {name, rkey} = params
const {currentAccount} = useSession() const {currentAccount} = useSession()
const {_} = useLingui() const {_} = useLingui()
@@ -562,7 +561,7 @@ function Footer({
(state.currentStep === 'Profiles' && items.length > 1) || (state.currentStep === 'Profiles' && items.length > 1) ||
(state.currentStep === 'Feeds' && items.length > 0) (state.currentStep === 'Feeds' && items.length > 0)
const textStyles = [isWeb && a.text_md] const textStyles = [a.text_md]
return ( return (
<View <View
@@ -575,8 +574,8 @@ function Footer({
t.atoms.bg, t.atoms.bg,
t.atoms.border_contrast_medium, t.atoms.border_contrast_medium,
{ {
height: 220, height: 224,
paddingBottom: 12 + bottomInset, paddingBottom: 20 + bottomInset,
}, },
isNative && [ isNative && [
a.border_l, a.border_l,
@@ -589,7 +588,7 @@ function Footer({
], ],
]}> ]}>
{items.length > 0 && ( {items.length > 0 && (
<View style={[a.absolute, {right: 14, top: 26}]}> <View style={[a.absolute, {right: 14, top: 31}]}>
<Text style={[a.font_bold]}> <Text style={[a.font_bold]}>
{items.length}/{state.currentStep === 'Profiles' ? 50 : 3} {items.length}/{state.currentStep === 'Profiles' ? 50 : 3}
</Text> </Text>
@@ -601,7 +600,7 @@ function Footer({
<UserAvatar <UserAvatar
key={index} key={index}
avatar={p.avatar} avatar={p.avatar}
size={28} size={32}
type={state.currentStep === 'Profiles' ? 'user' : 'algo'} type={state.currentStep === 'Profiles' ? 'user' : 'algo'}
/> />
))} ))}
@@ -625,12 +624,14 @@ function Footer({
</Trans> </Trans>
) : items.length === 1 ? ( ) : items.length === 1 ? (
<Trans> <Trans>
<Text style={[a.font_bold]}>{getName(items[0])}</Text> is included <Text style={[a.font_bold, textStyles]}>{getName(items[0])}</Text>{' '}
in your starter pack is included in your starter pack
</Trans> </Trans>
) : items.length === 2 ? ( ) : items.length === 2 ? (
<Trans> <Trans>
<Text style={[a.font_bold]}>{getName(items[0])} </Text> <Text style={[a.font_bold, textStyles]}>
{getName(items[0])}{' '}
</Text>
and and
<Text> </Text> <Text> </Text>
<Text style={[a.font_bold]}>{getName(items[1])} </Text> <Text style={[a.font_bold]}>{getName(items[1])} </Text>
@@ -638,8 +639,12 @@ function Footer({
</Trans> </Trans>
) : ( ) : (
<Trans> <Trans>
<Text style={[a.font_bold]}>{getName(items[0])}, </Text> <Text style={[a.font_bold, textStyles]}>
<Text style={[a.font_bold]}>{getName(items[1])}, </Text> {getName(items[0])},{' '}
</Text>
<Text style={[a.font_bold, textStyles]}>
{getName(items[1])},{' '}
</Text>
and {items.length - 2}{' '} and {items.length - 2}{' '}
<Plural value={items.length - 2} one="other" other="others" /> are <Plural value={items.length - 2} one="other" other="others" /> are
included in your starter pack included in your starter pack
@@ -652,7 +657,7 @@ function Footer({
{isEditEnabled ? ( {isEditEnabled ? (
<Button <Button
label={_(msg`Edit`)} label={_(msg`Edit`)}
variant="ghost" variant="outline"
color="primary" color="primary"
size="small" size="small"
onPress={editDialogControl.open}> onPress={editDialogControl.open}>