agora-appbuilder-core 3.0.10 → 3.0.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/Readme.md +0 -6
- package/package.json +2 -2
- package/template/_package-lock.json +4979 -7086
- package/template/agora-rn-uikit/src/Contexts/LocalUserContext.tsx +0 -4
- package/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +0 -18
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +0 -2
- package/template/agora-rn-uikit/src/Controls/BtnTemplate.tsx +26 -30
- package/template/agora-rn-uikit/src/Controls/Icons.ts +83 -30
- package/template/agora-rn-uikit/src/Controls/ImageIcon.tsx +6 -6
- package/template/agora-rn-uikit/src/Reducer/LocalMuteAudio.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/LocalMuteVideo.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/RemoteAudioStateChanged.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/RemoteVideoStateChanged.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UpdateDualStreamMode.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UserJoined.ts +0 -2
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteAudio.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UserMuteRemoteVideo.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/UserOffline.ts +0 -1
- package/template/agora-rn-uikit/src/Reducer/index.ts +0 -3
- package/template/agora-rn-uikit/src/Rtc/Create.tsx +1 -89
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +2 -39
- package/template/agora-rn-uikit/src/Views/MaxVideoView.native.tsx +5 -15
- package/template/agora-rn-uikit/src/Views/MaxVideoView.tsx +9 -15
- package/template/agora-rn-uikit/src/index.ts +1 -3
- package/template/android/app/build.gradle +0 -1
- package/template/android/app/src/main/AndroidManifest.xml +15 -22
- package/template/android/app/src/main/java/com/helloworld/MainActivity.java +0 -50
- package/template/android/build.gradle +3 -3
- package/template/babel.config.js +0 -1
- package/template/bridge/rtc/webNg/RtcEngine.ts +17 -110
- package/template/customization-api/sub-components.ts +1 -1
- package/template/customization-api/typeDefinition.ts +1 -2
- package/template/electron/index.html +27 -27
- package/template/electron/renderer/index.js +0 -1
- package/template/global.d.ts +4 -26
- package/template/index.js +0 -4
- package/template/index.rsdk.tsx +0 -1
- package/template/index.web.js +1 -7
- package/template/index.wsdk.tsx +1 -1
- package/template/ios/HelloWorld/Info.plist +1 -14
- package/template/ios/HelloWorld.xcodeproj/project.pbxproj +0 -17
- package/template/metro.config.js +1 -1
- package/template/package.json +7 -21
- package/template/react-native-toast-message/index.d.ts +43 -43
- package/template/react-native-toast-message/src/colors/index.js +2 -3
- package/template/react-native-toast-message/src/components/base/index.js +59 -46
- package/template/react-native-toast-message/src/components/base/styles.js +32 -16
- package/template/react-native-toast-message/src/components/error.js +2 -3
- package/template/react-native-toast-message/src/components/info.js +2 -3
- package/template/react-native-toast-message/src/components/success.js +2 -3
- package/template/react-native-toast-message/src/index.js +31 -122
- package/template/react-native-toast-message/src/index.sdk.tsx +35 -125
- package/template/react-native-toast-message/src/styles.js +4 -3
- package/template/react-native-toast-message/src/styles.sdk.ts +4 -3
- package/template/src/App.tsx +0 -6
- package/template/src/AppWrapper.tsx +28 -63
- package/template/src/assets/icons.ts +102 -0
- package/template/src/atoms/HorizontalRule.tsx +1 -3
- package/template/src/atoms/PrimaryButton.tsx +26 -51
- package/template/src/atoms/SecondaryButton.tsx +5 -8
- package/template/src/atoms/TextInput.tsx +14 -12
- package/template/src/components/Chat.tsx +214 -86
- package/template/src/components/ChatContext.ts +1 -8
- package/template/src/components/ColorConfigure.tsx +1 -1
- package/template/src/components/ColorContext.ts +1 -1
- package/template/src/components/{Controls1.native.tsx → Controls.native.tsx} +4 -6
- package/template/src/components/Controls.tsx +42 -342
- package/template/src/components/DeviceConfigure.tsx +101 -461
- package/template/src/components/DeviceContext.tsx +4 -8
- package/template/src/components/EventsConfigure.tsx +7 -144
- package/template/src/components/GraphQLProvider.tsx +1 -1
- package/template/src/components/GridVideo.tsx +44 -59
- package/template/src/components/HostControlView.tsx +35 -114
- package/template/src/components/Navbar.tsx +398 -216
- package/template/src/components/NetworkQualityContext.tsx +20 -20
- package/template/src/components/ParticipantsView.tsx +154 -177
- package/template/src/components/PinnedVideo.tsx +120 -207
- package/template/src/components/Precall.native.tsx +119 -358
- package/template/src/components/Precall.tsx +135 -269
- package/template/src/components/RTMConfigure.tsx +4 -27
- package/template/src/components/Router.electron.ts +0 -1
- package/template/src/components/Router.native.ts +0 -1
- package/template/src/components/Router.sdk.ts +0 -1
- package/template/src/components/Router.ts +0 -1
- package/template/src/components/Settings.tsx +95 -26
- package/template/src/components/SettingsView.tsx +56 -251
- package/template/src/components/Share.tsx +273 -302
- package/template/src/components/StorageContext.tsx +3 -30
- package/template/src/components/chat-messages/useChatMessages.tsx +23 -69
- package/template/src/components/chat-ui/useChatUIControl.tsx +0 -7
- package/template/src/components/common/Error.tsx +6 -20
- package/template/src/components/common/Logo.tsx +15 -16
- package/template/src/components/contexts/LiveStreamDataContext.tsx +5 -10
- package/template/src/components/contexts/VideoMeetingDataContext.tsx +7 -37
- package/template/src/components/livestream/LiveStreamContext.tsx +36 -270
- package/template/src/components/livestream/Types.ts +14 -39
- package/template/src/components/livestream/index.ts +0 -1
- package/template/src/components/livestream/views/LiveStreamControls.tsx +4 -12
- package/template/src/components/participants/AllAudienceParticipants.tsx +30 -101
- package/template/src/components/participants/AllHostParticipants.tsx +34 -103
- package/template/src/components/participants/MeParticipant.tsx +38 -0
- package/template/src/components/participants/ParticipantName.tsx +7 -13
- package/template/src/components/participants/ParticipantSectionTitle.tsx +10 -35
- package/template/src/components/participants/RemoteParticipants.tsx +71 -0
- package/template/src/components/participants/ScreenshareParticipants.tsx +12 -144
- package/template/src/components/precall/{LocalMute1.native.tsx → LocalMute.native.tsx} +5 -21
- package/template/src/components/precall/LocalMute.tsx +14 -84
- package/template/src/components/precall/VideoPreview.native.tsx +3 -48
- package/template/src/components/precall/VideoPreview.tsx +7 -163
- package/template/src/components/precall/joinCallBtn.tsx +2 -15
- package/template/src/components/precall/meetingTitle.tsx +12 -15
- package/template/src/components/precall/selectDevice.tsx +21 -1
- package/template/src/components/precall/textInput.tsx +4 -32
- package/template/src/components/precall/usePreCall.tsx +0 -16
- package/template/src/components/styles.ts +21 -42
- package/template/src/components/useShareLink.tsx +14 -12
- package/template/src/language/default-labels/precallScreenLabels.ts +3 -3
- package/template/src/pages/Authenticate.tsx +15 -5
- package/template/src/pages/Create.tsx +165 -293
- package/template/src/pages/Join.tsx +67 -93
- package/template/src/pages/VideoCall.tsx +64 -89
- package/template/src/pages/video-call/DefaultLayouts.ts +4 -4
- package/template/src/pages/video-call/NameWithMicIcon.tsx +44 -120
- package/template/src/pages/video-call/RenderComponent.tsx +2 -3
- package/template/src/pages/video-call/VideoCallScreen.tsx +9 -45
- package/template/src/pages/video-call/VideoComponent.tsx +3 -18
- package/template/src/pages/video-call/VideoRenderer.tsx +60 -218
- package/template/src/rtm-events/constants.ts +0 -2
- package/template/src/subComponents/ChatBubble.tsx +83 -123
- package/template/src/subComponents/ChatContainer.tsx +84 -257
- package/template/src/subComponents/ChatInput.tsx +46 -61
- package/template/src/subComponents/Checkbox.native.tsx +5 -16
- package/template/src/subComponents/Checkbox.tsx +2 -2
- package/template/src/subComponents/CopyJoinInfo.tsx +58 -36
- package/template/src/subComponents/FallbackLogo.tsx +40 -122
- package/template/src/subComponents/LanguageSelector.tsx +1 -1
- package/template/src/subComponents/{LayoutIconDropdown1.native.tsx → LayoutIconDropdown.native.tsx} +18 -4
- package/template/src/subComponents/LayoutIconDropdown.tsx +134 -131
- package/template/src/subComponents/LocalAudioMute.tsx +27 -119
- package/template/src/subComponents/LocalEndCall.tsx +33 -71
- package/template/src/subComponents/LocalSwitchCamera.tsx +30 -17
- package/template/src/subComponents/LocalVideoMute.tsx +27 -117
- package/template/src/subComponents/Logo.tsx +4 -3
- package/template/src/subComponents/LogoutButton.tsx +1 -1
- package/template/src/subComponents/NetworkQualityPill.tsx +63 -60
- package/template/src/subComponents/OpenInNativeButton.tsx +3 -3
- package/template/src/subComponents/Recording.tsx +29 -28
- package/template/src/subComponents/RemoteAudioMute.tsx +29 -83
- package/template/src/subComponents/RemoteEndCall.tsx +5 -8
- package/template/src/subComponents/RemoteVideoMute.tsx +21 -74
- package/template/src/subComponents/ScreenShareNotice.tsx +8 -83
- package/template/src/subComponents/SelectDevice.tsx +61 -404
- package/template/src/subComponents/SelectOAuth.tsx +8 -9
- package/template/src/subComponents/ToastConfig.tsx +10 -150
- package/template/src/subComponents/chat/ChatParticipants.tsx +78 -187
- package/template/src/subComponents/livestream/CurrentLiveStreamRequestsView.tsx +32 -95
- package/template/src/subComponents/livestream/controls/LocalRaiseHand.tsx +33 -29
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamApprovedRequestRecall.tsx +6 -6
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestApprove.tsx +11 -24
- package/template/src/subComponents/livestream/controls/RemoteLiveStreamRequestReject.tsx +10 -17
- package/template/src/subComponents/recording/useRecording.tsx +27 -79
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +70 -52
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +2 -11
- package/template/src/subComponents/screenshare/ScreenshareConfigure.tsx +4 -26
- package/template/src/utils/common.tsx +1 -155
- package/template/src/utils/index.tsx +0 -19
- package/template/src/utils/isMobileOrTablet.ts +2 -7
- package/template/src/utils/useButtonTemplate.tsx +0 -1
- package/template/src/utils/useMuteToggleLocal.ts +3 -54
- package/template/web/index.html +0 -5
- package/template/webpack.commons.js +8 -13
- package/template/webpack.web.config.js +0 -1
- package/template/agora-rn-uikit/src/Reducer/ActiveSpeakerDetected.ts +0 -11
- package/template/agora-rn-uikit/src/Reducer/LocalPermissionState.ts +0 -24
- package/template/agora-rn-uikit/src/Reducer/UserPin.ts +0 -11
- package/template/android/app/src/main/assets/fonts/SourceSansPro-Regular.ttf +0 -0
- package/template/android/app/src/main/assets/fonts/icomoon.ttf +0 -0
- package/template/android/app/src/main/res/values/colors.xml +0 -7
- package/template/react-native-toast-message/src/components/checkbox.js +0 -178
- package/template/react-native.config.js +0 -7
- package/template/src/assets/font-styles.css +0 -329
- package/template/src/assets/fonts/SourceSansPro-Regular.ttf +0 -0
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/permission.png +0 -0
- package/template/src/assets/selection.json +0 -1
- package/template/src/atoms/ActionMenu.tsx +0 -236
- package/template/src/atoms/AnimatedActiveSpeaker.native.tsx +0 -71
- package/template/src/atoms/AnimatedActiveSpeaker.tsx +0 -84
- package/template/src/atoms/AnimatedRings.native.tsx +0 -68
- package/template/src/atoms/AnimatedRings.tsx +0 -70
- package/template/src/atoms/Card.tsx +0 -61
- package/template/src/atoms/CircularProgress.native.tsx +0 -121
- package/template/src/atoms/CircularProgress.tsx +0 -102
- package/template/src/atoms/CustomIcon.tsx +0 -88
- package/template/src/atoms/CustomSwitch.tsx +0 -287
- package/template/src/atoms/Dropdown.tsx +0 -306
- package/template/src/atoms/IconButton.tsx +0 -162
- package/template/src/atoms/ImageIcon.tsx +0 -98
- package/template/src/atoms/InfoBubble.tsx +0 -291
- package/template/src/atoms/Input.tsx +0 -87
- package/template/src/atoms/InviteInfo.tsx +0 -166
- package/template/src/atoms/LinkButton.tsx +0 -28
- package/template/src/atoms/OutlineButton.tsx +0 -61
- package/template/src/atoms/ParticipantsCount.tsx +0 -73
- package/template/src/atoms/Popup.tsx +0 -147
- package/template/src/atoms/RecordingInfo.tsx +0 -49
- package/template/src/atoms/Spacer.tsx +0 -22
- package/template/src/atoms/TertiaryButton.tsx +0 -78
- package/template/src/atoms/Toggle.tsx +0 -47
- package/template/src/atoms/Tooltip.native.tsx +0 -65
- package/template/src/atoms/Tooltip.tsx +0 -94
- package/template/src/atoms/UserAvatar.tsx +0 -60
- package/template/src/components/CommonStyles.ts +0 -44
- package/template/src/components/ToastComponent.tsx +0 -8
- package/template/src/components/participants/Participant.tsx +0 -302
- package/template/src/components/participants/UserActionMenuOptions.tsx +0 -398
- package/template/src/components/popups/InvitePopup.tsx +0 -115
- package/template/src/components/popups/StopRecordingPopup.tsx +0 -114
- package/template/src/components/precall/PermissionHelper.native.tsx +0 -5
- package/template/src/components/precall/PermissionHelper.tsx +0 -126
- package/template/src/components/precall/PreCallSettings.tsx +0 -52
- package/template/src/components/useToast.tsx +0 -41
- package/template/src/components/useVideoCall.tsx +0 -65
- package/template/src/pages/Endcall.tsx +0 -148
- package/template/src/pages/video-call/ActionSheet.native.tsx +0 -215
- package/template/src/pages/video-call/ActionSheet.tsx +0 -226
- package/template/src/pages/video-call/ActionSheetContent.tsx +0 -479
- package/template/src/pages/video-call/ActionSheetHandle.tsx +0 -38
- package/template/src/pages/video-call/ActionSheetStyles.css +0 -138
- package/template/src/pages/video-call/SidePanelHeader.tsx +0 -190
- package/template/src/pages/video-call/VideoCallMobileView.tsx +0 -139
- package/template/src/pages/video-call/VideoCallScreen.native.tsx +0 -37
- package/template/src/subComponents/ChatInput.ios.tsx +0 -237
- package/template/src/subComponents/EndcallPopup.tsx +0 -107
- package/template/src/subComponents/LayoutIconButton.tsx +0 -201
- package/template/src/subComponents/RemoteMutePopup.tsx +0 -193
- package/template/src/subComponents/RemoveMeetingPopup.tsx +0 -109
- package/template/src/subComponents/RemoveScreensharePopup.tsx +0 -109
- package/template/src/subComponents/SelectDeviceSettings.backup.tsx +0 -207
- package/template/src/subComponents/SidePanelHeader.tsx +0 -112
- package/template/src/theme/index.ts +0 -46
- package/template/src/utils/PlatformWrapper.tsx +0 -21
- package/template/src/utils/hexadecimalTransparency.ts +0 -108
- package/template/src/utils/pendingStateUpdateHelper.ts +0 -19
- package/template/src/utils/useFocus.tsx +0 -46
- package/template/src/utils/useIsActiveSpeaker.ts +0 -27
- package/template/src/utils/useIsHandRaised.ts +0 -13
- package/template/src/utils/useRemoteEndScreenshare.ts +0 -26
- package/template/src/utils/useRemoteRequest.ts +0 -84
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
|
|
2
|
-
import React, {useContext} from 'react';
|
|
3
|
-
import SidePanelHeader, {
|
|
4
|
-
SidePanelStyles,
|
|
5
|
-
} from '../../subComponents/SidePanelHeader';
|
|
6
|
-
import hexadecimalTransparency from '../../utils/hexadecimalTransparency';
|
|
7
|
-
import ThemeConfig from '../../theme';
|
|
8
|
-
import {useChatNotification} from '../../components/chat-notification/useChatNotification';
|
|
9
|
-
import {useSidePanel} from '../../utils/useSidePanel';
|
|
10
|
-
import {SidePanelType} from '../../subComponents/SidePanelEnum';
|
|
11
|
-
import {useChatUIControl} from '../../components/chat-ui/useChatUIControl';
|
|
12
|
-
import {numFormatter} from '../../utils';
|
|
13
|
-
import ChatContext from '../../components/ChatContext';
|
|
14
|
-
|
|
15
|
-
export const SettingsHeader = (props) => {
|
|
16
|
-
const {setSidePanel} = useSidePanel();
|
|
17
|
-
const settingsLabel = 'Settings';
|
|
18
|
-
return (
|
|
19
|
-
<SidePanelHeader
|
|
20
|
-
centerComponent={
|
|
21
|
-
<Text style={SidePanelStyles.heading}>{settingsLabel}</Text>
|
|
22
|
-
}
|
|
23
|
-
trailingIconName="close"
|
|
24
|
-
trailingIconOnPress={() => {
|
|
25
|
-
props.handleClose && props.handleClose();
|
|
26
|
-
setSidePanel(SidePanelType.None);
|
|
27
|
-
}}
|
|
28
|
-
/>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const PeopleHeader = () => {
|
|
33
|
-
const {onlineUsersCount} = useContext(ChatContext);
|
|
34
|
-
const participantsLabel = `People (${numFormatter(onlineUsersCount)})`;
|
|
35
|
-
const {setSidePanel} = useSidePanel();
|
|
36
|
-
return (
|
|
37
|
-
<SidePanelHeader
|
|
38
|
-
centerComponent={
|
|
39
|
-
<Text style={SidePanelStyles.heading}>{participantsLabel}</Text>
|
|
40
|
-
}
|
|
41
|
-
trailingIconName="close"
|
|
42
|
-
trailingIconOnPress={() => {
|
|
43
|
-
setSidePanel(SidePanelType.None);
|
|
44
|
-
}}
|
|
45
|
-
/>
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export const ChatHeader = () => {
|
|
50
|
-
const {
|
|
51
|
-
unreadGroupMessageCount,
|
|
52
|
-
setUnreadGroupMessageCount,
|
|
53
|
-
unreadPrivateMessageCount,
|
|
54
|
-
setUnreadPrivateMessageCount,
|
|
55
|
-
setUnreadIndividualMessageCount,
|
|
56
|
-
unreadIndividualMessageCount,
|
|
57
|
-
} = useChatNotification();
|
|
58
|
-
|
|
59
|
-
const {setSidePanel} = useSidePanel();
|
|
60
|
-
const groupChatLabel = 'Group';
|
|
61
|
-
const privateChatLabel = 'Private';
|
|
62
|
-
|
|
63
|
-
const {
|
|
64
|
-
groupActive,
|
|
65
|
-
setGroupActive,
|
|
66
|
-
privateActive,
|
|
67
|
-
setPrivateActive,
|
|
68
|
-
setSelectedChatUserId: setSelectedUser,
|
|
69
|
-
} = useChatUIControl();
|
|
70
|
-
|
|
71
|
-
const selectGroup = () => {
|
|
72
|
-
setPrivateActive(false);
|
|
73
|
-
setGroupActive(true);
|
|
74
|
-
//move this logic into ChatContainer
|
|
75
|
-
//setUnreadGroupMessageCount(0);
|
|
76
|
-
setSelectedUser(0);
|
|
77
|
-
};
|
|
78
|
-
const selectPrivate = () => {
|
|
79
|
-
setGroupActive(false);
|
|
80
|
-
setSelectedUser(0);
|
|
81
|
-
setPrivateActive(false);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
return (
|
|
85
|
-
<SidePanelHeader
|
|
86
|
-
isChat={true}
|
|
87
|
-
leadingIconName={privateActive ? 'back-btn' : null}
|
|
88
|
-
leadingIconOnPress={
|
|
89
|
-
privateActive
|
|
90
|
-
? () => {
|
|
91
|
-
setSelectedUser(0);
|
|
92
|
-
setPrivateActive(false);
|
|
93
|
-
}
|
|
94
|
-
: () => {}
|
|
95
|
-
}
|
|
96
|
-
centerComponent={
|
|
97
|
-
<View style={styles.buttonHolder}>
|
|
98
|
-
<TouchableOpacity
|
|
99
|
-
onPress={selectGroup}
|
|
100
|
-
style={
|
|
101
|
-
groupActive ? styles.activeContainer : styles.nonActiveContainer
|
|
102
|
-
}>
|
|
103
|
-
{unreadGroupMessageCount !== 0 ? (
|
|
104
|
-
<View style={styles.chatNotification} />
|
|
105
|
-
) : null}
|
|
106
|
-
<Text
|
|
107
|
-
style={groupActive ? styles.activeText : styles.nonActiveText}>
|
|
108
|
-
{groupChatLabel}
|
|
109
|
-
</Text>
|
|
110
|
-
</TouchableOpacity>
|
|
111
|
-
<TouchableOpacity
|
|
112
|
-
onPress={selectPrivate}
|
|
113
|
-
style={
|
|
114
|
-
!groupActive
|
|
115
|
-
? [styles.activeContainer]
|
|
116
|
-
: [styles.nonActiveContainer]
|
|
117
|
-
}>
|
|
118
|
-
{unreadPrivateMessageCount !== 0 ? (
|
|
119
|
-
<View style={styles.chatNotification} />
|
|
120
|
-
) : null}
|
|
121
|
-
<Text
|
|
122
|
-
style={!groupActive ? styles.activeText : styles.nonActiveText}>
|
|
123
|
-
{privateChatLabel}
|
|
124
|
-
</Text>
|
|
125
|
-
</TouchableOpacity>
|
|
126
|
-
</View>
|
|
127
|
-
}
|
|
128
|
-
trailingIconName="close"
|
|
129
|
-
trailingIconOnPress={() => {
|
|
130
|
-
setSidePanel(SidePanelType.None);
|
|
131
|
-
}}
|
|
132
|
-
/>
|
|
133
|
-
);
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
const styles = StyleSheet.create({
|
|
137
|
-
buttonHolder: {
|
|
138
|
-
backgroundColor:
|
|
139
|
-
$config.HARD_CODED_BLACK_COLOR + hexadecimalTransparency['30%'],
|
|
140
|
-
borderRadius: 12,
|
|
141
|
-
flexDirection: 'row',
|
|
142
|
-
},
|
|
143
|
-
chatViewNative: {
|
|
144
|
-
zIndex: 5,
|
|
145
|
-
width: '100%',
|
|
146
|
-
height: '100%',
|
|
147
|
-
right: 0,
|
|
148
|
-
bottom: 0,
|
|
149
|
-
},
|
|
150
|
-
chatInputContainer: {
|
|
151
|
-
width: '100%',
|
|
152
|
-
flexDirection: 'row',
|
|
153
|
-
alignItems: 'center',
|
|
154
|
-
justifyContent: 'center',
|
|
155
|
-
},
|
|
156
|
-
activeContainer: {
|
|
157
|
-
margin: 2,
|
|
158
|
-
backgroundColor: $config.PRIMARY_ACTION_BRAND_COLOR,
|
|
159
|
-
borderRadius: 11,
|
|
160
|
-
alignSelf: 'center',
|
|
161
|
-
},
|
|
162
|
-
nonActiveContainer: {
|
|
163
|
-
alignSelf: 'center',
|
|
164
|
-
},
|
|
165
|
-
activeText: {
|
|
166
|
-
paddingHorizontal: 24,
|
|
167
|
-
paddingVertical: 10,
|
|
168
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
169
|
-
fontWeight: '600',
|
|
170
|
-
fontSize: 12,
|
|
171
|
-
color: $config.PRIMARY_ACTION_TEXT_COLOR,
|
|
172
|
-
},
|
|
173
|
-
nonActiveText: {
|
|
174
|
-
paddingHorizontal: 24,
|
|
175
|
-
paddingVertical: 10,
|
|
176
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
177
|
-
fontWeight: '600',
|
|
178
|
-
fontSize: 12,
|
|
179
|
-
color: $config.FONT_COLOR,
|
|
180
|
-
},
|
|
181
|
-
chatNotification: {
|
|
182
|
-
width: 8,
|
|
183
|
-
height: 8,
|
|
184
|
-
backgroundColor: $config.SEMANTIC_ERROR,
|
|
185
|
-
borderRadius: 30,
|
|
186
|
-
position: 'absolute',
|
|
187
|
-
right: 8,
|
|
188
|
-
top: 4,
|
|
189
|
-
},
|
|
190
|
-
});
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import {StyleSheet, Text, View, AppState} from 'react-native';
|
|
2
|
-
import React, {useRef, useContext, useState, useEffect} from 'react';
|
|
3
|
-
import VideoComponent from './VideoComponent';
|
|
4
|
-
import ActionSheet from './ActionSheet';
|
|
5
|
-
import ThemeConfig from '../../theme';
|
|
6
|
-
import Spacer from '../../atoms/Spacer';
|
|
7
|
-
import {useMeetingInfo} from '../../components/meeting-info/useMeetingInfo';
|
|
8
|
-
|
|
9
|
-
import {useRecording} from '../../subComponents/recording/useRecording';
|
|
10
|
-
import hexadecimalTransparency from '../../utils/hexadecimalTransparency';
|
|
11
|
-
import ParticipantsCount from '../../atoms/ParticipantsCount';
|
|
12
|
-
import RecordingInfo from '../../atoms/RecordingInfo';
|
|
13
|
-
import {isAndroid, isWebInternal, trimText} from '../../utils/common';
|
|
14
|
-
import {RtcContext, ToggleState, useLocalUid} from '../../../agora-rn-uikit';
|
|
15
|
-
import {useLocalUserInfo, useRender} from 'customization-api';
|
|
16
|
-
|
|
17
|
-
const VideoCallMobileView = () => {
|
|
18
|
-
const {
|
|
19
|
-
data: {meetingTitle},
|
|
20
|
-
} = useMeetingInfo();
|
|
21
|
-
const {isRecordingActive} = useRecording();
|
|
22
|
-
const recordingLabel = 'Recording';
|
|
23
|
-
|
|
24
|
-
const appState = useRef(AppState.currentState);
|
|
25
|
-
const [appStateVisible, setAppStateVisible] = useState(appState.current);
|
|
26
|
-
const {RtcEngine, dispatch} = useContext(RtcContext);
|
|
27
|
-
const local = useLocalUserInfo();
|
|
28
|
-
|
|
29
|
-
const isCamON = useRef(local.video);
|
|
30
|
-
|
|
31
|
-
// moved below logic to useMuteToggleLocal
|
|
32
|
-
// useEffect(() => {
|
|
33
|
-
// if ($config.AUDIO_ROOM) return;
|
|
34
|
-
// const subscription = AppState.addEventListener(
|
|
35
|
-
// 'change',
|
|
36
|
-
// async (nextAppState) => {
|
|
37
|
-
// if (nextAppState === 'background') {
|
|
38
|
-
// // check if cam was on before app goes to background
|
|
39
|
-
// isCamON.current = isAndroid()
|
|
40
|
-
// ? local.video === ToggleState.enabled
|
|
41
|
-
// : RtcEngine?.isVideoEnabled;
|
|
42
|
-
|
|
43
|
-
// if (isCamON.current || 1) {
|
|
44
|
-
// isWebInternal()
|
|
45
|
-
// ? await RtcEngine.muteLocalVideoStream(true)
|
|
46
|
-
// : await RtcEngine.enableLocalVideo(false);
|
|
47
|
-
|
|
48
|
-
// // dispatch({
|
|
49
|
-
// // type: 'LocalMuteVideo',
|
|
50
|
-
// // value: [0],
|
|
51
|
-
// // });
|
|
52
|
-
// }
|
|
53
|
-
// }
|
|
54
|
-
// if (nextAppState === 'active') {
|
|
55
|
-
// // enable cam only if cam was on before app goes to background
|
|
56
|
-
// console.log('active state 111111 ==>', isCamON.current);
|
|
57
|
-
// if (local.video) {
|
|
58
|
-
// isWebInternal()
|
|
59
|
-
// ? await RtcEngine.muteLocalVideoStream(false)
|
|
60
|
-
// : await RtcEngine.enableLocalVideo(true);
|
|
61
|
-
// dispatch({
|
|
62
|
-
// type: 'LocalMuteVideo',
|
|
63
|
-
// value: [1],
|
|
64
|
-
// });
|
|
65
|
-
// }
|
|
66
|
-
// }
|
|
67
|
-
// appState.current = nextAppState;
|
|
68
|
-
// },
|
|
69
|
-
// );
|
|
70
|
-
|
|
71
|
-
// return () => {
|
|
72
|
-
// subscription?.remove();
|
|
73
|
-
// };
|
|
74
|
-
// }, []);
|
|
75
|
-
|
|
76
|
-
return (
|
|
77
|
-
<View style={styles.container}>
|
|
78
|
-
<View style={styles.titleBar}>
|
|
79
|
-
<Text style={styles.title}>{trimText(meetingTitle)}</Text>
|
|
80
|
-
<Spacer size={8} horizontal={false} />
|
|
81
|
-
<View style={styles.countView}>
|
|
82
|
-
<View
|
|
83
|
-
style={{
|
|
84
|
-
width: 45,
|
|
85
|
-
height: 35,
|
|
86
|
-
justifyContent: 'center',
|
|
87
|
-
alignItems: 'center',
|
|
88
|
-
alignSelf: 'center',
|
|
89
|
-
zIndex: isWebInternal() ? 3 : 0,
|
|
90
|
-
|
|
91
|
-
//flex: 1,
|
|
92
|
-
}}>
|
|
93
|
-
<ParticipantsCount />
|
|
94
|
-
</View>
|
|
95
|
-
{isRecordingActive ? (
|
|
96
|
-
<RecordingInfo recordingLabel={recordingLabel} />
|
|
97
|
-
) : (
|
|
98
|
-
<></>
|
|
99
|
-
)}
|
|
100
|
-
</View>
|
|
101
|
-
</View>
|
|
102
|
-
<Spacer size={16} />
|
|
103
|
-
<View style={styles.videoView}>
|
|
104
|
-
<VideoComponent />
|
|
105
|
-
</View>
|
|
106
|
-
<ActionSheet />
|
|
107
|
-
</View>
|
|
108
|
-
);
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
export default VideoCallMobileView;
|
|
112
|
-
|
|
113
|
-
const styles = StyleSheet.create({
|
|
114
|
-
container: {
|
|
115
|
-
paddingHorizontal: 16,
|
|
116
|
-
paddingVertical: 20,
|
|
117
|
-
flex: 1,
|
|
118
|
-
},
|
|
119
|
-
title: {
|
|
120
|
-
fontSize: ThemeConfig.FontSize.normal,
|
|
121
|
-
lineHeight: ThemeConfig.FontSize.normal,
|
|
122
|
-
color: $config.FONT_COLOR,
|
|
123
|
-
fontWeight: '600',
|
|
124
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
125
|
-
paddingVertical: 2,
|
|
126
|
-
},
|
|
127
|
-
videoView: {
|
|
128
|
-
flex: 0.85,
|
|
129
|
-
zIndex: 0,
|
|
130
|
-
elevation: 0,
|
|
131
|
-
},
|
|
132
|
-
titleBar: {
|
|
133
|
-
flexDirection: 'column',
|
|
134
|
-
alignItems: 'flex-start',
|
|
135
|
-
},
|
|
136
|
-
countView: {
|
|
137
|
-
flexDirection: 'row',
|
|
138
|
-
},
|
|
139
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {GestureHandlerRootView} from 'react-native-gesture-handler';
|
|
3
|
-
import VideoCallMobileView from './VideoCallMobileView';
|
|
4
|
-
import ReactNativeForegroundService from '@supersami/rn-foreground-service';
|
|
5
|
-
import {AppRegistry, Platform} from 'react-native';
|
|
6
|
-
|
|
7
|
-
const VideoCallleScreen = () => {
|
|
8
|
-
React.useEffect(() => {
|
|
9
|
-
if (Platform.OS === 'android') {
|
|
10
|
-
ReactNativeForegroundService.register();
|
|
11
|
-
AppRegistry.registerComponent($config.APP_NAME, () => VideoCallleScreen);
|
|
12
|
-
ReactNativeForegroundService.add_task(
|
|
13
|
-
() => {
|
|
14
|
-
//console.log('App is active!')
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
delay: 1000,
|
|
18
|
-
onLoop: true,
|
|
19
|
-
taskId: 'taskid',
|
|
20
|
-
onError: (e) => console.log(`Error logging:`, e),
|
|
21
|
-
},
|
|
22
|
-
);
|
|
23
|
-
ReactNativeForegroundService.start({
|
|
24
|
-
id: 145,
|
|
25
|
-
title: $config.APP_NAME,
|
|
26
|
-
message: 'Call is active',
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}, []);
|
|
30
|
-
return (
|
|
31
|
-
<GestureHandlerRootView style={{flex: 1}}>
|
|
32
|
-
<VideoCallMobileView />
|
|
33
|
-
</GestureHandlerRootView>
|
|
34
|
-
);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export default VideoCallleScreen;
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
********************************************
|
|
3
|
-
Copyright © 2021 Agora Lab, Inc., all rights reserved.
|
|
4
|
-
AppBuilder and all associated components, source code, APIs, services, and documentation
|
|
5
|
-
(the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
|
|
6
|
-
accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
|
|
7
|
-
Use without a license or in violation of any license terms and conditions (including use for
|
|
8
|
-
any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
|
|
9
|
-
information visit https://appbuilder.agora.io.
|
|
10
|
-
*********************************************
|
|
11
|
-
*/
|
|
12
|
-
import React, {useContext, useEffect, useRef} from 'react';
|
|
13
|
-
import {View, TouchableOpacity, StyleSheet, Image} from 'react-native';
|
|
14
|
-
import ColorContext from '../components/ColorContext';
|
|
15
|
-
import TextInput from '../atoms/TextInput';
|
|
16
|
-
import {useString} from '../utils/useString';
|
|
17
|
-
import {useChatMessages} from '../components/chat-messages/useChatMessages';
|
|
18
|
-
import {isIOS, isValidReactComponent, isWebInternal} from '../utils/common';
|
|
19
|
-
import {useCustomization} from 'customization-implementation';
|
|
20
|
-
import {useChatUIControl} from '../components/chat-ui/useChatUIControl';
|
|
21
|
-
import {useRender, useUserName} from 'customization-api';
|
|
22
|
-
import ImageIcon from '../atoms/ImageIcon';
|
|
23
|
-
import ThemeConfig from '../theme';
|
|
24
|
-
import {BottomSheetTextInput} from '@gorhom/bottom-sheet';
|
|
25
|
-
|
|
26
|
-
export interface ChatSendButtonProps {
|
|
27
|
-
render?: (onPress: () => void) => JSX.Element;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const ChatSendButton = (props: ChatSendButtonProps) => {
|
|
31
|
-
const {
|
|
32
|
-
selectedChatUserId: selectedUserId,
|
|
33
|
-
message,
|
|
34
|
-
setMessage,
|
|
35
|
-
inputActive,
|
|
36
|
-
} = useChatUIControl();
|
|
37
|
-
const {sendChatMessage} = useChatMessages();
|
|
38
|
-
const onPress = () => {
|
|
39
|
-
if (!selectedUserId) {
|
|
40
|
-
sendChatMessage(message);
|
|
41
|
-
setMessage && setMessage('');
|
|
42
|
-
} else {
|
|
43
|
-
sendChatMessage(message, selectedUserId);
|
|
44
|
-
setMessage && setMessage('');
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
return props?.render ? (
|
|
48
|
-
props.render(onPress)
|
|
49
|
-
) : (
|
|
50
|
-
<TouchableOpacity style={[style.chatInputButton]} onPress={onPress}>
|
|
51
|
-
<ImageIcon
|
|
52
|
-
iconType="plain"
|
|
53
|
-
tintColor={
|
|
54
|
-
inputActive
|
|
55
|
-
? $config.PRIMARY_ACTION_BRAND_COLOR
|
|
56
|
-
: $config.SEMANTIC_NEUTRAL
|
|
57
|
-
}
|
|
58
|
-
name={'send'}
|
|
59
|
-
/>
|
|
60
|
-
</TouchableOpacity>
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
export interface ChatTextInputProps {
|
|
64
|
-
render?: (
|
|
65
|
-
message: string,
|
|
66
|
-
onChangeText: (text: string) => void,
|
|
67
|
-
onSubmitEditing: () => void,
|
|
68
|
-
chatMessageInputPlaceholder: string,
|
|
69
|
-
) => JSX.Element;
|
|
70
|
-
}
|
|
71
|
-
export const ChatTextInput = (props: ChatTextInputProps) => {
|
|
72
|
-
let chatInputRef = useRef(null);
|
|
73
|
-
const {
|
|
74
|
-
selectedChatUserId: selectedUserId,
|
|
75
|
-
message,
|
|
76
|
-
setMessage,
|
|
77
|
-
inputActive,
|
|
78
|
-
privateActive,
|
|
79
|
-
} = useChatUIControl();
|
|
80
|
-
const {sendChatMessage} = useChatMessages();
|
|
81
|
-
const {renderList} = useRender();
|
|
82
|
-
//commented for v1 release
|
|
83
|
-
// const chatMessageInputPlaceholder = useString(
|
|
84
|
-
// 'chatMessageInputPlaceholder',
|
|
85
|
-
// )();
|
|
86
|
-
const [name] = useUserName();
|
|
87
|
-
const chatMessageInputPlaceholder = privateActive
|
|
88
|
-
? `Private Message to ${renderList[selectedUserId].name}`
|
|
89
|
-
: `Chat publicly as ${name}...`;
|
|
90
|
-
const onChangeText = (text: string) => setMessage(text);
|
|
91
|
-
const onSubmitEditing = () => {
|
|
92
|
-
if (!selectedUserId) {
|
|
93
|
-
sendChatMessage(message);
|
|
94
|
-
setMessage('');
|
|
95
|
-
} else {
|
|
96
|
-
sendChatMessage(message, selectedUserId);
|
|
97
|
-
setMessage('');
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
const {setInputActive} = useChatUIControl();
|
|
101
|
-
|
|
102
|
-
useEffect(() => {
|
|
103
|
-
setTimeout(() => {
|
|
104
|
-
if (isWebInternal()) {
|
|
105
|
-
chatInputRef?.current?.focus();
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}, []);
|
|
109
|
-
|
|
110
|
-
return props?.render ? (
|
|
111
|
-
props.render(
|
|
112
|
-
message,
|
|
113
|
-
onChangeText,
|
|
114
|
-
onSubmitEditing,
|
|
115
|
-
chatMessageInputPlaceholder,
|
|
116
|
-
)
|
|
117
|
-
) : (
|
|
118
|
-
<BottomSheetTextInput
|
|
119
|
-
onFocus={() => setInputActive(true)}
|
|
120
|
-
onBlur={() => setInputActive(false)}
|
|
121
|
-
value={message}
|
|
122
|
-
onChangeText={onChangeText}
|
|
123
|
-
style={{
|
|
124
|
-
minHeight: 56,
|
|
125
|
-
borderRadius: 0,
|
|
126
|
-
borderBottomLeftRadius: 12,
|
|
127
|
-
borderWidth: 0,
|
|
128
|
-
color: $config.FONT_COLOR,
|
|
129
|
-
textAlign: 'left',
|
|
130
|
-
paddingVertical: 21,
|
|
131
|
-
paddingLeft: 20,
|
|
132
|
-
flex: 1,
|
|
133
|
-
alignSelf: 'center',
|
|
134
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
135
|
-
fontWeight: '400',
|
|
136
|
-
}}
|
|
137
|
-
blurOnSubmit={false}
|
|
138
|
-
onSubmitEditing={onSubmitEditing}
|
|
139
|
-
placeholder={chatMessageInputPlaceholder}
|
|
140
|
-
placeholderTextColor={
|
|
141
|
-
$config.FONT_COLOR + ThemeConfig.EmphasisPlus.disabled
|
|
142
|
-
}
|
|
143
|
-
autoCorrect={false}
|
|
144
|
-
/>
|
|
145
|
-
);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Input component for the Chat interface
|
|
150
|
-
*/
|
|
151
|
-
const ChatInput = (props: {
|
|
152
|
-
chatInput?: React.ComponentType<ChatTextInputProps>;
|
|
153
|
-
chatSendButton?: React.ComponentType<ChatSendButtonProps>;
|
|
154
|
-
}) => {
|
|
155
|
-
const {primaryColor} = useContext(ColorContext);
|
|
156
|
-
const {ChatInputComponent, ChatSendButtonComponent} = useCustomization(
|
|
157
|
-
(data) => {
|
|
158
|
-
let components: {
|
|
159
|
-
ChatInputComponent: React.ComponentType<ChatTextInputProps>;
|
|
160
|
-
ChatSendButtonComponent: React.ComponentType<ChatSendButtonProps>;
|
|
161
|
-
} = {
|
|
162
|
-
ChatInputComponent: ChatTextInput,
|
|
163
|
-
ChatSendButtonComponent: ChatSendButton,
|
|
164
|
-
};
|
|
165
|
-
if (
|
|
166
|
-
data?.components?.videoCall &&
|
|
167
|
-
typeof data?.components?.videoCall === 'object'
|
|
168
|
-
) {
|
|
169
|
-
if (
|
|
170
|
-
data?.components?.videoCall?.chat &&
|
|
171
|
-
typeof data?.components?.videoCall?.chat === 'object'
|
|
172
|
-
) {
|
|
173
|
-
if (
|
|
174
|
-
data?.components?.videoCall?.chat?.chatInput &&
|
|
175
|
-
typeof data?.components?.videoCall?.chat?.chatInput !== 'object' &&
|
|
176
|
-
isValidReactComponent(data?.components?.videoCall?.chat?.chatInput)
|
|
177
|
-
) {
|
|
178
|
-
components.ChatInputComponent =
|
|
179
|
-
data?.components?.videoCall?.chat?.chatInput;
|
|
180
|
-
}
|
|
181
|
-
if (
|
|
182
|
-
data?.components?.videoCall?.chat?.chatSendButton &&
|
|
183
|
-
typeof data?.components?.videoCall?.chat?.chatSendButton !==
|
|
184
|
-
'object' &&
|
|
185
|
-
isValidReactComponent(
|
|
186
|
-
data?.components?.videoCall?.chat?.chatSendButton,
|
|
187
|
-
)
|
|
188
|
-
) {
|
|
189
|
-
components.ChatSendButtonComponent =
|
|
190
|
-
data?.components?.videoCall?.chat?.chatSendButton;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
} else {
|
|
194
|
-
if (props?.chatInput && isValidReactComponent(props.chatInput)) {
|
|
195
|
-
components.ChatInputComponent = props.chatInput;
|
|
196
|
-
}
|
|
197
|
-
if (
|
|
198
|
-
props?.chatSendButton &&
|
|
199
|
-
isValidReactComponent(props.chatSendButton)
|
|
200
|
-
) {
|
|
201
|
-
components.ChatSendButtonComponent = props.chatSendButton;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
return components;
|
|
205
|
-
},
|
|
206
|
-
);
|
|
207
|
-
|
|
208
|
-
const {inputActive} = useChatUIControl();
|
|
209
|
-
|
|
210
|
-
return (
|
|
211
|
-
<View style={[style.inputView, inputActive ? style.inputActiveView : {}]}>
|
|
212
|
-
<ChatInputComponent />
|
|
213
|
-
<ChatSendButtonComponent />
|
|
214
|
-
</View>
|
|
215
|
-
);
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
const style = StyleSheet.create({
|
|
219
|
-
inputActiveView: {
|
|
220
|
-
borderTopWidth: 1,
|
|
221
|
-
borderTopColor: $config.PRIMARY_ACTION_BRAND_COLOR,
|
|
222
|
-
},
|
|
223
|
-
inputView: {
|
|
224
|
-
flex: 1,
|
|
225
|
-
flexDirection: 'row',
|
|
226
|
-
backgroundColor: $config.CARD_LAYER_2_COLOR,
|
|
227
|
-
borderTopWidth: 1,
|
|
228
|
-
borderTopColor: 'transparent',
|
|
229
|
-
},
|
|
230
|
-
chatInputButton: {
|
|
231
|
-
flex: 0.1,
|
|
232
|
-
borderBottomRightRadius: 12,
|
|
233
|
-
alignSelf: 'center',
|
|
234
|
-
marginRight: 16,
|
|
235
|
-
},
|
|
236
|
-
});
|
|
237
|
-
export default ChatInput;
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import React, {SetStateAction, useContext} from 'react';
|
|
2
|
-
import {StyleSheet, Text, View} from 'react-native';
|
|
3
|
-
import Spacer from '../atoms/Spacer';
|
|
4
|
-
import Popup from '../atoms/Popup';
|
|
5
|
-
import TertiaryButton from '../atoms/TertiaryButton';
|
|
6
|
-
import PrimaryButton from '../atoms/PrimaryButton';
|
|
7
|
-
import ThemeConfig from '../theme';
|
|
8
|
-
import {useIsDesktop} from '../utils/common';
|
|
9
|
-
|
|
10
|
-
interface EndcallPopupProps {
|
|
11
|
-
modalVisible: boolean;
|
|
12
|
-
setModalVisible: React.Dispatch<SetStateAction<boolean>>;
|
|
13
|
-
endCall: () => void;
|
|
14
|
-
}
|
|
15
|
-
const EndcallPopup = (props: EndcallPopupProps) => {
|
|
16
|
-
const isDesktop = useIsDesktop()('popup');
|
|
17
|
-
const leaveMeetingLabelHeading = 'Leave Meeting?';
|
|
18
|
-
const leaveMeetingLabelSubHeading =
|
|
19
|
-
'Are you sure you want to leave this meeting?';
|
|
20
|
-
|
|
21
|
-
const stayBtnLabel = 'CANCEL';
|
|
22
|
-
const leaveBtnLabel = 'LEAVE';
|
|
23
|
-
return (
|
|
24
|
-
<Popup
|
|
25
|
-
modalVisible={props.modalVisible}
|
|
26
|
-
setModalVisible={props.setModalVisible}
|
|
27
|
-
showCloseIcon={false}
|
|
28
|
-
contentContainerStyle={styles.contentContainer}>
|
|
29
|
-
<Text style={styles.heading}>{leaveMeetingLabelHeading}</Text>
|
|
30
|
-
<Spacer size={8} />
|
|
31
|
-
<Text style={styles.subHeading}>{leaveMeetingLabelSubHeading}</Text>
|
|
32
|
-
<Spacer size={32} />
|
|
33
|
-
<View style={isDesktop ? styles.btnContainer : styles.btnContainerMobile}>
|
|
34
|
-
<View style={isDesktop && {flex: 1}}>
|
|
35
|
-
<TertiaryButton
|
|
36
|
-
containerStyle={{
|
|
37
|
-
width: '100%',
|
|
38
|
-
height: 48,
|
|
39
|
-
paddingVertical: 12,
|
|
40
|
-
paddingHorizontal: 12,
|
|
41
|
-
borderRadius: ThemeConfig.BorderRadius.medium,
|
|
42
|
-
}}
|
|
43
|
-
text={stayBtnLabel}
|
|
44
|
-
textStyle={styles.btnText}
|
|
45
|
-
onPress={() => props.setModalVisible(false)}
|
|
46
|
-
/>
|
|
47
|
-
</View>
|
|
48
|
-
<Spacer
|
|
49
|
-
size={isDesktop ? 10 : 20}
|
|
50
|
-
horizontal={isDesktop ? true : false}
|
|
51
|
-
/>
|
|
52
|
-
<View style={isDesktop && {flex: 1}}>
|
|
53
|
-
<PrimaryButton
|
|
54
|
-
containerStyle={{
|
|
55
|
-
minWidth: 'auto',
|
|
56
|
-
width: '100%',
|
|
57
|
-
borderRadius: ThemeConfig.BorderRadius.medium,
|
|
58
|
-
height: 48,
|
|
59
|
-
backgroundColor: $config.SEMANTIC_ERROR,
|
|
60
|
-
paddingVertical: 12,
|
|
61
|
-
paddingHorizontal: 12,
|
|
62
|
-
}}
|
|
63
|
-
text={leaveBtnLabel}
|
|
64
|
-
textStyle={styles.btnText}
|
|
65
|
-
onPress={props.endCall}
|
|
66
|
-
/>
|
|
67
|
-
</View>
|
|
68
|
-
</View>
|
|
69
|
-
</Popup>
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export default EndcallPopup;
|
|
74
|
-
|
|
75
|
-
const styles = StyleSheet.create({
|
|
76
|
-
btnContainer: {
|
|
77
|
-
flex: 1,
|
|
78
|
-
flexDirection: 'row',
|
|
79
|
-
justifyContent: 'center',
|
|
80
|
-
alignItems: 'center',
|
|
81
|
-
},
|
|
82
|
-
btnText: {
|
|
83
|
-
fontWeight: '600',
|
|
84
|
-
fontSize: 16,
|
|
85
|
-
lineHeight: 24,
|
|
86
|
-
},
|
|
87
|
-
|
|
88
|
-
btnContainerMobile: {
|
|
89
|
-
flexDirection: 'column-reverse',
|
|
90
|
-
},
|
|
91
|
-
contentContainer: {
|
|
92
|
-
padding: 24,
|
|
93
|
-
minWidth: 342,
|
|
94
|
-
},
|
|
95
|
-
heading: {
|
|
96
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
97
|
-
fontWeight: '600',
|
|
98
|
-
fontSize: 22,
|
|
99
|
-
color: $config.SEMANTIC_ERROR,
|
|
100
|
-
},
|
|
101
|
-
subHeading: {
|
|
102
|
-
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
103
|
-
fontWeight: '400',
|
|
104
|
-
fontSize: ThemeConfig.FontSize.small,
|
|
105
|
-
color: $config.FONT_COLOR,
|
|
106
|
-
},
|
|
107
|
-
});
|