agora-appbuilder-core 4.1.9 → 4.1.10-beta.1
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/template/agora-rn-uikit/src/Contexts/PropsContext.tsx +1 -3
- package/template/agora-rn-uikit/src/Contexts/RtcContext.tsx +1 -2
- package/template/agora-rn-uikit/src/Reducer/index.ts +0 -2
- package/template/agora-rn-uikit/src/Rtc/Join.tsx +11 -25
- package/template/agora-rn-uikit/src/RtcConfigure.tsx +1 -14
- package/template/bridge/rtc/webNg/RtcEngine.ts +2 -2
- package/template/bridge/rtm/web/index.ts +30 -0
- package/template/customization-api/typeDefinition.ts +1 -0
- package/template/defaultConfig.js +3 -2
- package/template/global.d.ts +1 -0
- package/template/src/AppRoutes.tsx +3 -3
- package/template/src/ai-agent/components/ControlButtons.tsx +1 -1
- package/template/src/assets/font-styles.css +36 -0
- package/template/src/assets/fonts/icomoon.ttf +0 -0
- package/template/src/assets/selection.json +1 -1
- package/template/src/atoms/CustomIcon.tsx +8 -0
- package/template/src/atoms/Dropdown.tsx +5 -0
- package/template/src/atoms/TertiaryButton.tsx +1 -1
- package/template/src/atoms/UserAvatar.tsx +1 -1
- package/template/src/components/ChatContext.ts +5 -3
- package/template/src/components/Controls.tsx +68 -22
- package/template/src/components/DeviceConfigure.tsx +1 -1
- package/template/src/components/EventsConfigure.tsx +22 -17
- package/template/src/components/Navbar.tsx +14 -11
- package/template/src/components/RTMConfigure.tsx +31 -1036
- package/template/src/components/UserGlobalPreferenceProvider.tsx +227 -0
- package/template/src/components/beauty-effect/useBeautyEffects.tsx +50 -13
- package/template/src/components/breakout-room/BreakoutRoomPanel.tsx +58 -0
- package/template/src/components/breakout-room/context/BreakoutRoomContext.tsx +2508 -0
- package/template/src/components/breakout-room/events/BreakoutRoomEventsConfigure.tsx +272 -0
- package/template/src/components/breakout-room/events/constants.ts +17 -0
- package/template/src/components/breakout-room/hoc/BreakoutRoomNameRenderer.tsx +68 -0
- package/template/src/components/breakout-room/hooks/useBreakoutRoomExit.ts +49 -0
- package/template/src/components/breakout-room/state/reducer.ts +522 -0
- package/template/src/components/breakout-room/state/types.ts +54 -0
- package/template/src/components/breakout-room/ui/BreakoutMeetingTitle.tsx +60 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomActionMenu.tsx +136 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomAnnouncementModal.tsx +135 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomGroupSettings.tsx +588 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomMainRoomUsers.tsx +142 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomMemberActionMenu.tsx +122 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomParticipants.tsx +124 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomRaiseHand.tsx +65 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomRenameModal.tsx +227 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomSettings.tsx +140 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomTransition.tsx +52 -0
- package/template/src/components/breakout-room/ui/BreakoutRoomView.tsx +193 -0
- package/template/src/components/breakout-room/ui/ExitBreakoutRoomIconButton.tsx +79 -0
- package/template/src/components/breakout-room/ui/ParticipantManualAssignmentModal.tsx +638 -0
- package/template/src/components/breakout-room/ui/SelectParticipantAssignmentStrategy.tsx +57 -0
- package/template/src/components/chat/chatConfigure.tsx +7 -1
- package/template/src/components/chat-messages/useChatMessages.tsx +43 -11
- package/template/src/components/common/Dividers.tsx +53 -0
- package/template/src/components/controls/toolbar-items/ExitBreakoutRoomToolbarItem.tsx +13 -0
- package/template/src/components/controls/useControlPermissionMatrix.tsx +32 -4
- package/template/src/components/participants/AllHostParticipants.tsx +10 -2
- package/template/src/components/participants/Participant.tsx +7 -1
- package/template/src/components/participants/UserActionMenuOptions.tsx +12 -2
- package/template/src/components/precall/joinWaitingRoomBtn.native.tsx +12 -8
- package/template/src/components/precall/joinWaitingRoomBtn.tsx +14 -10
- package/template/src/components/raise-hand/RaiseHandButton.tsx +50 -0
- package/template/src/components/raise-hand/RaiseHandProvider.tsx +308 -0
- package/template/src/components/raise-hand/index.ts +14 -0
- package/template/src/components/recordings/RecordingsDateTable.tsx +3 -2
- package/template/src/components/room-info/useCurrentRoomInfo.tsx +42 -0
- package/template/src/components/room-info/useSetBreakoutRoomInfo.tsx +64 -0
- package/template/src/components/useUserPreference.tsx +39 -12
- package/template/src/components/virtual-background/useVB.tsx +18 -0
- package/template/src/components/whiteboard/WhiteboardConfigure.tsx +27 -0
- package/template/src/language/default-labels/videoCallScreenLabels.ts +7 -0
- package/template/src/logger/AppBuilderLogger.tsx +11 -3
- package/template/src/pages/VideoCall.tsx +171 -518
- package/template/src/pages/video-call/BreakoutVideoCall.tsx +213 -0
- package/template/src/pages/video-call/SidePanelHeader.tsx +17 -0
- package/template/src/pages/video-call/VideoCallContent.tsx +211 -0
- package/template/src/pages/video-call/VideoCallScreen.tsx +18 -0
- package/template/src/pages/video-call/VideoCallScreenWrapper.tsx +0 -1
- package/template/src/pages/video-call/VideoCallStateWrapper.tsx +495 -0
- package/template/src/rtm/RTMConfigureBreakoutRoomProvider.tsx +882 -0
- package/template/src/rtm/RTMConfigureMainRoomProvider.tsx +757 -0
- package/template/src/rtm/RTMCoreProvider.tsx +419 -0
- package/template/src/rtm/RTMEngine.ts +188 -60
- package/template/src/rtm/RTMGlobalStateProvider.tsx +706 -0
- package/template/src/rtm/RTMStatusBanner.tsx +99 -0
- package/template/src/rtm/constants.ts +12 -0
- package/template/src/rtm/hooks/useMainRoomUserDisplayName.ts +45 -0
- package/template/src/rtm/rtm-presence-utils.ts +344 -0
- package/template/src/rtm/utils.ts +68 -1
- package/template/src/rtm-events/constants.ts +40 -1
- package/template/src/rtm-events-api/Events.ts +62 -19
- package/template/src/subComponents/ChatBubble.tsx +3 -3
- package/template/src/subComponents/ChatContainer.tsx +19 -9
- package/template/src/subComponents/LocalAudioMute.tsx +2 -2
- package/template/src/subComponents/LocalVideoMute.tsx +2 -2
- package/template/src/subComponents/SidePanelEnum.tsx +1 -0
- package/template/src/subComponents/caption/useCaption.tsx +1 -1
- package/template/src/subComponents/chat/ChatAnnouncementView.tsx +65 -0
- package/template/src/subComponents/chat/ChatSendButton.tsx +1 -0
- package/template/src/subComponents/screenshare/ScreenshareButton.tsx +16 -0
- package/template/src/subComponents/screenshare/ScreenshareConfigure.native.tsx +1 -1
- package/template/src/subComponents/waiting-rooms/WaitingRoomControls.tsx +7 -4
- package/template/src/utils/useDebouncedCallback.tsx +20 -0
- package/template/src/utils/useEndCall.ts +0 -2
- package/template/src/utils/useMuteToggleLocal.ts +14 -10
- package/template/agora-rn-uikit/src/Reducer/Spotlight.ts +0 -11
- package/template/agora-rn-uikit/src/Reducer/UserBanned.ts +0 -11
|
@@ -0,0 +1,588 @@
|
|
|
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
|
+
|
|
13
|
+
import React, {useState} from 'react';
|
|
14
|
+
import {View, Text, StyleSheet} from 'react-native';
|
|
15
|
+
import IconButton from '../../../atoms/IconButton';
|
|
16
|
+
import ThemeConfig from '../../../theme';
|
|
17
|
+
import {UidType, useLocalUid} from '../../../../agora-rn-uikit';
|
|
18
|
+
import UserAvatar from '../../../atoms/UserAvatar';
|
|
19
|
+
import ImageIcon from '../../../atoms/ImageIcon';
|
|
20
|
+
import {BreakoutGroup} from '../state/reducer';
|
|
21
|
+
import BreakoutRoomActionMenu from './BreakoutRoomActionMenu';
|
|
22
|
+
import BreakoutRoomMemberActionMenu from './BreakoutRoomMemberActionMenu';
|
|
23
|
+
import TertiaryButton from '../../../atoms/TertiaryButton';
|
|
24
|
+
import BreakoutRoomAnnouncementModal from './BreakoutRoomAnnouncementModal';
|
|
25
|
+
import {useModal} from '../../../utils/useModal';
|
|
26
|
+
import {useBreakoutRoom} from '../context/BreakoutRoomContext';
|
|
27
|
+
import BreakoutRoomRenameModal from './BreakoutRoomRenameModal';
|
|
28
|
+
import {useMainRoomUserDisplayName} from '../../../rtm/hooks/useMainRoomUserDisplayName';
|
|
29
|
+
import {useRoomInfo} from '../../room-info/useRoomInfo';
|
|
30
|
+
import {useChatConfigure} from '../../chat/chatConfigure';
|
|
31
|
+
import {
|
|
32
|
+
ChatMessageType,
|
|
33
|
+
SDKChatType,
|
|
34
|
+
} from '../../chat-messages/useChatMessages';
|
|
35
|
+
import {isWeb} from '../../../utils/common';
|
|
36
|
+
import {useRTMGlobalState} from '../../../rtm/RTMGlobalStateProvider';
|
|
37
|
+
import {useRaiseHand} from '../../raise-hand';
|
|
38
|
+
import Tooltip from '../../../atoms/Tooltip';
|
|
39
|
+
import {useContent} from 'customization-api';
|
|
40
|
+
|
|
41
|
+
const BreakoutRoomGroupSettings = ({scrollOffset}) => {
|
|
42
|
+
const {
|
|
43
|
+
data: {isHost, uid, chat},
|
|
44
|
+
} = useRoomInfo();
|
|
45
|
+
const localUid = useLocalUid();
|
|
46
|
+
const {defaultContent} = useContent();
|
|
47
|
+
const {sendChatSDKMessage} = useChatConfigure();
|
|
48
|
+
const {isUserHandRaised} = useRaiseHand();
|
|
49
|
+
|
|
50
|
+
const {
|
|
51
|
+
breakoutGroups,
|
|
52
|
+
isUserInRoom,
|
|
53
|
+
exitRoom,
|
|
54
|
+
joinRoom,
|
|
55
|
+
closeRoom,
|
|
56
|
+
updateRoomName,
|
|
57
|
+
canUserSwitchRoom,
|
|
58
|
+
permissions,
|
|
59
|
+
} = useBreakoutRoom();
|
|
60
|
+
|
|
61
|
+
const disableJoinBtn = !isHost && !canUserSwitchRoom;
|
|
62
|
+
|
|
63
|
+
// Render room card
|
|
64
|
+
const {mainRoomRTMUsers} = useRTMGlobalState();
|
|
65
|
+
// Use hook to get display names with fallback to main room users
|
|
66
|
+
const getDisplayName = useMainRoomUserDisplayName();
|
|
67
|
+
|
|
68
|
+
const {
|
|
69
|
+
modalOpen: isAnnoucementModalOpen,
|
|
70
|
+
setModalOpen: setAnnouncementModal,
|
|
71
|
+
} = useModal();
|
|
72
|
+
const {
|
|
73
|
+
modalOpen: isRenameRoomModalOpen,
|
|
74
|
+
setModalOpen: setRenameRoomModalOpen,
|
|
75
|
+
} = useModal();
|
|
76
|
+
|
|
77
|
+
const [roomToEdit, setRoomToEdit] = useState<{id: string; name: string}>(
|
|
78
|
+
null,
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const [expandedRooms, setExpandedRooms] = useState<Set<string>>(new Set());
|
|
82
|
+
|
|
83
|
+
const toggleRoomExpansion = (roomId: string) => {
|
|
84
|
+
const newExpanded = new Set(expandedRooms);
|
|
85
|
+
if (newExpanded.has(roomId)) {
|
|
86
|
+
newExpanded.delete(roomId);
|
|
87
|
+
} else {
|
|
88
|
+
newExpanded.add(roomId);
|
|
89
|
+
}
|
|
90
|
+
setExpandedRooms(newExpanded);
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const renderMember = (memberUId: UidType) => {
|
|
94
|
+
// Check for offline status using mainRoomRTMUsers
|
|
95
|
+
const rtmMemberData = mainRoomRTMUsers[memberUId];
|
|
96
|
+
const isOffline = rtmMemberData?.offline;
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<View
|
|
100
|
+
key={memberUId}
|
|
101
|
+
style={[styles.memberItem, isOffline && styles.memberItemOffline]}>
|
|
102
|
+
<View style={styles.memberInfo}>
|
|
103
|
+
<UserAvatar
|
|
104
|
+
name={getDisplayName(memberUId)}
|
|
105
|
+
containerStyle={[
|
|
106
|
+
styles.userAvatarContainer,
|
|
107
|
+
isOffline && styles.userAvatarOffline,
|
|
108
|
+
]}
|
|
109
|
+
textStyle={[
|
|
110
|
+
styles.userAvatarText,
|
|
111
|
+
isOffline && styles.userAvatarTextOffline,
|
|
112
|
+
]}
|
|
113
|
+
/>
|
|
114
|
+
<View style={styles.memberNameContainer}>
|
|
115
|
+
<Text
|
|
116
|
+
style={[styles.memberName, isOffline && styles.memberNameOffline]}
|
|
117
|
+
numberOfLines={1}>
|
|
118
|
+
{getDisplayName(memberUId)}
|
|
119
|
+
</Text>
|
|
120
|
+
{isOffline && (
|
|
121
|
+
<Text style={styles.memberOfflineStatus}>(user is offline)</Text>
|
|
122
|
+
)}
|
|
123
|
+
</View>
|
|
124
|
+
</View>
|
|
125
|
+
|
|
126
|
+
{!isOffline && (
|
|
127
|
+
<View style={styles.memberMenu}>
|
|
128
|
+
{isUserHandRaised(memberUId) ? (
|
|
129
|
+
<View style={styles.memberRaiseHand}>
|
|
130
|
+
<ImageIcon
|
|
131
|
+
iconSize={18}
|
|
132
|
+
iconType="plain"
|
|
133
|
+
name="raise-hand"
|
|
134
|
+
tintColor={$config.SEMANTIC_WARNING}
|
|
135
|
+
/>
|
|
136
|
+
</View>
|
|
137
|
+
) : (
|
|
138
|
+
<></>
|
|
139
|
+
)}
|
|
140
|
+
{permissions.canHostManageMainRoom && memberUId !== localUid ? (
|
|
141
|
+
<View style={styles.memberMenuMoreIcon}>
|
|
142
|
+
<BreakoutRoomMemberActionMenu memberUid={memberUId} />
|
|
143
|
+
</View>
|
|
144
|
+
) : (
|
|
145
|
+
<></>
|
|
146
|
+
)}
|
|
147
|
+
</View>
|
|
148
|
+
)}
|
|
149
|
+
</View>
|
|
150
|
+
);
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
const renderRoom = (room: BreakoutGroup) => {
|
|
154
|
+
const isExpanded = expandedRooms.has(room.id);
|
|
155
|
+
const memberCount =
|
|
156
|
+
room.participants.hosts.length + room.participants.attendees.length;
|
|
157
|
+
|
|
158
|
+
return (
|
|
159
|
+
<View key={room.id} style={styles.roomGroupCard}>
|
|
160
|
+
<View style={styles.roomHeader}>
|
|
161
|
+
<View style={styles.roomHeaderLeft}>
|
|
162
|
+
<IconButton
|
|
163
|
+
hoverEffect={false}
|
|
164
|
+
containerStyle={styles.expandIcon}
|
|
165
|
+
iconProps={{
|
|
166
|
+
name: isExpanded ? 'arrow-up' : 'arrow-down',
|
|
167
|
+
iconType: 'plain',
|
|
168
|
+
iconSize: 20,
|
|
169
|
+
tintColor: `${$config.FONT_COLOR}`,
|
|
170
|
+
}}
|
|
171
|
+
onPress={() => toggleRoomExpansion(room.id)}
|
|
172
|
+
/>
|
|
173
|
+
<View style={styles.roomHeaderInfo}>
|
|
174
|
+
<View style={styles.roomNameToolTipContainer}>
|
|
175
|
+
<Tooltip
|
|
176
|
+
fontSize={12}
|
|
177
|
+
key={room.id}
|
|
178
|
+
scrollY={scrollOffset}
|
|
179
|
+
toolTipMessage={room.name}
|
|
180
|
+
renderContent={() => {
|
|
181
|
+
return <Text style={styles.roomName}>{room.name}</Text>;
|
|
182
|
+
}}
|
|
183
|
+
/>
|
|
184
|
+
</View>
|
|
185
|
+
<Text style={styles.roomMemberCount}>
|
|
186
|
+
{memberCount > 0 ? memberCount : 'No'} Member
|
|
187
|
+
{memberCount !== 1 ? 's' : ''}
|
|
188
|
+
</Text>
|
|
189
|
+
</View>
|
|
190
|
+
</View>
|
|
191
|
+
<View style={[styles.roomHeaderRight]}>
|
|
192
|
+
{isUserInRoom(room) ? (
|
|
193
|
+
<TertiaryButton
|
|
194
|
+
containerStyle={styles.exitRoomBtn}
|
|
195
|
+
textStyle={styles.roomActionBtnText}
|
|
196
|
+
text={'Exit Room'}
|
|
197
|
+
onPress={() => exitRoom(room.id)}
|
|
198
|
+
/>
|
|
199
|
+
) : (
|
|
200
|
+
<TertiaryButton
|
|
201
|
+
disabled={disableJoinBtn}
|
|
202
|
+
containerStyle={
|
|
203
|
+
disableJoinBtn ? styles.disabledBtn : styles.joinRoomBtn
|
|
204
|
+
}
|
|
205
|
+
textStyle={styles.roomActionBtnText}
|
|
206
|
+
text={'Join'}
|
|
207
|
+
onPress={() => joinRoom(room.id)}
|
|
208
|
+
/>
|
|
209
|
+
)}
|
|
210
|
+
{/* Only host can perform these actions */}
|
|
211
|
+
{permissions.canHostManageMainRoom ? (
|
|
212
|
+
<BreakoutRoomActionMenu
|
|
213
|
+
onDeleteRoom={() => {
|
|
214
|
+
closeRoom(room.id);
|
|
215
|
+
}}
|
|
216
|
+
onRenameRoom={() => {
|
|
217
|
+
setRoomToEdit({id: room.id, name: room.name});
|
|
218
|
+
setRenameRoomModalOpen(true);
|
|
219
|
+
}}
|
|
220
|
+
/>
|
|
221
|
+
) : (
|
|
222
|
+
<></>
|
|
223
|
+
)}
|
|
224
|
+
</View>
|
|
225
|
+
</View>
|
|
226
|
+
|
|
227
|
+
{/* Room Members (Expanded) */}
|
|
228
|
+
{isExpanded && (
|
|
229
|
+
<View style={styles.roomMembers}>
|
|
230
|
+
{room.participants.hosts.length > 0 ||
|
|
231
|
+
room.participants.attendees.length > 0 ? (
|
|
232
|
+
<>
|
|
233
|
+
{/* Combine and sort members - local user first */}
|
|
234
|
+
{[...room.participants.hosts, ...room.participants.attendees]
|
|
235
|
+
.sort((a, b) => {
|
|
236
|
+
// Local user always comes first
|
|
237
|
+
if (a === localUid) {
|
|
238
|
+
return -1;
|
|
239
|
+
}
|
|
240
|
+
if (b === localUid) {
|
|
241
|
+
return 1;
|
|
242
|
+
}
|
|
243
|
+
return 0; // Keep others in original order
|
|
244
|
+
})
|
|
245
|
+
.map(member => renderMember(member))}
|
|
246
|
+
</>
|
|
247
|
+
) : (
|
|
248
|
+
<View style={styles.emptyRoom}>
|
|
249
|
+
<Text style={styles.emptyRoomText}>
|
|
250
|
+
No members in this room
|
|
251
|
+
</Text>
|
|
252
|
+
</View>
|
|
253
|
+
)}
|
|
254
|
+
</View>
|
|
255
|
+
)}
|
|
256
|
+
</View>
|
|
257
|
+
);
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
const onRoomNameChange = (newName: string) => {
|
|
261
|
+
if (newName && roomToEdit?.id) {
|
|
262
|
+
updateRoomName(newName, roomToEdit.id);
|
|
263
|
+
setRoomToEdit(null);
|
|
264
|
+
setRenameRoomModalOpen(false);
|
|
265
|
+
}
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
const onAnnouncement = (announcement: string) => {
|
|
269
|
+
if (announcement) {
|
|
270
|
+
const option = {
|
|
271
|
+
chatType: SDKChatType.GROUP_CHAT,
|
|
272
|
+
type: ChatMessageType.TXT,
|
|
273
|
+
msg: `${announcement}`,
|
|
274
|
+
from: uid.toString(),
|
|
275
|
+
to: chat.group_id,
|
|
276
|
+
ext: {
|
|
277
|
+
from_platform: isWeb() ? 'web' : 'native',
|
|
278
|
+
announcement: {
|
|
279
|
+
sender: defaultContent[localUid]?.name,
|
|
280
|
+
heading: `${defaultContent[localUid]?.name} made an announcement.`,
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
sendChatSDKMessage(option);
|
|
285
|
+
setAnnouncementModal(false);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
return (
|
|
290
|
+
<View style={styles.container}>
|
|
291
|
+
<View style={styles.header}>
|
|
292
|
+
<View style={styles.headerLeft}>
|
|
293
|
+
<Text style={styles.headerTitle}>All Rooms</Text>
|
|
294
|
+
</View>
|
|
295
|
+
{permissions.canHostManageMainRoom ? (
|
|
296
|
+
<View style={[styles.headerRight]}>
|
|
297
|
+
<IconButton
|
|
298
|
+
iconProps={{
|
|
299
|
+
iconType: 'plain',
|
|
300
|
+
name: 'announcement',
|
|
301
|
+
iconSize: 20,
|
|
302
|
+
tintColor: $config.SECONDARY_ACTION_COLOR,
|
|
303
|
+
}}
|
|
304
|
+
onPress={() => setAnnouncementModal(true)}
|
|
305
|
+
/>
|
|
306
|
+
</View>
|
|
307
|
+
) : (
|
|
308
|
+
<></>
|
|
309
|
+
)}
|
|
310
|
+
</View>
|
|
311
|
+
<View style={styles.body}>
|
|
312
|
+
{breakoutGroups.length === 0 ? (
|
|
313
|
+
<View style={styles.emptyRoomPaddingHorizontal}>
|
|
314
|
+
<Text style={styles.emptyRoomText}>
|
|
315
|
+
The host hasn't created any breakout rooms yet
|
|
316
|
+
</Text>
|
|
317
|
+
</View>
|
|
318
|
+
) : (
|
|
319
|
+
breakoutGroups.map(renderRoom)
|
|
320
|
+
)}
|
|
321
|
+
</View>
|
|
322
|
+
{isAnnoucementModalOpen && (
|
|
323
|
+
<BreakoutRoomAnnouncementModal
|
|
324
|
+
onAnnouncement={onAnnouncement}
|
|
325
|
+
setModalOpen={setAnnouncementModal}
|
|
326
|
+
/>
|
|
327
|
+
)}
|
|
328
|
+
{isRenameRoomModalOpen && roomToEdit?.id && (
|
|
329
|
+
<BreakoutRoomRenameModal
|
|
330
|
+
currentRoomName={roomToEdit.name}
|
|
331
|
+
updateRoomName={onRoomNameChange}
|
|
332
|
+
setModalOpen={setRenameRoomModalOpen}
|
|
333
|
+
existingRoomNames={breakoutGroups.map(group => group.name)}
|
|
334
|
+
/>
|
|
335
|
+
)}
|
|
336
|
+
</View>
|
|
337
|
+
);
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
const styles = StyleSheet.create({
|
|
341
|
+
container: {
|
|
342
|
+
display: 'flex',
|
|
343
|
+
flexDirection: 'column',
|
|
344
|
+
// border: '2px solid red',
|
|
345
|
+
},
|
|
346
|
+
header: {
|
|
347
|
+
flexDirection: 'row',
|
|
348
|
+
justifyContent: 'space-between',
|
|
349
|
+
alignItems: 'center',
|
|
350
|
+
// paddingHorizontal: 12,
|
|
351
|
+
paddingVertical: 16,
|
|
352
|
+
},
|
|
353
|
+
headerLeft: {},
|
|
354
|
+
headerTitle: {
|
|
355
|
+
fontWeight: '600',
|
|
356
|
+
fontSize: ThemeConfig.FontSize.small,
|
|
357
|
+
lineHeight: 16,
|
|
358
|
+
color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.high,
|
|
359
|
+
fontFamily: ThemeConfig.FontFamily.sansPro,
|
|
360
|
+
},
|
|
361
|
+
headerRight: {
|
|
362
|
+
display: 'flex',
|
|
363
|
+
marginLeft: 'auto',
|
|
364
|
+
alignItems: 'center',
|
|
365
|
+
justifyContent: 'center',
|
|
366
|
+
},
|
|
367
|
+
headerActions: {
|
|
368
|
+
flexDirection: 'row',
|
|
369
|
+
gap: 6,
|
|
370
|
+
alignItems: 'center',
|
|
371
|
+
},
|
|
372
|
+
body: {
|
|
373
|
+
display: 'flex',
|
|
374
|
+
flexDirection: 'column',
|
|
375
|
+
gap: 12,
|
|
376
|
+
// border: '1px solid yellow',
|
|
377
|
+
},
|
|
378
|
+
roomGroupCard: {
|
|
379
|
+
display: 'flex',
|
|
380
|
+
flexDirection: 'column',
|
|
381
|
+
borderWidth: 1,
|
|
382
|
+
borderColor: $config.CARD_LAYER_3_COLOR,
|
|
383
|
+
borderRadius: 8,
|
|
384
|
+
},
|
|
385
|
+
roomHeader: {
|
|
386
|
+
display: 'flex',
|
|
387
|
+
flexDirection: 'row',
|
|
388
|
+
borderColor: $config.CARD_LAYER_3_COLOR,
|
|
389
|
+
backgroundColor: $config.CARD_LAYER_2_COLOR,
|
|
390
|
+
alignItems: 'center',
|
|
391
|
+
padding: 12,
|
|
392
|
+
borderTopLeftRadius: 8,
|
|
393
|
+
borderTopRightRadius: 8,
|
|
394
|
+
},
|
|
395
|
+
roomHeaderLeft: {
|
|
396
|
+
flexDirection: 'row',
|
|
397
|
+
alignItems: 'center',
|
|
398
|
+
flex: 1,
|
|
399
|
+
},
|
|
400
|
+
exitRoomBtn: {
|
|
401
|
+
backgroundColor: 'transparent',
|
|
402
|
+
borderColor: $config.SECONDARY_ACTION_COLOR,
|
|
403
|
+
height: 28,
|
|
404
|
+
},
|
|
405
|
+
joinRoomBtn: {
|
|
406
|
+
backgroundColor: $config.PRIMARY_ACTION_BRAND_COLOR,
|
|
407
|
+
borderColor: $config.PRIMARY_ACTION_BRAND_COLOR,
|
|
408
|
+
height: 28,
|
|
409
|
+
},
|
|
410
|
+
disabledBtn: {
|
|
411
|
+
backgroundColor: $config.SEMANTIC_NEUTRAL,
|
|
412
|
+
borderColor: $config.SEMANTIC_NEUTRAL,
|
|
413
|
+
height: 28,
|
|
414
|
+
},
|
|
415
|
+
roomActionBtnText: {
|
|
416
|
+
color: $config.PRIMARY_ACTION_TEXT_COLOR,
|
|
417
|
+
fontSize: ThemeConfig.FontSize.small,
|
|
418
|
+
lineHeight: 16,
|
|
419
|
+
fontWeight: '600',
|
|
420
|
+
},
|
|
421
|
+
roomHeaderInfo: {
|
|
422
|
+
flex: 1,
|
|
423
|
+
display: 'flex',
|
|
424
|
+
flexDirection: 'column',
|
|
425
|
+
gap: 4,
|
|
426
|
+
},
|
|
427
|
+
roomNameToolTipContainer: {
|
|
428
|
+
alignSelf: 'flex-start',
|
|
429
|
+
maxWidth: '100%',
|
|
430
|
+
},
|
|
431
|
+
roomName: {
|
|
432
|
+
overflow: 'hidden',
|
|
433
|
+
textOverflow: 'ellipsis',
|
|
434
|
+
whiteSpace: 'nowrap',
|
|
435
|
+
color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.high,
|
|
436
|
+
fontSize: ThemeConfig.FontSize.small,
|
|
437
|
+
lineHeight: 14,
|
|
438
|
+
fontWeight: '600',
|
|
439
|
+
maxWidth: '100%',
|
|
440
|
+
},
|
|
441
|
+
roomMemberCount: {
|
|
442
|
+
color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.low,
|
|
443
|
+
fontSize: ThemeConfig.FontSize.tiny,
|
|
444
|
+
lineHeight: 12,
|
|
445
|
+
fontWeight: '600',
|
|
446
|
+
},
|
|
447
|
+
roomHeaderRight: {
|
|
448
|
+
flexDirection: 'row',
|
|
449
|
+
alignItems: 'center',
|
|
450
|
+
marginLeft: 'auto',
|
|
451
|
+
gap: 4,
|
|
452
|
+
},
|
|
453
|
+
roomMembers: {
|
|
454
|
+
paddingHorizontal: 8,
|
|
455
|
+
paddingVertical: 12,
|
|
456
|
+
display: 'flex',
|
|
457
|
+
gap: 4,
|
|
458
|
+
alignSelf: 'stretch',
|
|
459
|
+
backgroundColor: $config.CARD_LAYER_1_COLOR,
|
|
460
|
+
borderBottomLeftRadius: 8,
|
|
461
|
+
borderBottomRightRadius: 8,
|
|
462
|
+
},
|
|
463
|
+
memberItem: {
|
|
464
|
+
flexDirection: 'row',
|
|
465
|
+
justifyContent: 'space-between',
|
|
466
|
+
alignItems: 'center',
|
|
467
|
+
padding: 8,
|
|
468
|
+
paddingRight: 16,
|
|
469
|
+
borderRadius: 9,
|
|
470
|
+
backgroundColor: $config.CARD_LAYER_3_COLOR,
|
|
471
|
+
minHeight: 64,
|
|
472
|
+
gap: 8,
|
|
473
|
+
},
|
|
474
|
+
memberItemOffline: {
|
|
475
|
+
opacity: 0.5,
|
|
476
|
+
backgroundColor: $config.CARD_LAYER_2_COLOR,
|
|
477
|
+
},
|
|
478
|
+
memberInfo: {
|
|
479
|
+
flexDirection: 'row',
|
|
480
|
+
alignItems: 'center',
|
|
481
|
+
flex: 1,
|
|
482
|
+
gap: 8,
|
|
483
|
+
},
|
|
484
|
+
memberNameContainer: {
|
|
485
|
+
flex: 1,
|
|
486
|
+
flexDirection: 'column',
|
|
487
|
+
},
|
|
488
|
+
memberDragHandle: {
|
|
489
|
+
marginRight: 12,
|
|
490
|
+
width: 16,
|
|
491
|
+
alignItems: 'center',
|
|
492
|
+
},
|
|
493
|
+
dragDots: {
|
|
494
|
+
width: 4,
|
|
495
|
+
height: 12,
|
|
496
|
+
borderRadius: 2,
|
|
497
|
+
},
|
|
498
|
+
memberAvatar: {
|
|
499
|
+
width: 32,
|
|
500
|
+
height: 32,
|
|
501
|
+
borderRadius: 16,
|
|
502
|
+
alignItems: 'center',
|
|
503
|
+
justifyContent: 'center',
|
|
504
|
+
marginRight: 12,
|
|
505
|
+
},
|
|
506
|
+
hostAvatar: {},
|
|
507
|
+
memberInitial: {
|
|
508
|
+
fontSize: 14,
|
|
509
|
+
fontWeight: '600',
|
|
510
|
+
},
|
|
511
|
+
memberName: {
|
|
512
|
+
fontSize: ThemeConfig.FontSize.small,
|
|
513
|
+
lineHeight: 20,
|
|
514
|
+
fontWeight: '400',
|
|
515
|
+
color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.high,
|
|
516
|
+
},
|
|
517
|
+
memberNameOffline: {
|
|
518
|
+
color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.low,
|
|
519
|
+
},
|
|
520
|
+
memberOfflineStatus: {
|
|
521
|
+
fontSize: ThemeConfig.FontSize.tiny,
|
|
522
|
+
lineHeight: 14,
|
|
523
|
+
fontWeight: '400',
|
|
524
|
+
color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.low,
|
|
525
|
+
fontStyle: 'italic',
|
|
526
|
+
marginTop: 2,
|
|
527
|
+
},
|
|
528
|
+
memberMenu: {
|
|
529
|
+
padding: 8,
|
|
530
|
+
marginLeft: 'auto',
|
|
531
|
+
display: 'flex',
|
|
532
|
+
flexDirection: 'row',
|
|
533
|
+
alignItems: 'center',
|
|
534
|
+
gap: 4,
|
|
535
|
+
},
|
|
536
|
+
memberRaiseHand: {},
|
|
537
|
+
memberMenuMoreIcon: {
|
|
538
|
+
width: 24,
|
|
539
|
+
height: 24,
|
|
540
|
+
alignSelf: 'center',
|
|
541
|
+
justifyContent: 'center',
|
|
542
|
+
alignItems: 'center',
|
|
543
|
+
borderRadius: 20,
|
|
544
|
+
},
|
|
545
|
+
emptyRoom: {
|
|
546
|
+
alignItems: 'center',
|
|
547
|
+
paddingVertical: 16,
|
|
548
|
+
},
|
|
549
|
+
emptyRoomPaddingHorizontal: {
|
|
550
|
+
paddingHorizontal: 12,
|
|
551
|
+
},
|
|
552
|
+
emptyRoomText: {
|
|
553
|
+
fontSize: ThemeConfig.FontSize.small,
|
|
554
|
+
color: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.low,
|
|
555
|
+
fontStyle: 'italic',
|
|
556
|
+
},
|
|
557
|
+
userAvatarContainer: {
|
|
558
|
+
width: 24,
|
|
559
|
+
height: 24,
|
|
560
|
+
borderRadius: 12,
|
|
561
|
+
display: 'flex',
|
|
562
|
+
alignItems: 'center',
|
|
563
|
+
justifyContent: 'center',
|
|
564
|
+
backgroundColor: $config.VIDEO_AUDIO_TILE_AVATAR_COLOR,
|
|
565
|
+
},
|
|
566
|
+
userAvatarOffline: {
|
|
567
|
+
backgroundColor: $config.FONT_COLOR + ThemeConfig.EmphasisPlus.low,
|
|
568
|
+
},
|
|
569
|
+
userAvatarText: {
|
|
570
|
+
fontSize: ThemeConfig.FontSize.tiny,
|
|
571
|
+
lineHeight: 24,
|
|
572
|
+
fontWeight: '600',
|
|
573
|
+
color: $config.BACKGROUND_COLOR,
|
|
574
|
+
},
|
|
575
|
+
userAvatarTextOffline: {
|
|
576
|
+
color: $config.BACKGROUND_COLOR + '80',
|
|
577
|
+
},
|
|
578
|
+
expandIcon: {
|
|
579
|
+
width: 32,
|
|
580
|
+
height: 32,
|
|
581
|
+
display: 'flex',
|
|
582
|
+
alignItems: 'center',
|
|
583
|
+
justifyContent: 'center',
|
|
584
|
+
shadowColor: $config.HARD_CODED_BLACK_COLOR,
|
|
585
|
+
},
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
export default BreakoutRoomGroupSettings;
|