Skip to content

Commit d74d15e

Browse files
Tim Girouxmarkharding
authored andcommitted
App Using New Theme
1 parent a83e8a1 commit d74d15e

137 files changed

Lines changed: 2449 additions & 2703 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitlab-ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ include:
22
- local: .gitlab/ci/build_rs_core.yml
33
- local: .gitlab/ci/build_js_sdks.yml
44
- local: .gitlab/ci/build_server.yml
5+
- local: .gitlab/ci/deploy_pages.yml
56

67
stages:
78
- setup
89
- check
910
- build
1011
- publish
12+
- deploy
1113

1214
default:
1315
tags:

.gitlab/ci/deploy_pages.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
fusmi-2026-web:
2+
stage: deploy
3+
image: node:20
4+
rules:
5+
- if: $CI_COMMIT_TAG == "fusmi-2026-web"
6+
tags:
7+
- dind
8+
before_script:
9+
- npm install -g pnpm@9.5.0 wrangler
10+
- pnpm install
11+
script:
12+
# Set env for web build
13+
- echo "EXPO_PUBLIC_POLYCENTRIC_SERVER=https://staging-serv1.polycentric.io" > apps/polycentric/.env
14+
15+
# Build all workspace packages then export web
16+
- pnpm build
17+
- cd apps/polycentric
18+
- pnpm build:web
19+
20+
# Deploy to Cloudflare Pages
21+
- |
22+
if ! wrangler pages project list | grep -q "fusmi26"; then
23+
wrangler pages project create fusmi26 --production-branch production
24+
fi
25+
- wrangler pages deploy ./dist --project-name=fusmi26 --branch=production

