Skip to content

Commit ed461d7

Browse files
Tim Girouxmarkharding
authored andcommitted
Small UI Fixes
1 parent eee4848 commit ed461d7

6 files changed

Lines changed: 20 additions & 33 deletions

File tree

apps/polycentric/src/common/components/layout/Layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function Screen({
128128
<KeyboardAvoidingView
129129
style={[Atoms.flex_1, Atoms.flex_row, Atoms.w_full, Atoms.min_w_0]}
130130
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
131-
keyboardVerticalOffset={insets.bottom}
131+
keyboardVerticalOffset={insets.top}
132132
>
133133
{children}
134134
</KeyboardAvoidingView>

apps/polycentric/src/common/constants/constants.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ export const DEFAULT_IDENTITY_NAME = 'Anon';
66
export const TAB_BAR_HEIGHT = Platform.OS === 'ios' ? 80 : 56;
77

88
export const FUTO_URL = 'https://futo.tech';
9-
export const SOURCE_CODE_URL = 'https://gitlab.futo.org/polycentric';
10-
export const REPORT_BUG_URL = 'https://www.futo.org';
9+
export const SOURCE_CODE_URL =
10+
'https://gitlab.futo.org/polycentric/polycentric';
11+
export const REPORT_BUG_URL = 'https://chat.futo.org/login/';

apps/polycentric/src/features/core/identity/IdentityFooter.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ import {
55
} from '@/src/common/components/primitives';
66
import { Routes } from '@/src/common/constants';
77
import { useCurrentIdentity } from '@/src/common/lib/polycentric-hooks';
8-
import { useProfile } from '@/src/features/profile/hooks/useProfile';
98
import { useWebHover } from '@/src/common/lib/useWebHover';
109
import {
1110
Atoms,
1211
BorderRadius,
1312
useTheme,
1413
withHexOpacity,
1514
} from '@/src/common/theme';
15+
import { useProfile } from '@/src/features/profile/hooks/useProfile';
1616
import { Ionicons } from '@expo/vector-icons';
1717
import { router } from 'expo-router';
1818
import { Pressable, StyleSheet, View } from 'react-native';
@@ -67,7 +67,8 @@ export function IdentityFooter({ compact = false }: IdentityFooterProps) {
6767
>
6868
{avatar}
6969
<Pressable
70-
onPress={() => router.push(Routes.tabs.identitySwitch)}
70+
// TODO Route to identitySwitch when that is implemented
71+
onPress={() => router.push(Routes.tabs.settings.identity)}
7172
onHoverIn={onHoverIn}
7273
onHoverOut={onHoverOut}
7374
hitSlop={10}

apps/polycentric/src/features/onboarding/OnboardingWelcomeScreen.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,32 @@
1-
import { Button, Screen, Text } from '@/src/common/components';
1+
import { Button, Screen } from '@/src/common/components';
22
import { Routes } from '@/src/common/constants/routes';
33
import { Atoms } from '@/src/common/theme';
44
import { router } from 'expo-router';
5-
import { useWindowDimensions, View } from 'react-native';
5+
import { View } from 'react-native';
66

77
import { Image } from 'expo-image';
8-
import WEB_LOGO from '../../common/assets/images/polycentric-logo-with-text.png';
8+
import LOGO_WITH_TEXT from '../../common/assets/images/polycentric-logo-with-text.png';
99

1010
export default function OnboardingWelcomeScreen() {
11-
const dimensions = useWindowDimensions();
1211
return (
1312
<Screen>
1413
<Screen.PrimaryColumn>
1514
<View style={[Atoms.flex_col, Atoms.flex_1, Atoms.mx_lg]}>
1615
<View
16+
// Absolute column to vertically center the logo
17+
// (not offset by the buttons)
1718
style={[
18-
Atoms.flex_1,
19+
Atoms.absolute,
20+
Atoms.inset_0,
1921
Atoms.justify_center,
2022
Atoms.items_center,
21-
Atoms.gap_2xl,
23+
Atoms.p_2xl,
2224
]}
2325
>
2426
<Image
25-
source={WEB_LOGO}
27+
source={LOGO_WITH_TEXT}
2628
contentFit="contain"
27-
style={{
28-
width: dimensions.width - 100,
29-
height: dimensions.width,
30-
}}
29+
style={{ width: '100%', height: '100%' }}
3130
/>
3231
</View>
3332
<View style={[Atoms.gap_md, Atoms.w_full, Atoms.mt_auto]}>

apps/polycentric/src/features/onboarding/SetDisplayNameScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default function SetDisplayNameScreen() {
5555
</View>
5656
</View>
5757
<Button
58-
style={Atoms.mt_auto}
58+
style={[Atoms.mt_auto, Atoms.mb_md]}
5959
title="Continue"
6060
variant="primary"
6161
disabled={!canContinue}

apps/polycentric/src/features/settings/ServersSettingsScreen.tsx

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,8 @@ export function ServersSettings({
8282

8383
return (
8484
<View>
85-
<SheetHeaderBlock
86-
title="Servers"
87-
onClose={() => void dismissSheet()}
88-
trailing={
89-
<View style={{ minWidth: 72, alignItems: 'flex-end' }}>
90-
<LinkButton
91-
title={isEditing ? 'Done' : 'Edit'}
92-
underlineOnHover
93-
onPress={() => {
94-
setIsEditing((v) => !v);
95-
setNewServerUrl('');
96-
}}
97-
/>
98-
</View>
99-
}
100-
/>
85+
{/* TODO: restore the Edit button once servers are part of the Identity document. */}
86+
<SheetHeaderBlock title="Servers" onClose={() => void dismissSheet()} />
10187
<View style={[Atoms.p_lg, Atoms.gap_lg]}>
10288
{servers.length === 0 ? (
10389
<Text variant="secondary" color="neutral_500">

0 commit comments

Comments
 (0)