@openpeepshq/rn-components 0.9.19 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openpeepshq/rn-components",
3
- "version": "0.9.19",
3
+ "version": "0.10.0",
4
4
  "description": "React Native community screens and shared UI (extracted from the Black Ambition app) for the OpenPeeps stack.",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./src/index.ts",
@@ -142,8 +142,8 @@
142
142
  "timezones-list": "^3.1.0",
143
143
  "validator": "^13.15.23",
144
144
  "zustand": "^5.0.3",
145
- "@openpeepshq/common": "^0.5.12",
146
- "@openpeepshq/react": "^0.9.22"
145
+ "@openpeepshq/common": "^0.6.0",
146
+ "@openpeepshq/react": "^0.10.0"
147
147
  },
148
148
  "devDependencies": {
149
149
  "@babel/core": "^7.26.7",
@@ -1,5 +1,11 @@
1
1
  import React from 'react';
2
- import { Platform, ScrollView, useColorScheme } from 'react-native';
2
+ import {
3
+ Linking,
4
+ Platform,
5
+ Pressable,
6
+ ScrollView,
7
+ useColorScheme,
8
+ } from 'react-native';
3
9
  import { Separator } from '../../ui/separator';
4
10
  import { TouchableOpacity, View } from 'react-native';
5
11
  import { Button } from '../../ui/button';
@@ -145,6 +151,8 @@ export const SideMenu = ({
145
151
  showAdmin: false,
146
152
  });
147
153
 
154
+ const bugReportUrl = serverInfo?.communityConfig?.info?.bugReportUrl;
155
+
148
156
  const { t } = useTranslation();
149
157
 
150
158
  const [currentRoute, setCurrentRoute] = React.useState<string | undefined>(
@@ -259,7 +267,17 @@ export const SideMenu = ({
259
267
  </View>
260
268
 
261
269
  <Separator />
262
- <View className="pl-6 pr-4 pt-4 pb-12">
270
+ <View className="gap-1 pl-6 pr-4 pt-4 pb-12">
271
+ {bugReportUrl && /^https?:\/\//i.test(bugReportUrl) ? (
272
+ <Pressable
273
+ accessibilityRole="link"
274
+ onPress={() => void Linking.openURL(bugReportUrl)}
275
+ >
276
+ <ThemedText className="text-foreground text-base tracking-wider">
277
+ {t('navigation.reportBug')}
278
+ </ThemedText>
279
+ </Pressable>
280
+ ) : null}
263
281
  <ThemedText className="text-muted-foreground text-base tracking-wider">
264
282
  {t('navigation.poweredBy')}
265
283
  </ThemedText>
@@ -11,6 +11,7 @@ import { Button } from '../../components/ui/button';
11
11
  import { ThemedText } from '../../components/ui/themed-text';
12
12
  import { Image } from 'react-native';
13
13
  import { View } from 'react-native';
14
+ import { useTranslation } from 'react-i18next';
14
15
  import { CompositeScreenProps } from '@react-navigation/native';
15
16
 
16
17
  type SuccessScreenProps = CompositeScreenProps<
@@ -23,6 +24,7 @@ export const Success: React.FC<SuccessScreenProps> = ({
23
24
  route,
24
25
  }) => {
25
26
  const { type } = route.params;
27
+ const { t } = useTranslation();
26
28
 
27
29
  const renderContent = () => {
28
30
  switch (type) {
@@ -37,19 +39,11 @@ export const Success: React.FC<SuccessScreenProps> = ({
37
39
  resizeMode="cover"
38
40
  />
39
41
  <ThemedText className="text-xl text-center text-muted-foreground my-10">
40
- Account created successfully. To verify your email, click the
41
- button below to open your email app.
42
+ {t('auth.register.success')}{' '}
43
+ {t('auth.register.verificationReminder')}
42
44
  </ThemedText>
43
45
  </View>
44
46
  <View className="w-full gap-7 flex items-center">
45
- {/* TODO uncomment if email verification is implemented */}
46
- {/* <Button
47
- onPress={() => navigate(ROOT_ROUTES.MAIN)}
48
- className="w-full py-4 rounded-lg">
49
- <ThemedText className="font-medium text-base">
50
- Open email app
51
- </ThemedText>
52
- </Button> */}
53
47
  <Button
54
48
  variant={'secondary'}
55
49
  onPress={() => {
@@ -63,7 +57,7 @@ export const Success: React.FC<SuccessScreenProps> = ({
63
57
  className="w-full py-4 rounded-lg"
64
58
  >
65
59
  <ThemedText className="font-medium text-base">
66
- Welcome
60
+ {t('auth.register.welcome')}
67
61
  </ThemedText>
68
62
  </Button>
69
63
  </View>
@@ -81,7 +75,7 @@ export const Success: React.FC<SuccessScreenProps> = ({
81
75
  resizeMode="cover"
82
76
  />
83
77
  <ThemedText className="text-xl text-center my-10">
84
- Password reset done.
78
+ {t('auth.resetPassword.done')}
85
79
  </ThemedText>
86
80
  </View>
87
81
  <View className="w-full gap-7 flex items-center">
@@ -90,7 +84,7 @@ export const Success: React.FC<SuccessScreenProps> = ({
90
84
  className="w-full py-4 rounded-lg"
91
85
  >
92
86
  <ThemedText className="font-medium text-base">
93
- Go to login
87
+ {t('auth.resetPassword.goToLogin')}
94
88
  </ThemedText>
95
89
  </Button>
96
90
  </View>