apps/polycentric/app.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"slug": "polycentric",
55
"version": "0.0.1",
66
"orientation": "portrait",
7-
"icon": "./assets/images/AppIcon.png",
7+
"icon": "./src/common/assets/images/AppIcon.png",
88
"scheme": "polycentric",
99
"web": {
1010
"output": "static"
@@ -16,7 +16,7 @@
1616
},
1717
"android": {
1818
"adaptiveIcon": {
19-
"foregroundImage": "./assets/images/AppIcon.png",
19+
"foregroundImage": "./src/common/assets/images/AppIcon.png",
2020
"backgroundColor": "#ffffff"
2121
},
2222
"edgeToEdgeEnabled": true,
@@ -27,7 +27,7 @@
2727
[
2828
"expo-splash-screen",
2929
{
30-
"image": "./assets/images/AppIcon.png",
30+
"image": "./src/common/assets/images/AppIcon.png",
3131
"imageWidth": 200,
3232
"resizeMode": "contain",
3333
"backgroundColor": "#F2F5F9"
Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1 @@
1-
import { Screen, Box, Text, Button } from '@/components';
2-
import { useRouter } from 'expo-router';
3-
import { Routes } from '@/constants/routes';
4-
5-
function PlaceholderLogo() {
6-
return (
7-
<Box
8-
width={100}
9-
height={100}
10-
borderRadius="lg"
11-
alignItems="center"
12-
justifyContent="center"
13-
marginBottom="lg"
14-
style={{
15-
borderWidth: 2,
16-
borderColor: 'rgba(255, 255, 255, 0.2)',
17-
borderStyle: 'dashed',
18-
backgroundColor: 'rgba(255, 255, 255, 0.05)',
19-
}}
20-
>
21-
<Text variant="small" color="neutralSurface">
22-
LOGO
23-
</Text>
24-
</Box>
25-
);
26-
}
27-
28-
export default function Welcome() {
29-
const router = useRouter();
30-
31-
return (
32-
<Screen background={{ gradient: 'surround' }}>
33-
<Box
34-
flexDirection="column"
35-
justifyContent="space-between"
36-
marginHorizontal="lg"
37-
height="100%"
38-
>
39-
<Box flex={1} justifyContent="center" alignItems="center">
40-
<PlaceholderLogo />
41-
<Box alignItems="center">
42-
<Text variant="title" color="text">
43-
Polycentric
44-
</Text>
45-
<Text variant="body" color="neutralSurface">
46-
Law without governance
47-
</Text>
48-
</Box>
49-
</Box>
50-
<Box gap="md">
51-
<Button
52-
title="Create new identity"
53-
variant="primary"
54-
fullWidth
55-
onPress={() => router.push(Routes.onboarding.signup.setUsername)}
56-
/>
57-
<Button
58-
title="Import existing identity"
59-
variant="tertiary"
60-
fullWidth
61-
onPress={() => {}}
62-
/>
63-
</Box>
64-
</Box>
65-
</Screen>
66-
);
67-
}
1+
export { default } from '@/src/features/onboarding/OnboardingWelcomeScreen';
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1 @@
1-
import { Stack } from 'expo-router';
2-
import { SignupProvider } from '@/lib/signup/SignupContext';
3-
4-
export default function SignupLayout() {
5-
return (
6-
<SignupProvider>
7-
<Stack screenOptions={{ headerShown: false }} />
8-
</SignupProvider>
9-
);
10-
}
1+
export { default } from '@/src/features/onboarding/SignupStackLayoutScreen';
Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1 @@
1-
import { Screen, Box, Text, Button, TextInput, PageHeader } from '@/components';
2-
import { useRouter } from 'expo-router';
3-
import { useSignup } from '@/lib/signup/SignupContext';
4-
5-
export default function SetAbout() {
6-
const router = useRouter();
7-
const { data, setAbout, goToNextStep, close } = useSignup();
8-
9-
return (
10-
<Screen background={{ gradient: 'surround' }} keyboardAvoiding>
11-
<Box flexDirection="column" marginHorizontal="lg" height="100%">
12-
<PageHeader onBack={() => router.back()} onClose={close} />
13-
<Box flex={1} gap="lg">
14-
<Text variant="title">About this identity</Text>
15-
<TextInput
16-
placeholder="Tell others a bit about yourself"
17-
value={data.about}
18-
onChangeText={setAbout}
19-
numberOfLines={4}
20-
autoFocus
21-
/>
22-
</Box>
23-
<Button
24-
title="Continue"
25-
variant="primary"
26-
fullWidth
27-
onPress={goToNextStep}
28-
/>
29-
</Box>
30-
</Screen>
31-
);
32-
}
1+
export { default } from '@/src/features/onboarding/SetAboutScreen';
Lines changed: 1 addition & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1 @@
1-
import { Screen, Box, Button, PageHeader, Avatar } from '@/components';
2-
import { useRouter } from 'expo-router';
3-
import { useSignup } from '@/lib/signup/SignupContext';
4-
import { useImagePicker } from '@/lib/fs-pickers/useImagePicker';
5-
import * as ImagePicker from 'expo-image-picker';
6-
import { Ionicons } from '@expo/vector-icons';
7-
8-
export default function SetAvatar() {
9-
const router = useRouter();
10-
const { data, setAvatarUri, goToNextStep, close } = useSignup();
11-
12-
const { pickPhoto } = useImagePicker({
13-
allowsEditing: true,
14-
aspect: [1, 1],
15-
onSelect: setAvatarUri,
16-
});
17-
18-
const takePhoto = async () => {
19-
const { status } = await ImagePicker.requestCameraPermissionsAsync();
20-
if (status !== 'granted') {
21-
return;
22-
}
23-
24-
const result = await ImagePicker.launchCameraAsync({
25-
allowsEditing: true,
26-
aspect: [1, 1],
27-
quality: 1,
28-
});
29-
30-
if (!result.canceled && result.assets?.[0]) {
31-
setAvatarUri(result.assets[0].uri);
32-
}
33-
};
34-
35-
const removePhoto = () => {
36-
setAvatarUri(null);
37-
};
38-
39-
return (
40-
<Screen background={{ gradient: 'surround' }}>
41-
<Box flexDirection="column" marginHorizontal="lg" height="100%">
42-
<PageHeader onBack={() => router.back()} onClose={close} />
43-
<Box flex={1} alignItems="center" marginTop="2xl">
44-
<Avatar
45-
size="massive"
46-
source={data.avatarUri ? { uri: data.avatarUri } : undefined}
47-
/>
48-
</Box>
49-
<Box gap="md" marginBottom="md">
50-
<Button
51-
title="Take Photo"
52-
variant="secondary"
53-
fullWidth
54-
onPress={takePhoto}
55-
icon={({ size, color }) => (
56-
<Ionicons name="camera-outline" size={size} color={color} />
57-
)}
58-
/>
59-
<Button
60-
title="Choose from Library"
61-
variant="secondary"
62-
fullWidth
63-
onPress={pickPhoto}
64-
icon={({ size, color }) => (
65-
<Ionicons name="images-outline" size={size} color={color} />
66-
)}
67-
/>
68-
{data.avatarUri && (
69-
<Button
70-
title="Remove Photo"
71-
variant="destructive"
72-
fullWidth
73-
onPress={removePhoto}
74-
icon={({ size, color }) => (
75-
<Ionicons name="trash-outline" size={size} color={color} />
76-
)}
77-
/>
78-
)}
79-
</Box>
80-
<Button
81-
title="Continue"
82-
variant="primary"
83-
fullWidth
84-
onPress={goToNextStep}
85-
/>
86-
</Box>
87-
</Screen>
88-
);
89-
}
1+
export { default } from '@/src/features/onboarding/SetAvatarScreen';
Lines changed: 1 addition & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1 @@
1-
import { Screen, Box, Text, Button, PageHeader } from '@/components';
2-
import { useRouter } from 'expo-router';
3-
import { useSignup } from '@/lib/signup/SignupContext';
4-
5-
type ModerationLevel = 1 | 2 | 3;
6-
7-
const MODERATION_LABELS: Record<ModerationLevel, string> = {
8-
1: 'Strict',
9-
2: 'Moderate',
10-
3: 'Relaxed',
11-
};
12-
13-
export default function SetModeration() {
14-
const router = useRouter();
15-
const { data, setModeration, close, finish } = useSignup();
16-
17-
const updateCategory = (
18-
category: 'violence' | 'sexual' | 'hate',
19-
level: ModerationLevel,
20-
) => {
21-
setModeration({
22-
...data.moderation,
23-
[category]: level,
24-
});
25-
};
26-
27-
return (
28-
<Screen background={{ gradient: 'surround' }}>
29-
<Box flexDirection="column" marginHorizontal="lg" height="100%">
30-
<PageHeader onBack={() => router.back()} onClose={close} />
31-
<Box flex={1} gap="sm">
32-
<Text variant="title">Device content moderation</Text>
33-
<Text variant="body" color="neutralSurface">
34-
Content moderation only filters what you see on this device if
35-
you're using the default futo.org server.
36-
</Text>
37-
<Text variant="body" color="neutralSurface">
38-
You will still be able to create posts that violate these settings.
39-
</Text>
40-
<Text variant="body" color="neutralSurface">
41-
Polycentric will never block or censor content.
42-
</Text>
43-
<Text variant="body" color="neutralSurface">
44-
This setting can be changed at any time in your settings.
45-
</Text>
46-
<Text variant="body" color="info">
47-
dev note: Make this more succinct. maybe put some in an info window.
48-
</Text>
49-
</Box>
50-
<Button title="Finish" variant="primary" fullWidth onPress={finish} />
51-
</Box>
52-
</Screen>
53-
);
54-
}
55-
56-
function ModerationCategory({
57-
label,
58-
value,
59-
onChange,
60-
}: {
61-
label: string;
62-
value: ModerationLevel;
63-
onChange: (level: ModerationLevel) => void;
64-
}) {
65-
return (
66-
<Box gap="sm">
67-
<Text variant="body" fontWeight="semibold">
68-
{label}
69-
</Text>
70-
<Box flexDirection="row" gap="sm">
71-
{([1, 2, 3] as ModerationLevel[]).map((level) => (
72-
<Button
73-
key={level}
74-
title={MODERATION_LABELS[level]}
75-
variant={value === level ? 'secondary' : 'tertiary'}
76-
size="sm"
77-
onPress={() => onChange(level)}
78-
/>
79-
))}
80-
</Box>
81-
</Box>
82-
);
83-
}
1+
export { default } from '@/src/features/onboarding/SetModerationScreen';

0 commit comments

Comments
 (0)