@openpeepshq/rn-components 0.3.9 → 0.3.12
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 +3 -3
- package/src/components/conversations/ConversationMessageBubble.tsx +1 -1
- package/src/components/custom/common/index.ts +0 -1
- package/src/components/custom/index.ts +0 -1
- package/src/components/custom/navigation/side-menu.tsx +2 -2
- package/src/components/groups/GroupOptionsMenu.tsx +13 -5
- package/src/components/index.ts +1 -0
- package/src/components/jams/CreateNewJam.tsx +11 -10
- package/src/components/jams/JamActionsFooter.tsx +37 -51
- package/src/components/jams/JamCard.tsx +5 -5
- package/src/components/jams/JamLobby.tsx +2 -1
- package/src/components/layout/AuthLayout.tsx +120 -0
- package/src/components/layout/ContentHeader.tsx +62 -0
- package/src/components/layout/HeaderActionButton.tsx +23 -0
- package/src/components/layout/HeaderMobile.tsx +96 -0
- package/src/components/layout/PlusButton.tsx +26 -0
- package/src/components/layout/RootLayout.tsx +30 -0
- package/src/components/layout/index.ts +13 -0
- package/src/components/layout/pageChrome.tsx +75 -0
- package/src/components/navigation/auth-navigator.tsx +2 -2
- package/src/components/navigation/main-navigator.tsx +17 -1
- package/src/components/navigation/parent-back.ts +139 -0
- package/src/components/navigation/tab-navigator.tsx +2 -0
- package/src/components/notifications/types/JamStarted.tsx +8 -6
- package/src/components/notifications/types/Reply.tsx +7 -10
- package/src/components/post/NewEventButton.tsx +23 -16
- package/src/components/post/NewNoteButton.tsx +15 -13
- package/src/components/post/pieces/EventRsvpButton.tsx +22 -18
- package/src/components/post/pieces/ParticipantsCard.tsx +4 -20
- package/src/components/post/types/Article.tsx +3 -1
- package/src/components/post/types/event/CardEvent.tsx +1 -1
- package/src/components/post/types/event/FullEvent.tsx +156 -37
- package/src/components/profile/ProfileCard.tsx +9 -2
- package/src/components/profile/ProfileFromId.tsx +1 -1
- package/src/components/ui/button.tsx +1 -1
- package/src/pages/About.tsx +3 -5
- package/src/pages/CodeOfConduct.tsx +7 -7
- package/src/pages/Explore.tsx +87 -127
- package/src/pages/Members.tsx +31 -39
- package/src/pages/Notifications.tsx +6 -13
- package/src/pages/PostDetail.tsx +22 -16
- package/src/pages/Profile.tsx +3 -2
- package/src/pages/Tags.tsx +72 -13
- package/src/pages/Welcome.tsx +3 -8
- package/src/pages/articles/Edit.tsx +18 -15
- package/src/pages/articles/Index.tsx +11 -21
- package/src/pages/articles/New.tsx +18 -15
- package/src/pages/conversations/Index.tsx +44 -68
- package/src/pages/conversations/Info.tsx +6 -5
- package/src/pages/conversations/New.tsx +14 -13
- package/src/pages/conversations/NewDraft.tsx +5 -5
- package/src/pages/conversations/Show.tsx +24 -22
- package/src/pages/events/Edit.tsx +14 -13
- package/src/pages/events/Index.tsx +28 -32
- package/src/pages/events/My.tsx +7 -7
- package/src/pages/events/New.tsx +14 -13
- package/src/pages/feeds/Bookmarks.tsx +3 -9
- package/src/pages/feeds/Local.tsx +3 -10
- package/src/pages/feeds/My.tsx +3 -9
- package/src/pages/groups/Edit.tsx +6 -7
- package/src/pages/groups/EditInfo.tsx +20 -17
- package/src/pages/groups/EditRoles.tsx +18 -19
- package/src/pages/groups/Index.tsx +82 -119
- package/src/pages/groups/Info.tsx +22 -23
- package/src/pages/groups/Members.tsx +9 -8
- package/src/pages/groups/New.tsx +18 -15
- package/src/pages/groups/Show.tsx +6 -5
- package/src/pages/jams/Index.tsx +8 -26
- package/src/pages/jams/New.tsx +14 -11
- package/src/pages/posts/Edit.tsx +20 -17
- package/src/pages/posts/New.tsx +30 -29
- package/src/pages/posts/Reply.tsx +20 -16
- package/src/pages/profile/Followers.tsx +9 -10
- package/src/pages/profile/Following.tsx +9 -10
- package/src/pages/settings/AccessTokens.tsx +6 -5
- package/src/pages/settings/Account.tsx +13 -12
- package/src/pages/settings/Blocked.tsx +5 -5
- package/src/pages/settings/Feed.tsx +13 -12
- package/src/pages/settings/Index.tsx +3 -11
- package/src/pages/settings/Language.tsx +36 -37
- package/src/pages/settings/NotificationPreferences.tsx +10 -12
- package/src/pages/settings/Notifications.tsx +10 -9
- package/src/pages/settings/PublicProfile.tsx +6 -6
- package/src/pages/settings/PushEnabledDevices.tsx +10 -9
- package/src/pages/settings/Theme.tsx +13 -12
- package/src/pages/settings/Timezone.tsx +27 -28
- package/src/theme/OpenPeepsThemeProvider.tsx +23 -12
- package/src/theme/utils.ts +10 -5
- package/tailwind.config.js +6 -0
- package/src/components/custom/common/plus-fab.tsx +0 -23
- package/src/components/custom/headers/generic-header.tsx +0 -88
- package/src/components/custom/headers/index.ts +0 -2
- package/src/components/custom/headers/tab-screens-header.tsx +0 -199
- package/src/components/navigation/auth-wrapper.tsx +0 -107
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { useOpenpeeps } from '@openpeepshq/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import { Image, ImageBackground, View } from 'react-native';
|
|
5
|
-
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
|
6
|
-
import { ThemedText } from '../ui/themed-text';
|
|
7
|
-
import { isProduction } from '../../lib/constants';
|
|
8
|
-
import { BASE_URL } from '../../lib/constants';
|
|
9
|
-
import { useWindowSize } from '../../hooks/index';
|
|
10
|
-
import { getTheme } from '@openpeepshq/common';
|
|
11
|
-
import { toAbsoluteMediaUrl } from '../../lib/media-url';
|
|
12
|
-
|
|
13
|
-
const DevBanner = () =>
|
|
14
|
-
(!isProduction && (
|
|
15
|
-
<View className="absolute bg-white/80 z-10 ml-8 mr-8 w-auto top-64 p-4 rounded-lg">
|
|
16
|
-
<ThemedText className="text-center text-destructive">
|
|
17
|
-
Test Backend ({BASE_URL})
|
|
18
|
-
</ThemedText>
|
|
19
|
-
</View>
|
|
20
|
-
)) ||
|
|
21
|
-
null;
|
|
22
|
-
|
|
23
|
-
const Logo = ({ uri }: { uri?: string }) => {
|
|
24
|
-
if (!uri) {
|
|
25
|
-
return null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<Image
|
|
30
|
-
source={{ uri }}
|
|
31
|
-
className="absolute z-10 top-16 left-2 max-w-fit w-[206px] h-[26px]"
|
|
32
|
-
resizeMode="contain"
|
|
33
|
-
/>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const AuthImage = ({ children }: { children?: React.ReactNode }) => {
|
|
38
|
-
const { openpeepsApi } = useOpenpeeps();
|
|
39
|
-
const { data: serverInfo, isLoading } = openpeepsApi.useServerInfo();
|
|
40
|
-
const resolvedTheme = serverInfo
|
|
41
|
-
? getTheme(serverInfo.communityConfig)
|
|
42
|
-
: undefined;
|
|
43
|
-
const authBackgroundUri = resolvedTheme?.backgroundAuth;
|
|
44
|
-
const resolvedAuthBackgroundUri = toAbsoluteMediaUrl(authBackgroundUri);
|
|
45
|
-
const resolvedLogoUri = toAbsoluteMediaUrl(resolvedTheme?.logoSmall);
|
|
46
|
-
|
|
47
|
-
const content = (
|
|
48
|
-
<>
|
|
49
|
-
<Logo uri={resolvedLogoUri} />
|
|
50
|
-
<DevBanner />
|
|
51
|
-
{children}
|
|
52
|
-
</>
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
if (resolvedAuthBackgroundUri && !isLoading) {
|
|
56
|
-
return (
|
|
57
|
-
<ImageBackground
|
|
58
|
-
source={{ uri: resolvedAuthBackgroundUri }}
|
|
59
|
-
className="w-full justify-end flex-1"
|
|
60
|
-
>
|
|
61
|
-
{content}
|
|
62
|
-
</ImageBackground>
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<View className="w-full justify-end flex-1 bg-background">{content}</View>
|
|
68
|
-
);
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
const NarrowAuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
|
72
|
-
return (
|
|
73
|
-
<AuthImage>
|
|
74
|
-
<View className="px-2 pt-4 w-full bg-background min-h-[400px] pb-10">
|
|
75
|
-
{children}
|
|
76
|
-
</View>
|
|
77
|
-
</AuthImage>
|
|
78
|
-
);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
const WideAuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
|
82
|
-
return (
|
|
83
|
-
<View className="flex flex-1 flex-row">
|
|
84
|
-
<View className="flex-1">
|
|
85
|
-
<AuthImage />
|
|
86
|
-
</View>
|
|
87
|
-
<View className="flex flex-1 justify-center p-6">{children}</View>
|
|
88
|
-
</View>
|
|
89
|
-
);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export const AuthWrapper = ({ children }: { children: React.ReactNode }) => {
|
|
93
|
-
const { isMediumScreenOrLarger } = useWindowSize();
|
|
94
|
-
|
|
95
|
-
return (
|
|
96
|
-
<KeyboardAwareScrollView
|
|
97
|
-
contentContainerClassName="grow"
|
|
98
|
-
className="w-full flex bg-background"
|
|
99
|
-
>
|
|
100
|
-
{isMediumScreenOrLarger ? (
|
|
101
|
-
<WideAuthWrapper>{children}</WideAuthWrapper>
|
|
102
|
-
) : (
|
|
103
|
-
<NarrowAuthWrapper>{children}</NarrowAuthWrapper>
|
|
104
|
-
)}
|
|
105
|
-
</KeyboardAwareScrollView>
|
|
106
|
-
);
|
|
107
|
-
};
|