Skip to content

Commit d125c0d

Browse files
Merge upstream develop
2 parents 1911c32 + 039ce07 commit d125c0d

7 files changed

Lines changed: 40 additions & 27 deletions

File tree

apps/polycentric/app.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import type { ConfigContext, ExpoConfig } from 'expo/config';
22
import fs from 'fs';
3+
import { APP_NAME } from './src/common/constants/constants';
34

45
const { version: PKG_VERSION } = require('./package.json');
56

67
const IS_DEV = process.env.APP_VARIANT === 'dev';
78

8-
const NAME = IS_DEV ? 'Harbor Dev' : 'Harbor';
9+
const NAME = IS_DEV ? `${APP_NAME} Dev` : APP_NAME;
910
const ID = IS_DEV ? 'org.futo.polycentric.dev' : 'org.futo.polycentric';
1011

1112
const GOOGLE_SERVICES_FILE =

apps/polycentric/app/+html.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { APP_NAME } from '@/src/common/constants';
12
import { ScrollViewStyleReset } from 'expo-router/html';
23
import type { PropsWithChildren } from 'react';
34

@@ -10,7 +11,7 @@ export default function Root({ children }: PropsWithChildren) {
1011
name="viewport"
1112
content="width=device-width, initial-scale=1, shrink-to-fit=no"
1213
/>
13-
<title>Harbor</title>
14+
<title>{APP_NAME}</title>
1415
<link rel="icon" href="/favicon.ico" sizes="any" />
1516
<ScrollViewStyleReset />
1617
</head>

apps/polycentric/app/_layout.tsx

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
PolycentricProvider,
55
usePolycentricContext,
66
} from '@/src/common/lib/polycentric-hooks';
7+
import { APP_NAME } from '@/src/common/constants';
78
import { Atoms, ThemeProvider, useTheme } from '@/src/common/theme';
89
import { isWeb } from '@/src/common/util/platform';
910
import '@/src/common/util/react-native-screens-feature-flags';
@@ -18,6 +19,7 @@ import {
1819
SafeAreaProvider,
1920
initialWindowMetrics,
2021
} from 'react-native-safe-area-context';
22+
import Head from 'expo-router/head';
2123

2224
// Anchor the root stack on the tabs so that deep-linking directly
2325
// into a modal route (e.g. `/feed/compose`, `/settings/identity`)
@@ -113,20 +115,25 @@ export default function RootLayout() {
113115
}, [ready]);
114116

115117
return (
116-
<GestureHandlerRootView style={Atoms.flex_1}>
117-
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
118-
<ThemeProvider>
119-
<LinkPreviewsProvider>
120-
<PolycentricProvider onInitialized={onInitialized}>
121-
<TrueSheetProvider>
122-
<RootStack />
123-
<PortalHost />
124-
<Toaster />
125-
</TrueSheetProvider>
126-
</PolycentricProvider>
127-
</LinkPreviewsProvider>
128-
</ThemeProvider>
129-
</SafeAreaProvider>
130-
</GestureHandlerRootView>
118+
<>
119+
<Head>
120+
<title>{APP_NAME}</title>
121+
</Head>
122+
<GestureHandlerRootView style={Atoms.flex_1}>
123+
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
124+
<ThemeProvider>
125+
<LinkPreviewsProvider>
126+
<PolycentricProvider onInitialized={onInitialized}>
127+
<TrueSheetProvider>
128+
<RootStack />
129+
<PortalHost />
130+
<Toaster />
131+
</TrueSheetProvider>
132+
</PolycentricProvider>
133+
</LinkPreviewsProvider>
134+
</ThemeProvider>
135+
</SafeAreaProvider>
136+
</GestureHandlerRootView>
137+
</>
131138
);
132139
}

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

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
import { Platform } from 'react-native';
1+
export const APP_NAME = 'Harbor';
22

33
export const WEB_MAX_CONTENT_WIDTH = 600;
44

55
export const DEFAULT_IDENTITY_NAME = 'Anon';
6-
export const TAB_BAR_HEIGHT = Platform.OS === 'ios' ? 80 : 56;
76

87
export const FUTO_URL = 'https://futo.tech';
98
export const SOURCE_CODE_URL =
109
'https://gitlab.futo.org/polycentric/polycentric';
1110
export const REPORT_BUG_URL = 'https://chat.futo.org/login/';
11+
12+
/**
13+
* Public web base URL for this app, used to build shareable links (e.g. to a
14+
* verification claim). Override with EXPO_PUBLIC_POLYCENTRIC_APP_URL; trailing
15+
* slashes are stripped so callers can append paths directly.
16+
*/
17+
export const POLYCENTRIC_APP_URL = (
18+
process.env.EXPO_PUBLIC_POLYCENTRIC_APP_URL ?? 'https://polycentric.io'
19+
).replace(/\/+$/, '');
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export * from './constants';
2+
export * from './layout';
23
export * from './routes';
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { Platform } from 'react-native';
2+
3+
export const TAB_BAR_HEIGHT = Platform.OS === 'ios' ? 80 : 56;

0 commit comments

Comments
 (0)