@openpeepshq/rn-components 0.10.2 → 0.12.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 +2 -2
- package/src/components/custom/modals/common/sheet-footer.tsx +1 -1
- package/src/components/custom/modals/media/alt-text-sheet.tsx +1 -1
- package/src/components/custom/modals/settings/edit-notifications-sheet.tsx +1 -1
- package/src/components/groups/ChangeGroupRolesModal.tsx +1 -1
- package/src/components/groups/ConfirmGroupExitModal.tsx +1 -1
- package/src/components/groups/ConfirmMemberRemovalModal.tsx +2 -2
- package/src/components/groups/DeleteGroupModal.tsx +2 -2
- package/src/components/groups/GroupForm.tsx +2 -2
- package/src/components/groups/GroupNameFromId.tsx +1 -1
- package/src/components/groups/GroupNotificationSettingsModal.tsx +2 -2
- package/src/components/groups/JoinGroupButton.tsx +1 -1
- package/src/components/jams/JamFooter.tsx +1 -1
- package/src/components/jams/JamGuestForm.tsx +1 -3
- package/src/components/jams/LeaveCloseButton.tsx +1 -1
- package/src/components/markdown/MarkdownOverlay.tsx +1 -1
- package/src/components/post/pieces/EventRsvpList.tsx +1 -1
- package/src/components/post/pieces/EventRsvpScopeDialog.tsx +2 -2
- package/src/components/post/pieces/EventWaitlistJoinDialog.tsx +1 -1
- package/src/components/post/pieces/GalleryModal.tsx +1 -1
- package/src/components/post/pieces/modals/CancelEventModal.tsx +1 -1
- package/src/components/post/pieces/modals/DeleteEventModal.tsx +1 -1
- package/src/components/post/post-form/ComposeAttachments.tsx +1 -1
- package/src/components/post/post-form/DateSheet.tsx +5 -3
- package/src/components/post/post-form/EventForm.tsx +7 -12
- package/src/components/post/post-form/VisibilitySheet.tsx +1 -1
- package/src/components/post/types/event/FullEvent.test.tsx +85 -1
- package/src/components/post/types/event/FullEvent.tsx +30 -13
- package/src/components/profile/FollowUnfollowButton.tsx +1 -1
- package/src/components/profile/ProfileActivitySummary.tsx +4 -4
- package/src/components/profile/ProfileBadge.tsx +1 -1
- package/src/components/profile/ProfilePageAction.tsx +1 -1
- package/src/components/profile/ProfilePostsAndReplies.tsx +2 -2
- package/src/components/profile/ReportProfileOrPostModal.tsx +1 -1
- package/src/lib/media-permissions.ts +1 -1
- package/src/pages/Members.tsx +1 -1
- package/src/pages/auth/Login.tsx +1 -1
- package/src/pages/auth/Register.tsx +3 -3
- package/src/pages/conversations/Show.tsx +1 -1
- package/src/pages/events/Index.tsx +1 -1
- package/src/pages/feeds/Bookmarks.tsx +1 -1
- package/src/pages/groups/EditInfo.tsx +1 -1
- package/src/pages/groups/EditRoles.tsx +1 -1
- package/src/pages/groups/Index.tsx +1 -1
- package/src/pages/groups/Info.tsx +1 -1
- package/src/pages/groups/Members.tsx +2 -2
- package/src/pages/groups/New.tsx +1 -1
- package/src/pages/groups/Show.tsx +3 -3
- package/src/pages/settings/AccessTokens.tsx +4 -6
- package/src/pages/settings/Account.tsx +4 -2
- package/src/pages/settings/Feed.tsx +1 -1
- package/src/pages/settings/Language.tsx +1 -1
- package/src/pages/settings/PushEnabledDevices.tsx +3 -4
- package/src/pages/settings/Theme.tsx +1 -1
- package/src/pages/settings/Timezone.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openpeepshq/rn-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.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",
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"validator": "^13.15.23",
|
|
144
144
|
"zustand": "^5.0.3",
|
|
145
145
|
"@openpeepshq/common": "^0.6.1",
|
|
146
|
-
"@openpeepshq/react": "^0.
|
|
146
|
+
"@openpeepshq/react": "^0.11.0"
|
|
147
147
|
},
|
|
148
148
|
"devDependencies": {
|
|
149
149
|
"@babel/core": "^7.26.7",
|
|
@@ -40,7 +40,7 @@ export const SheetFooter: React.FC<SheetFooterProps> = ({
|
|
|
40
40
|
<View className="flex-row justify-between px-5 gap-4 mt-auto pt-4 mb-10">
|
|
41
41
|
<Button variant={variant} className="flex-1" onPress={onCancel}>
|
|
42
42
|
<ThemedText className="font-semibold">
|
|
43
|
-
{cancelText || t('common.
|
|
43
|
+
{cancelText || t('common.actions.cancel')}
|
|
44
44
|
</ThemedText>
|
|
45
45
|
</Button>
|
|
46
46
|
<Button
|
|
@@ -56,7 +56,7 @@ export const AltSheet = forwardRef<BottomSheetModal, AltSheetProps>(
|
|
|
56
56
|
<ThemedText className="text-sm font-medium mb-1">
|
|
57
57
|
{isDocument
|
|
58
58
|
? t('form.uploadEditModal.description.altText')
|
|
59
|
-
: t('
|
|
59
|
+
: t('common.labels.altText')}
|
|
60
60
|
</ThemedText>
|
|
61
61
|
<TextInput
|
|
62
62
|
placeholder={
|
|
@@ -174,7 +174,7 @@ export const EditNotificationsSheet = forwardRef<
|
|
|
174
174
|
onConfirm={save}
|
|
175
175
|
disabled={isLoading}
|
|
176
176
|
confirmText={
|
|
177
|
-
isLoading ? t('common.
|
|
177
|
+
isLoading ? t('common.states.loading') : t('common.actions.save')
|
|
178
178
|
}
|
|
179
179
|
variant="destructive"
|
|
180
180
|
/>
|
|
@@ -110,7 +110,7 @@ export const ChangeGroupRolesModal = ({
|
|
|
110
110
|
) : null}
|
|
111
111
|
<SheetFooter
|
|
112
112
|
onCancel={onClose}
|
|
113
|
-
cancelText={t('common.cancel')}
|
|
113
|
+
cancelText={t('common.actions.cancel')}
|
|
114
114
|
onConfirm={() => void submit()}
|
|
115
115
|
confirmText={t('groups.changeRoles.confirm')}
|
|
116
116
|
disabled={submitting}
|
|
@@ -54,7 +54,7 @@ export const ConfirmGroupExitModal = ({
|
|
|
54
54
|
) : null}
|
|
55
55
|
<SheetFooter
|
|
56
56
|
onCancel={onClose}
|
|
57
|
-
cancelText={t('common.cancel')}
|
|
57
|
+
cancelText={t('common.actions.cancel')}
|
|
58
58
|
onConfirm={() => void submit()}
|
|
59
59
|
confirmText={t('groups.modals.confirmExit.leave')}
|
|
60
60
|
confirmVariant="destructive"
|
|
@@ -57,12 +57,12 @@ export const ConfirmMemberRemovalModal = ({
|
|
|
57
57
|
) : null}
|
|
58
58
|
<SheetFooter
|
|
59
59
|
onCancel={onClose}
|
|
60
|
-
cancelText={t('common.cancel')}
|
|
60
|
+
cancelText={t('common.actions.cancel')}
|
|
61
61
|
onConfirm={() => void submit()}
|
|
62
62
|
confirmText={
|
|
63
63
|
submitting
|
|
64
64
|
? t('groups.removeMember.loading')
|
|
65
|
-
: t('
|
|
65
|
+
: t('common.actions.remove')
|
|
66
66
|
}
|
|
67
67
|
confirmVariant="destructive"
|
|
68
68
|
disabled={submitting}
|
|
@@ -52,12 +52,12 @@ export const DeleteGroupModal = ({ group, onClose }: DeleteGroupModalProps) => {
|
|
|
52
52
|
) : null}
|
|
53
53
|
<SheetFooter
|
|
54
54
|
onCancel={onClose}
|
|
55
|
-
cancelText={t('
|
|
55
|
+
cancelText={t('common.actions.cancel')}
|
|
56
56
|
onConfirm={() => void submit()}
|
|
57
57
|
confirmText={
|
|
58
58
|
submitting
|
|
59
59
|
? t('groups.delete.deleting')
|
|
60
|
-
: t('
|
|
60
|
+
: t('common.actions.delete')
|
|
61
61
|
}
|
|
62
62
|
confirmVariant="destructive"
|
|
63
63
|
disabled={submitting}
|
|
@@ -80,7 +80,7 @@ export const GroupForm = ({
|
|
|
80
80
|
{!isEdit ? (
|
|
81
81
|
<View className="gap-y-2 px-1">
|
|
82
82
|
<Label nativeID="handle">
|
|
83
|
-
{t('
|
|
83
|
+
{t('common.labels.handle', { defaultValue: 'Handle' })}
|
|
84
84
|
</Label>
|
|
85
85
|
<Input
|
|
86
86
|
value={groupData.handle ?? ''}
|
|
@@ -101,7 +101,7 @@ export const GroupForm = ({
|
|
|
101
101
|
|
|
102
102
|
<View className="gap-y-2 px-1">
|
|
103
103
|
<Label nativeID="description">
|
|
104
|
-
{t('
|
|
104
|
+
{t('common.labels.description', { defaultValue: 'Description' })}
|
|
105
105
|
</Label>
|
|
106
106
|
<Textarea
|
|
107
107
|
value={groupData.description ?? ''}
|
|
@@ -100,9 +100,9 @@ export const GroupNotificationSettingsModal = ({
|
|
|
100
100
|
) : null}
|
|
101
101
|
<SheetFooter
|
|
102
102
|
onCancel={onClose}
|
|
103
|
-
cancelText={t('common.cancel')}
|
|
103
|
+
cancelText={t('common.actions.cancel')}
|
|
104
104
|
onConfirm={() => void onSave()}
|
|
105
|
-
confirmText={saving ? t('common.saving') : t('common.save')}
|
|
105
|
+
confirmText={saving ? t('common.saving') : t('common.actions.save')}
|
|
106
106
|
disabled={saving || !ready}
|
|
107
107
|
isLoading={saving}
|
|
108
108
|
/>
|
|
@@ -35,7 +35,7 @@ export const JoinGroupButton = ({ group, onJoined }: JoinGroupButtonProps) => {
|
|
|
35
35
|
return (
|
|
36
36
|
<Button variant="outline" disabled={submitting} onPress={onPress}>
|
|
37
37
|
<ThemedText>
|
|
38
|
-
{submitting ? t('common.
|
|
38
|
+
{submitting ? t('common.states.loading') : t('groups.join.submit')}
|
|
39
39
|
</ThemedText>
|
|
40
40
|
</Button>
|
|
41
41
|
);
|
|
@@ -48,7 +48,7 @@ export const useFooterControls = () => {
|
|
|
48
48
|
new Promise<boolean>((resolve) => {
|
|
49
49
|
Alert.alert('', t('jams.recording.stopConfirm'), [
|
|
50
50
|
{
|
|
51
|
-
text: t('common.cancel'),
|
|
51
|
+
text: t('common.actions.cancel'),
|
|
52
52
|
style: 'cancel',
|
|
53
53
|
onPress: () => resolve(false),
|
|
54
54
|
},
|
|
@@ -70,9 +70,7 @@ export const JamGuestForm = () => {
|
|
|
70
70
|
</View>
|
|
71
71
|
|
|
72
72
|
<View className="gap-2">
|
|
73
|
-
<Label nativeID="guest-email">
|
|
74
|
-
{t('jams.lobby.guestEmailLabel')}
|
|
75
|
-
</Label>
|
|
73
|
+
<Label nativeID="guest-email">{t('common.labels.email')}</Label>
|
|
76
74
|
<Input
|
|
77
75
|
aria-labelledby="guest-email"
|
|
78
76
|
value={guestData.email}
|
|
@@ -39,7 +39,7 @@ export const LeaveCloseButton = () => {
|
|
|
39
39
|
style: 'destructive',
|
|
40
40
|
onPress: () => void handleLeave(),
|
|
41
41
|
},
|
|
42
|
-
{ style: 'cancel', text: t('common.cancel') },
|
|
42
|
+
{ style: 'cancel', text: t('common.actions.cancel') },
|
|
43
43
|
]);
|
|
44
44
|
setConfirmOpen(false);
|
|
45
45
|
}, [confirmOpen, handleClose, handleLeave, setConfirmOpen, t]);
|
|
@@ -234,9 +234,9 @@ export const EventRsvpScopeDialog = forwardRef<
|
|
|
234
234
|
confirmText={
|
|
235
235
|
joiningWaitlist
|
|
236
236
|
? t('events.rsvp.joinWaitlist')
|
|
237
|
-
: t('
|
|
237
|
+
: t('common.actions.confirm')
|
|
238
238
|
}
|
|
239
|
-
cancelText={t('
|
|
239
|
+
cancelText={t('common.actions.cancel')}
|
|
240
240
|
disabled={confirmDisabled}
|
|
241
241
|
isLoading={isLoading}
|
|
242
242
|
/>
|
|
@@ -50,7 +50,7 @@ export const EventWaitlistJoinDialog = forwardRef<
|
|
|
50
50
|
}}
|
|
51
51
|
onConfirm={onConfirm}
|
|
52
52
|
confirmText={t('events.rsvp.joinWaitlist')}
|
|
53
|
-
cancelText={t('
|
|
53
|
+
cancelText={t('common.actions.cancel')}
|
|
54
54
|
disabled={isLoading}
|
|
55
55
|
isLoading={isLoading}
|
|
56
56
|
/>
|
|
@@ -47,7 +47,7 @@ export const GalleryModal = ({
|
|
|
47
47
|
<View className="flex-1 items-center justify-center bg-black/80">
|
|
48
48
|
<Pressable
|
|
49
49
|
accessibilityRole="button"
|
|
50
|
-
accessibilityLabel={t('
|
|
50
|
+
accessibilityLabel={t('common.actions.close')}
|
|
51
51
|
className="absolute right-4 top-12 z-50 rounded-full bg-primary p-2"
|
|
52
52
|
onPress={onClose}
|
|
53
53
|
>
|
|
@@ -44,7 +44,7 @@ export const CancelEventModal = forwardRef<
|
|
|
44
44
|
|
|
45
45
|
<SheetFooter
|
|
46
46
|
onCancel={() => bottomSheetClose(ref)}
|
|
47
|
-
cancelText={t('
|
|
47
|
+
cancelText={t('common.actions.cancel')}
|
|
48
48
|
onConfirm={handleDelete}
|
|
49
49
|
disabled={isLoading}
|
|
50
50
|
confirmText={
|
|
@@ -45,7 +45,7 @@ export const DeleteEventModal = forwardRef<
|
|
|
45
45
|
<SheetFooter
|
|
46
46
|
onCancel={() => bottomSheetClose(ref)}
|
|
47
47
|
onConfirm={handleDelete}
|
|
48
|
-
cancelText={t('
|
|
48
|
+
cancelText={t('common.actions.cancel')}
|
|
49
49
|
disabled={isLoading}
|
|
50
50
|
confirmText={
|
|
51
51
|
isLoading
|
|
@@ -85,7 +85,7 @@ export const ComposeAttachments: React.FC<MediaPreviewProps> = ({
|
|
|
85
85
|
<TouchableOpacity
|
|
86
86
|
onPress={handleAltModalPress}
|
|
87
87
|
accessibilityRole="button"
|
|
88
|
-
accessibilityLabel={t('
|
|
88
|
+
accessibilityLabel={t('common.labels.altText', {
|
|
89
89
|
defaultValue: 'Alt text',
|
|
90
90
|
})}
|
|
91
91
|
className="min-h-10 px-3 rounded-full bg-background/90 border border-border items-center justify-center"
|
|
@@ -118,7 +118,9 @@ export const DateSheet = forwardRef<BottomSheetModal, DateSheetProps>(
|
|
|
118
118
|
>
|
|
119
119
|
<ThemedText>
|
|
120
120
|
{t('common.form.switchTo')}{' '}
|
|
121
|
-
{mode === 'date'
|
|
121
|
+
{mode === 'date'
|
|
122
|
+
? t('common.form.time')
|
|
123
|
+
: t('common.labels.date')}
|
|
122
124
|
</ThemedText>
|
|
123
125
|
</Button>
|
|
124
126
|
<Button
|
|
@@ -141,9 +143,9 @@ export const DateSheet = forwardRef<BottomSheetModal, DateSheetProps>(
|
|
|
141
143
|
{t('common.form.select')}{' '}
|
|
142
144
|
{Platform.OS === 'ios'
|
|
143
145
|
? mode === 'date'
|
|
144
|
-
? t('common.
|
|
146
|
+
? t('common.labels.date')
|
|
145
147
|
: t('common.form.time')
|
|
146
|
-
: t('common.
|
|
148
|
+
: t('common.labels.date')}
|
|
147
149
|
</ThemedText>
|
|
148
150
|
|
|
149
151
|
{Platform.OS === 'ios' ? renderIOSPicker() : renderAndroidPicker()}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef
|
|
1
|
+
import React, { useRef } from 'react';
|
|
2
2
|
import { Pressable, View } from 'react-native';
|
|
3
3
|
import { BottomSheetModal } from '@gorhom/bottom-sheet';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
@@ -101,7 +101,6 @@ export const EventForm = ({
|
|
|
101
101
|
onNotifyChange,
|
|
102
102
|
}: EventFormProps) => {
|
|
103
103
|
const { t } = useTranslation();
|
|
104
|
-
const [endBeforeStart, setEndBeforeStart] = useState(false);
|
|
105
104
|
const startSheetRef = useRef<BottomSheetModal>(null);
|
|
106
105
|
const endSheetRef = useRef<BottomSheetModal>(null);
|
|
107
106
|
const untilSheetRef = useRef<BottomSheetModal>(null);
|
|
@@ -113,6 +112,9 @@ export const EventForm = ({
|
|
|
113
112
|
repeatFreq,
|
|
114
113
|
repeatEnd,
|
|
115
114
|
preview,
|
|
115
|
+
endBeforeStart,
|
|
116
|
+
changeStart,
|
|
117
|
+
changeEnd,
|
|
116
118
|
patchEvent,
|
|
117
119
|
setEvent,
|
|
118
120
|
setAudience,
|
|
@@ -348,7 +350,7 @@ export const EventForm = ({
|
|
|
348
350
|
|
|
349
351
|
<View className="gap-y-1">
|
|
350
352
|
<Label nativeID="event-visibility">
|
|
351
|
-
{t('
|
|
353
|
+
{t('common.labels.visibility')}
|
|
352
354
|
</Label>
|
|
353
355
|
<ThemedText className="text-sm text-muted-foreground">
|
|
354
356
|
{t('events.form.visibilityNotChangeable')}
|
|
@@ -447,21 +449,14 @@ export const EventForm = ({
|
|
|
447
449
|
ref={startSheetRef}
|
|
448
450
|
value={event.start}
|
|
449
451
|
timeZone={eventTimeZone}
|
|
450
|
-
onChange={
|
|
452
|
+
onChange={changeStart}
|
|
451
453
|
onClose={() => bottomSheetClose(startSheetRef)}
|
|
452
454
|
/>
|
|
453
455
|
<DateSheet
|
|
454
456
|
ref={endSheetRef}
|
|
455
457
|
value={event.end}
|
|
456
458
|
timeZone={eventTimeZone}
|
|
457
|
-
onChange={
|
|
458
|
-
if (end && event.start && new Date(end) <= new Date(event.start)) {
|
|
459
|
-
setEndBeforeStart(true);
|
|
460
|
-
return;
|
|
461
|
-
}
|
|
462
|
-
setEndBeforeStart(false);
|
|
463
|
-
patchEvent({ end });
|
|
464
|
-
}}
|
|
459
|
+
onChange={changeEnd}
|
|
465
460
|
onClose={() => bottomSheetClose(endSheetRef)}
|
|
466
461
|
/>
|
|
467
462
|
<DateSheet
|
|
@@ -31,10 +31,13 @@ jest.mock('react-native', () => {
|
|
|
31
31
|
const React = require('react');
|
|
32
32
|
const make = (tag: string) => (props: { children?: ReactNode }) =>
|
|
33
33
|
React.createElement(tag, null, props.children);
|
|
34
|
+
// forwards props so the tappable Jam URL's a11y/press handlers are testable
|
|
35
|
+
const makeTouchable = (tag: string) => (props: { children?: ReactNode }) =>
|
|
36
|
+
React.createElement(tag, props, props.children);
|
|
34
37
|
return {
|
|
35
38
|
View: make('View'),
|
|
36
39
|
Pressable: make('Pressable'),
|
|
37
|
-
TouchableOpacity:
|
|
40
|
+
TouchableOpacity: makeTouchable('TouchableOpacity'),
|
|
38
41
|
Image: make('Image'),
|
|
39
42
|
Share: { share: jest.fn() },
|
|
40
43
|
};
|
|
@@ -93,9 +96,11 @@ jest.mock('@react-navigation/native-stack', () => ({}));
|
|
|
93
96
|
// --- native third-party modules (no native impl in node) ------------------
|
|
94
97
|
jest.mock('react-native-fs', () => ({ default: { CachesDirectoryPath: '' } }));
|
|
95
98
|
jest.mock('@react-native-clipboard/clipboard', () => ({
|
|
99
|
+
__esModule: true,
|
|
96
100
|
default: { setString: jest.fn(), getString: jest.fn() },
|
|
97
101
|
}));
|
|
98
102
|
jest.mock('react-native-toast-message', () => ({
|
|
103
|
+
__esModule: true,
|
|
99
104
|
default: { show: jest.fn() },
|
|
100
105
|
}));
|
|
101
106
|
jest.mock('@gorhom/bottom-sheet', () => ({
|
|
@@ -229,6 +234,8 @@ jest.mock('../../index', () => ({
|
|
|
229
234
|
useNewPostModal: () => ({ openNewPost: jest.fn() }),
|
|
230
235
|
}));
|
|
231
236
|
|
|
237
|
+
import Clipboard from '@react-native-clipboard/clipboard';
|
|
238
|
+
import Toast from 'react-native-toast-message';
|
|
232
239
|
import { FullEvent } from './FullEvent';
|
|
233
240
|
|
|
234
241
|
type TreeNode = {
|
|
@@ -255,6 +262,20 @@ function joinButton(node: TreeNode): TreeNode | undefined {
|
|
|
255
262
|
: undefined;
|
|
256
263
|
}
|
|
257
264
|
|
|
265
|
+
// The tappable Jam URL: the only TouchableOpacity exposed as a link.
|
|
266
|
+
function jamUrlLink(node: TreeNode): TreeNode | undefined {
|
|
267
|
+
if (
|
|
268
|
+
node.type === 'TouchableOpacity' &&
|
|
269
|
+
node.props?.accessibilityRole === 'link'
|
|
270
|
+
)
|
|
271
|
+
return node;
|
|
272
|
+
for (const c of node.children || []) {
|
|
273
|
+
const found = typeof c === 'string' ? undefined : jamUrlLink(c);
|
|
274
|
+
if (found) return found;
|
|
275
|
+
}
|
|
276
|
+
return undefined;
|
|
277
|
+
}
|
|
278
|
+
|
|
258
279
|
const BASE_POST = {
|
|
259
280
|
id: 'post-1',
|
|
260
281
|
profile: { id: 'owner-1', displayName: 'Owner' },
|
|
@@ -381,3 +402,66 @@ test('7. button is a pure navigation trigger — capacity gated in JamSession, n
|
|
|
381
402
|
});
|
|
382
403
|
tree.unmount();
|
|
383
404
|
});
|
|
405
|
+
|
|
406
|
+
// Tappable Jam URL (issue #2063): the URL text on a jam event opens the
|
|
407
|
+
// in-app JamSession instead of being inert text.
|
|
408
|
+
describe('tappable Jam URL', () => {
|
|
409
|
+
const link = (tree: ReactTestRenderer.ReactTestRenderer) =>
|
|
410
|
+
jamUrlLink(tree.toJSON() as unknown as TreeNode);
|
|
411
|
+
|
|
412
|
+
test('8. jam event -> URL renders as an accessible link with a tap target', () => {
|
|
413
|
+
const tree = render(BASE_POST);
|
|
414
|
+
const row = link(tree);
|
|
415
|
+
expect(row).toBeDefined();
|
|
416
|
+
expect(row!.props?.accessibilityLabel).toBe("Open this event's jam");
|
|
417
|
+
expect(row!.props?.activeOpacity).toBe(0.7);
|
|
418
|
+
expect(JSON.stringify(row!.children)).toContain('openpeeps.org/events');
|
|
419
|
+
tree.unmount();
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
test('9. press forwards the occurrence, and omits it at the base view', () => {
|
|
423
|
+
const occTree = render(BASE_POST, 'occ-1');
|
|
424
|
+
ReactTestRenderer.act(() => {
|
|
425
|
+
(link(occTree)!.props?.onPress as () => void)();
|
|
426
|
+
});
|
|
427
|
+
expect(mockNavigate).toHaveBeenCalledWith('JamSession', {
|
|
428
|
+
jamId: 'post-1',
|
|
429
|
+
occurrence: 'occ-1',
|
|
430
|
+
});
|
|
431
|
+
occTree.unmount();
|
|
432
|
+
|
|
433
|
+
const baseTree = render(BASE_POST);
|
|
434
|
+
ReactTestRenderer.act(() => {
|
|
435
|
+
(link(baseTree)!.props?.onPress as () => void)();
|
|
436
|
+
});
|
|
437
|
+
expect(mockNavigate).toHaveBeenCalledWith('JamSession', {
|
|
438
|
+
jamId: 'post-1',
|
|
439
|
+
occurrence: undefined,
|
|
440
|
+
});
|
|
441
|
+
baseTree.unmount();
|
|
442
|
+
});
|
|
443
|
+
|
|
444
|
+
test('10. long-press copies the full web URL and confirms with a toast', () => {
|
|
445
|
+
const tree = render(BASE_POST, 'occ-1');
|
|
446
|
+
ReactTestRenderer.act(() => {
|
|
447
|
+
(link(tree)!.props?.onLongPress as () => void)();
|
|
448
|
+
});
|
|
449
|
+
expect(Clipboard.setString).toHaveBeenCalledWith(
|
|
450
|
+
'https://openpeeps.org/events/post-1/jam?occurrence=occ-1'
|
|
451
|
+
);
|
|
452
|
+
expect(Toast.show).toHaveBeenCalledWith({
|
|
453
|
+
type: 'success',
|
|
454
|
+
text1: 'Link copied to clipboard',
|
|
455
|
+
});
|
|
456
|
+
tree.unmount();
|
|
457
|
+
});
|
|
458
|
+
|
|
459
|
+
test('11. non-jam event -> no tappable Jam URL', () => {
|
|
460
|
+
const tree = render({
|
|
461
|
+
...BASE_POST,
|
|
462
|
+
data: { ...BASE_POST.data, jam: false },
|
|
463
|
+
});
|
|
464
|
+
expect(link(tree)).toBeUndefined();
|
|
465
|
+
tree.unmount();
|
|
466
|
+
});
|
|
467
|
+
});
|
|
@@ -138,6 +138,11 @@ export const FullEvent: React.FC<FullEventProps> = ({ post, occurrence }) => {
|
|
|
138
138
|
? `${BASE_URL}/events/${post?.id}/jam?occurrence=${encodeURIComponent(occurrence)}`
|
|
139
139
|
: `${BASE_URL}/events/${post?.id}/jam`;
|
|
140
140
|
|
|
141
|
+
const copyJamLink = () => {
|
|
142
|
+
Clipboard.setString(jamLink);
|
|
143
|
+
Toast.show({ type: 'success', text1: 'Link copied to clipboard' });
|
|
144
|
+
};
|
|
145
|
+
|
|
141
146
|
const onRepostToFeed = () =>
|
|
142
147
|
openNewPost({
|
|
143
148
|
initialContent: `Join our event happening at ${BASE_URL}/post/${post?.id}`,
|
|
@@ -251,13 +256,7 @@ export const FullEvent: React.FC<FullEventProps> = ({ post, occurrence }) => {
|
|
|
251
256
|
</DropdownMenuItem>
|
|
252
257
|
<DropdownMenuItem
|
|
253
258
|
className="flex-row gap-x-2 items-center"
|
|
254
|
-
onPress={
|
|
255
|
-
Clipboard.setString(jamLink);
|
|
256
|
-
Toast.show({
|
|
257
|
-
type: 'success',
|
|
258
|
-
text1: 'Link copied to clipboard',
|
|
259
|
-
});
|
|
260
|
-
}}
|
|
259
|
+
onPress={copyJamLink}
|
|
261
260
|
>
|
|
262
261
|
<Link2Icon className="text-muted-foreground" size={18} />
|
|
263
262
|
<ThemedText>Copy link</ThemedText>
|
|
@@ -345,9 +344,25 @@ export const FullEvent: React.FC<FullEventProps> = ({ post, occurrence }) => {
|
|
|
345
344
|
<ThemedText className="text-xl">
|
|
346
345
|
{t('events.location.jam', { defaultValue: 'Jam Event' })}
|
|
347
346
|
</ThemedText>
|
|
348
|
-
<
|
|
349
|
-
|
|
350
|
-
|
|
347
|
+
<TouchableOpacity
|
|
348
|
+
accessibilityRole="link"
|
|
349
|
+
accessibilityLabel={t('events.location.openJam', {
|
|
350
|
+
defaultValue: "Open this event's jam",
|
|
351
|
+
})}
|
|
352
|
+
activeOpacity={0.7}
|
|
353
|
+
className="mt-2 -my-1 px-2 py-1"
|
|
354
|
+
onPress={() =>
|
|
355
|
+
navigation.navigate('JamSession', {
|
|
356
|
+
jamId: post.id,
|
|
357
|
+
occurrence,
|
|
358
|
+
})
|
|
359
|
+
}
|
|
360
|
+
onLongPress={copyJamLink}
|
|
361
|
+
>
|
|
362
|
+
<ThemedText className="text-muted-foreground underline">
|
|
363
|
+
{truncateText(jamLink, 30)}
|
|
364
|
+
</ThemedText>
|
|
365
|
+
</TouchableOpacity>
|
|
351
366
|
</>
|
|
352
367
|
) : event?.url ? (
|
|
353
368
|
<>
|
|
@@ -443,7 +458,9 @@ export const FullEvent: React.FC<FullEventProps> = ({ post, occurrence }) => {
|
|
|
443
458
|
}
|
|
444
459
|
>
|
|
445
460
|
<ThemedText>
|
|
446
|
-
{t('
|
|
461
|
+
{t('common.labels.description', {
|
|
462
|
+
defaultValue: 'Description',
|
|
463
|
+
})}
|
|
447
464
|
</ThemedText>
|
|
448
465
|
</TabsTrigger>
|
|
449
466
|
) : null}
|
|
@@ -563,7 +580,7 @@ export const FullEvent: React.FC<FullEventProps> = ({ post, occurrence }) => {
|
|
|
563
580
|
</ThemedText>
|
|
564
581
|
) : recordingsQuery.isLoading ? (
|
|
565
582
|
<ThemedText className="py-4 text-sm text-muted-foreground">
|
|
566
|
-
{t('common.loading', { defaultValue: 'Loading…' })}
|
|
583
|
+
{t('common.states.loading', { defaultValue: 'Loading…' })}
|
|
567
584
|
</ThemedText>
|
|
568
585
|
) : recordingsQuery.data?.length ? (
|
|
569
586
|
recordingsQuery.data.map((recording: JamRecording) => (
|
|
@@ -741,7 +758,7 @@ const JamRecordingItem = ({
|
|
|
741
758
|
</ThemedText>
|
|
742
759
|
<SheetFooter
|
|
743
760
|
onCancel={() => setConfirmOpen(false)}
|
|
744
|
-
cancelText={t('common.cancel')}
|
|
761
|
+
cancelText={t('common.actions.cancel')}
|
|
745
762
|
onConfirm={() => void handleDelete()}
|
|
746
763
|
confirmText={t('events.deleteRecording', {
|
|
747
764
|
defaultValue: 'Delete recording',
|
|
@@ -73,7 +73,7 @@ export const FollowUnfollowButton = ({
|
|
|
73
73
|
className={isFollowing ? undefined : 'text-primary-foreground'}
|
|
74
74
|
>
|
|
75
75
|
{isLoading
|
|
76
|
-
? t('common.
|
|
76
|
+
? t('common.states.loading')
|
|
77
77
|
: isFollowing
|
|
78
78
|
? t('profile.actions.unfollow')
|
|
79
79
|
: t('profile.actions.follow')}
|
|
@@ -46,7 +46,7 @@ const SummaryBody = ({ summary }: { summary: ProfileActivitySummaryData }) => {
|
|
|
46
46
|
<CountSection title={t('profile.activity.yourContent')}>
|
|
47
47
|
<CountCard
|
|
48
48
|
value={summary.postsCount}
|
|
49
|
-
label={t('
|
|
49
|
+
label={t('common.entities.posts')}
|
|
50
50
|
/>
|
|
51
51
|
<CountCard
|
|
52
52
|
value={summary.repliesCount}
|
|
@@ -54,7 +54,7 @@ const SummaryBody = ({ summary }: { summary: ProfileActivitySummaryData }) => {
|
|
|
54
54
|
/>
|
|
55
55
|
<CountCard
|
|
56
56
|
value={summary.eventsCount}
|
|
57
|
-
label={t('
|
|
57
|
+
label={t('common.entities.events')}
|
|
58
58
|
/>
|
|
59
59
|
</CountSection>
|
|
60
60
|
|
|
@@ -73,11 +73,11 @@ const SummaryBody = ({ summary }: { summary: ProfileActivitySummaryData }) => {
|
|
|
73
73
|
/>
|
|
74
74
|
<CountCard
|
|
75
75
|
value={summary.bookmarksCount}
|
|
76
|
-
label={t('
|
|
76
|
+
label={t('common.entities.bookmarks')}
|
|
77
77
|
/>
|
|
78
78
|
<CountCard
|
|
79
79
|
value={summary.groupsCount}
|
|
80
|
-
label={t('
|
|
80
|
+
label={t('common.entities.groups')}
|
|
81
81
|
/>
|
|
82
82
|
</CountSection>
|
|
83
83
|
|
|
@@ -38,7 +38,7 @@ export const ProfileBadge = ({
|
|
|
38
38
|
{onRemove ? (
|
|
39
39
|
<Pressable
|
|
40
40
|
accessibilityRole="button"
|
|
41
|
-
accessibilityLabel={t('
|
|
41
|
+
accessibilityLabel={t('common.actions.remove', {
|
|
42
42
|
defaultValue: 'Remove',
|
|
43
43
|
})}
|
|
44
44
|
className="ml-0.5 rounded-full p-0.5"
|
|
@@ -68,7 +68,7 @@ export const ProfilePageAction = ({
|
|
|
68
68
|
t('profile.block.title', { handle: profile.handle }),
|
|
69
69
|
t('profile.block.description', { handle: profile.handle }),
|
|
70
70
|
[
|
|
71
|
-
{ text: t('common.cancel'), style: 'cancel' },
|
|
71
|
+
{ text: t('common.actions.cancel'), style: 'cancel' },
|
|
72
72
|
{
|
|
73
73
|
text: t('profile.block.confirm'),
|
|
74
74
|
style: 'destructive',
|
|
@@ -60,7 +60,7 @@ export const ProfilePostsAndReplies = ({
|
|
|
60
60
|
className="w-full flex-row rounded-none border-b border-muted bg-transparent p-0"
|
|
61
61
|
>
|
|
62
62
|
<TabsTrigger value="posts" className={tabClass('posts')}>
|
|
63
|
-
<ThemedText>{t('
|
|
63
|
+
<ThemedText>{t('common.entities.posts')}</ThemedText>
|
|
64
64
|
</TabsTrigger>
|
|
65
65
|
{isCurrentProfile ? (
|
|
66
66
|
<TabsTrigger value="activity" className={tabClass('activity')}>
|
|
@@ -68,7 +68,7 @@ export const ProfilePostsAndReplies = ({
|
|
|
68
68
|
</TabsTrigger>
|
|
69
69
|
) : null}
|
|
70
70
|
<TabsTrigger value="groups" className={tabClass('groups')}>
|
|
71
|
-
<ThemedText>{t('
|
|
71
|
+
<ThemedText>{t('common.entities.groups')}</ThemedText>
|
|
72
72
|
</TabsTrigger>
|
|
73
73
|
</TabsList>
|
|
74
74
|
<TabsContent value="posts" className="p-0">
|
|
@@ -11,7 +11,7 @@ export type MediaPermissionType = 'photo' | 'video' | 'audio' | 'file';
|
|
|
11
11
|
|
|
12
12
|
const showPermissionAlert = (t: TFunction) => {
|
|
13
13
|
Alert.alert(t('media.permissions.title'), t('media.permissions.message'), [
|
|
14
|
-
{ text: t('common.cancel'), style: 'cancel' },
|
|
14
|
+
{ text: t('common.actions.cancel'), style: 'cancel' },
|
|
15
15
|
{
|
|
16
16
|
text: t('media.permissions.openSettings'),
|
|
17
17
|
onPress: () => Linking.openSettings(),
|
package/src/pages/Members.tsx
CHANGED
|
@@ -50,7 +50,7 @@ export const Members: React.FC<DirectoryProps> = ({ navigation }) => {
|
|
|
50
50
|
}, [searchQuery, profiles, currentProfile]);
|
|
51
51
|
|
|
52
52
|
useSetPageHeader(
|
|
53
|
-
t('
|
|
53
|
+
t('common.entities.members'),
|
|
54
54
|
isSearchButtonClicked ? (
|
|
55
55
|
<View className="max-w-[200px] flex-row items-center">
|
|
56
56
|
<Input
|
package/src/pages/auth/Login.tsx
CHANGED
|
@@ -150,7 +150,7 @@ export const Register = ({
|
|
|
150
150
|
name="handle"
|
|
151
151
|
render={({ field }) => (
|
|
152
152
|
<FormInput
|
|
153
|
-
label={t('
|
|
153
|
+
label={t('common.labels.handle')}
|
|
154
154
|
placeholder={t('auth.register.handlePlaceholder')}
|
|
155
155
|
autoCapitalize="none"
|
|
156
156
|
{...field}
|
|
@@ -162,7 +162,7 @@ export const Register = ({
|
|
|
162
162
|
name="displayName"
|
|
163
163
|
render={({ field }) => (
|
|
164
164
|
<FormInput
|
|
165
|
-
label={t('
|
|
165
|
+
label={t('common.labels.name')}
|
|
166
166
|
placeholder={t('auth.register.namePlaceholder')}
|
|
167
167
|
{...field}
|
|
168
168
|
/>
|
|
@@ -173,7 +173,7 @@ export const Register = ({
|
|
|
173
173
|
name="email"
|
|
174
174
|
render={({ field }) => (
|
|
175
175
|
<FormInput
|
|
176
|
-
label={t('
|
|
176
|
+
label={t('common.labels.email')}
|
|
177
177
|
placeholder={t('auth.register.emailPlaceholder')}
|
|
178
178
|
autoCapitalize="none"
|
|
179
179
|
keyboardType="email-address"
|
|
@@ -204,7 +204,7 @@ export const ConversationShow = ({ route, navigation }: ConversationProps) => {
|
|
|
204
204
|
}, [id, currentProfile, messages, isLoading, markPostsSeen]);
|
|
205
205
|
|
|
206
206
|
const searchLabel = searchOpen
|
|
207
|
-
? t('common.close', { defaultValue: 'Close' })
|
|
207
|
+
? t('common.actions.close', { defaultValue: 'Close' })
|
|
208
208
|
: t('conversations.search.toggle', {
|
|
209
209
|
defaultValue: 'Search this conversation',
|
|
210
210
|
});
|
|
@@ -46,7 +46,7 @@ export const EventsIndex = ({
|
|
|
46
46
|
const visibility = useDefaultVisibility();
|
|
47
47
|
|
|
48
48
|
useSetPageHeader(
|
|
49
|
-
t('
|
|
49
|
+
t('common.entities.events', { defaultValue: 'Events' }),
|
|
50
50
|
<DropdownMenu>
|
|
51
51
|
<DropdownMenuTrigger asChild className="px-2">
|
|
52
52
|
<Pressable>
|
|
@@ -40,7 +40,7 @@ export const EditGroupInfo = ({ route }: EditGroupInfoProps) => {
|
|
|
40
40
|
title={
|
|
41
41
|
submitting
|
|
42
42
|
? t('common.saving', { defaultValue: 'Saving…' })
|
|
43
|
-
: t('common.save', { defaultValue: 'Save' })
|
|
43
|
+
: t('common.actions.save', { defaultValue: 'Save' })
|
|
44
44
|
}
|
|
45
45
|
onPress={() => void submit()}
|
|
46
46
|
disabled={submitting || !groupData}
|
|
@@ -72,7 +72,7 @@ export const EditGroupRoles = ({ route }: EditGroupRolesProps) => {
|
|
|
72
72
|
title={
|
|
73
73
|
submitting
|
|
74
74
|
? t('common.saving', { defaultValue: 'Saving…' })
|
|
75
|
-
: t('common.save', { defaultValue: 'Save' })
|
|
75
|
+
: t('common.actions.save', { defaultValue: 'Save' })
|
|
76
76
|
}
|
|
77
77
|
onPress={() => void submit()}
|
|
78
78
|
disabled={submitting || !groupData || !canEditCapabilities}
|
|
@@ -63,7 +63,7 @@ export const GroupsIndex: React.FC<GroupsProps> = ({ navigation }) => {
|
|
|
63
63
|
|
|
64
64
|
const canCreate = canCreateGroup(currentProfile?.roles ?? []);
|
|
65
65
|
|
|
66
|
-
useSetPageHeader(t('
|
|
66
|
+
useSetPageHeader(t('common.entities.groups', { defaultValue: 'Groups' }));
|
|
67
67
|
useSetPlusButtonActions(
|
|
68
68
|
canCreate
|
|
69
69
|
? {
|
|
@@ -147,7 +147,7 @@ export const GroupInfoAsComponent: React.FC<GroupInfoAsComponentProps> = ({
|
|
|
147
147
|
</View>
|
|
148
148
|
<View>
|
|
149
149
|
<ThemedText className="font-semibold">
|
|
150
|
-
{t('
|
|
150
|
+
{t('common.labels.visibility')}
|
|
151
151
|
</ThemedText>
|
|
152
152
|
<ThemedText className="">
|
|
153
153
|
{t(`groups.visibility.${visibilityValue}.description`)}
|
|
@@ -24,8 +24,8 @@ export const GroupMembers = ({ route }: GroupMembersProps) => {
|
|
|
24
24
|
const group = groupQuery.data;
|
|
25
25
|
|
|
26
26
|
const title = group
|
|
27
|
-
? `${truncateText(groupName(group), 20)} - ${t('
|
|
28
|
-
: t('
|
|
27
|
+
? `${truncateText(groupName(group), 20)} - ${t('common.entities.members')}`
|
|
28
|
+
: t('common.entities.members');
|
|
29
29
|
|
|
30
30
|
useSetPageHeader(
|
|
31
31
|
title,
|
package/src/pages/groups/New.tsx
CHANGED
|
@@ -75,7 +75,7 @@ export const NewGroup: React.FC<NewGroupProps> = ({ navigation }) => {
|
|
|
75
75
|
/>
|
|
76
76
|
<View className="gap-y-2 px-1">
|
|
77
77
|
<Label nativeID="group-members">
|
|
78
|
-
{t('
|
|
78
|
+
{t('common.entities.members', { defaultValue: 'Members' })}
|
|
79
79
|
</Label>
|
|
80
80
|
<ProfilesInput
|
|
81
81
|
value={members}
|
|
@@ -120,10 +120,10 @@ export const GroupShow = ({ route, navigation }: GroupProps) => {
|
|
|
120
120
|
>
|
|
121
121
|
<TabsList className="w-full flex-row rounded-none border-b border-muted bg-transparent p-0 px-3">
|
|
122
122
|
<TabsTrigger value="posts" className={tabClass('posts')}>
|
|
123
|
-
<ThemedText>{t('
|
|
123
|
+
<ThemedText>{t('common.entities.posts')}</ThemedText>
|
|
124
124
|
</TabsTrigger>
|
|
125
125
|
<TabsTrigger value="events" className={tabClass('events')}>
|
|
126
|
-
<ThemedText>{t('
|
|
126
|
+
<ThemedText>{t('common.entities.events')}</ThemedText>
|
|
127
127
|
</TabsTrigger>
|
|
128
128
|
<TabsTrigger
|
|
129
129
|
value="resources"
|
|
@@ -135,7 +135,7 @@ export const GroupShow = ({ route, navigation }: GroupProps) => {
|
|
|
135
135
|
value="description"
|
|
136
136
|
className={tabClass('description')}
|
|
137
137
|
>
|
|
138
|
-
<ThemedText>{t('
|
|
138
|
+
<ThemedText>{t('common.labels.description')}</ThemedText>
|
|
139
139
|
</TabsTrigger>
|
|
140
140
|
</TabsList>
|
|
141
141
|
<TabsContent value="posts" className="p-0">
|
|
@@ -106,9 +106,7 @@ export const AccessTokensSettings: React.FC<AccessTokensSettingsProps> = () => {
|
|
|
106
106
|
{t('settings.accessTokens.createDescription')}
|
|
107
107
|
</ThemedText>
|
|
108
108
|
<View className="gap-2">
|
|
109
|
-
<Label nativeID="token-name">
|
|
110
|
-
{t('settings.accessTokens.name')}
|
|
111
|
-
</Label>
|
|
109
|
+
<Label nativeID="token-name">{t('common.labels.name')}</Label>
|
|
112
110
|
<Input
|
|
113
111
|
value={form.name}
|
|
114
112
|
placeholder={t('settings.accessTokens.namePlaceholder')}
|
|
@@ -117,7 +115,7 @@ export const AccessTokensSettings: React.FC<AccessTokensSettingsProps> = () => {
|
|
|
117
115
|
</View>
|
|
118
116
|
<View className="gap-2">
|
|
119
117
|
<Label nativeID="token-description">
|
|
120
|
-
{t('
|
|
118
|
+
{t('common.labels.description')}
|
|
121
119
|
</Label>
|
|
122
120
|
<Input
|
|
123
121
|
value={form.description ?? ''}
|
|
@@ -166,7 +164,7 @@ export const AccessTokensSettings: React.FC<AccessTokensSettingsProps> = () => {
|
|
|
166
164
|
disabled={(form.scopes?.length ?? 0) === 1}
|
|
167
165
|
onPress={() => removeScope(index)}
|
|
168
166
|
>
|
|
169
|
-
<ThemedText>{t('common.remove')}</ThemedText>
|
|
167
|
+
<ThemedText>{t('common.actions.remove')}</ThemedText>
|
|
170
168
|
</Button>
|
|
171
169
|
</View>
|
|
172
170
|
))}
|
|
@@ -233,7 +231,7 @@ export const AccessTokensSettings: React.FC<AccessTokensSettingsProps> = () => {
|
|
|
233
231
|
{t('settings.accessTokens.expiresAt')}:{' '}
|
|
234
232
|
{token.expiresAt
|
|
235
233
|
? new Date(token.expiresAt).toLocaleString()
|
|
236
|
-
: t('
|
|
234
|
+
: t('common.states.never')}
|
|
237
235
|
</ThemedText>
|
|
238
236
|
</View>
|
|
239
237
|
<Button
|
|
@@ -152,7 +152,9 @@ export const AccountSettings: React.FC<AccountSettingsProps> = () => {
|
|
|
152
152
|
useSetPageHeader(
|
|
153
153
|
t('settings.account.title', { defaultValue: 'Account' }),
|
|
154
154
|
<HeaderActionButton
|
|
155
|
-
title={
|
|
155
|
+
title={
|
|
156
|
+
isSubmitting ? t('common.states.loading') : t('common.actions.save')
|
|
157
|
+
}
|
|
156
158
|
onPress={() => void handleSubmit()}
|
|
157
159
|
disabled={isSubmitting}
|
|
158
160
|
loading={isSubmitting}
|
|
@@ -179,7 +181,7 @@ export const AccountSettings: React.FC<AccountSettingsProps> = () => {
|
|
|
179
181
|
name="email"
|
|
180
182
|
render={({ field }) => (
|
|
181
183
|
<FormInput
|
|
182
|
-
label={t('
|
|
184
|
+
label={t('common.labels.email')}
|
|
183
185
|
placeholder={t('settings.account.emailPlaceholder')}
|
|
184
186
|
{...field}
|
|
185
187
|
value={field.value || ''}
|
|
@@ -35,7 +35,7 @@ export const FeedSettings: React.FC<FeedSettingsProps> = () => {
|
|
|
35
35
|
useSetPageHeader(
|
|
36
36
|
t('settings.feed.title'),
|
|
37
37
|
<HeaderActionButton
|
|
38
|
-
title={submitting ? t('common.
|
|
38
|
+
title={submitting ? t('common.states.loading') : t('common.actions.save')}
|
|
39
39
|
onPress={() => void handleSubmit()}
|
|
40
40
|
disabled={submitting}
|
|
41
41
|
loading={submitting}
|
|
@@ -42,7 +42,7 @@ export const LanguageSettings: React.FC<LanguageSettingsProps> = () => {
|
|
|
42
42
|
useSetPageHeader(
|
|
43
43
|
t('settings.language.title'),
|
|
44
44
|
<HeaderActionButton
|
|
45
|
-
title={saving ? t('common.
|
|
45
|
+
title={saving ? t('common.states.loading') : t('common.actions.save')}
|
|
46
46
|
onPress={() => void save()}
|
|
47
47
|
disabled={saving}
|
|
48
48
|
loading={saving}
|
|
@@ -122,10 +122,9 @@ export const PushEnabledDevices: React.FC<PushEnabledDevicesProps> = () => {
|
|
|
122
122
|
onPress={() => setConfirmId(null)}
|
|
123
123
|
>
|
|
124
124
|
<Text>
|
|
125
|
-
{t(
|
|
126
|
-
'
|
|
127
|
-
|
|
128
|
-
)}
|
|
125
|
+
{t('common.actions.cancel', {
|
|
126
|
+
defaultValue: 'Cancel',
|
|
127
|
+
})}
|
|
129
128
|
</Text>
|
|
130
129
|
</Button>
|
|
131
130
|
</View>
|
|
@@ -62,7 +62,7 @@ export const ThemeSettings: React.FC<ThemeSettingsProps> = () => {
|
|
|
62
62
|
useSetPageHeader(
|
|
63
63
|
t('settings.theme.title'),
|
|
64
64
|
<HeaderActionButton
|
|
65
|
-
title={submitting ? t('common.
|
|
65
|
+
title={submitting ? t('common.states.loading') : t('common.actions.save')}
|
|
66
66
|
onPress={() => void handleSubmit()}
|
|
67
67
|
disabled={submitting}
|
|
68
68
|
loading={submitting}
|
|
@@ -42,7 +42,7 @@ export const TimezoneSettings: React.FC<TimezoneSettingsProps> = () => {
|
|
|
42
42
|
useSetPageHeader(
|
|
43
43
|
t('settings.timezone.title'),
|
|
44
44
|
<HeaderActionButton
|
|
45
|
-
title={saving ? t('common.
|
|
45
|
+
title={saving ? t('common.states.loading') : t('common.actions.save')}
|
|
46
46
|
onPress={() => void save()}
|
|
47
47
|
disabled={saving}
|
|
48
48
|
loading={saving}
|