@ethora/chat-component-rn 26.8.2 → 26.8.4
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/CHANGELOG.md +18 -0
- package/README.md +27 -1
- package/lib/commonjs/assets/EmptyChatIllustration.js +7 -6
- package/lib/commonjs/assets/EmptyChatIllustration.js.map +1 -1
- package/lib/commonjs/assets/icons.js +2 -2
- package/lib/commonjs/assets/icons.js.map +1 -1
- package/lib/commonjs/components/AuthForms/Login.js +23 -8
- package/lib/commonjs/components/AuthForms/Login.js.map +1 -1
- package/lib/commonjs/components/ContextMenu/ContextMenuComponents.js +12 -4
- package/lib/commonjs/components/ContextMenu/ContextMenuComponents.js.map +1 -1
- package/lib/commonjs/components/DropdownMenu/DropdownMenu.js +16 -9
- package/lib/commonjs/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/lib/commonjs/components/ExampleComponents/CustomMessage.js +25 -7
- package/lib/commonjs/components/ExampleComponents/CustomMessage.js.map +1 -1
- package/lib/commonjs/components/ExampleComponents/CustomTypingIndicatorExamples.js +18 -6
- package/lib/commonjs/components/ExampleComponents/CustomTypingIndicatorExamples.js.map +1 -1
- package/lib/commonjs/components/Header/HeaderRoomList.js +9 -6
- package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/commonjs/components/InputComponents/Search.js +13 -4
- package/lib/commonjs/components/InputComponents/Search.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatHeader.js +9 -3
- package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatRoom.js +6 -3
- package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ChatWrapper.js +8 -6
- package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js +37 -10
- package/lib/commonjs/components/MainComponents/LanguageSelectorModal.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MediaMessage.js +43 -19
- package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/commonjs/components/MainComponents/MessageList.js +9 -3
- package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RNStyled.js +12 -4
- package/lib/commonjs/components/MainComponents/RNStyled.js.map +1 -1
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js +61 -7
- package/lib/commonjs/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/commonjs/components/MainComponents/RoomList.js +12 -9
- package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
- package/lib/commonjs/components/MainComponents/Select.js +29 -8
- package/lib/commonjs/components/MainComponents/Select.js.map +1 -1
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +24 -13
- package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/BottomReplyContainer.js +24 -8
- package/lib/commonjs/components/MessageBubble/BottomReplyContainer.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/Message.js +46 -24
- package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js +15 -4
- package/lib/commonjs/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/commonjs/components/MessageBubble/MessageReaction.js +10 -5
- package/lib/commonjs/components/MessageBubble/MessageReaction.js.map +1 -1
- package/lib/commonjs/components/Modals/AddMembersModal/AddMembersModal.js +1 -5
- package/lib/commonjs/components/Modals/AddMembersModal/AddMembersModal.js.map +1 -1
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +42 -27
- package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +77 -24
- package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/DeleteChatModal.js +5 -7
- package/lib/commonjs/components/Modals/ChatProfileModal/DeleteChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +18 -14
- package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +20 -9
- package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ModalHeaderComponent.js +8 -2
- package/lib/commonjs/components/Modals/ModalHeaderComponent.js.map +1 -1
- package/lib/commonjs/components/Modals/ModalWrapper/ModalWrapper.js +8 -8
- package/lib/commonjs/components/Modals/ModalWrapper/ModalWrapper.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js +1 -5
- package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
- package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +18 -15
- package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +14 -9
- package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -1
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +3 -7
- package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js +8 -6
- package/lib/commonjs/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/Referrals/Referrals.js +7 -2
- package/lib/commonjs/components/Modals/SettingsModals/Referrals/Referrals.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/SharedStyledComponents.js +7 -3
- package/lib/commonjs/components/Modals/SettingsModals/SharedStyledComponents.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/RadioInput.js +10 -6
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/RadioInput.js.map +1 -1
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/VisibilityModal.js +7 -6
- package/lib/commonjs/components/Modals/SettingsModals/Visibility/VisibilityModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +3 -1
- package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +18 -15
- package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +145 -9
- package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/commonjs/components/Modals/styledModalComponents.js +60 -16
- package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +16 -10
- package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js +6 -2
- package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
- package/lib/commonjs/components/RoomComponents/styled/StyledRoomComponents.js +6 -0
- package/lib/commonjs/components/RoomComponents/styled/StyledRoomComponents.js.map +1 -1
- package/lib/commonjs/components/Thread/ThreadWrapper.js +9 -2
- package/lib/commonjs/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/commonjs/components/Toast/Toast.js +3 -1
- package/lib/commonjs/components/Toast/Toast.js.map +1 -1
- package/lib/commonjs/components/styled/AudioMessage.js +16 -11
- package/lib/commonjs/components/styled/AudioMessage.js.map +1 -1
- package/lib/commonjs/components/styled/Button.js +18 -9
- package/lib/commonjs/components/styled/Button.js.map +1 -1
- package/lib/commonjs/components/styled/DateLabel.js +8 -5
- package/lib/commonjs/components/styled/DateLabel.js.map +1 -1
- package/lib/commonjs/components/styled/MediaModal.js +27 -21
- package/lib/commonjs/components/styled/MediaModal.js.map +1 -1
- package/lib/commonjs/components/styled/RoomListComponents/index.js +60 -38
- package/lib/commonjs/components/styled/RoomListComponents/index.js.map +1 -1
- package/lib/commonjs/components/styled/SendInput.js +13 -8
- package/lib/commonjs/components/styled/SendInput.js.map +1 -1
- package/lib/commonjs/components/styled/StyledComponents.js +67 -23
- package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInput.js +32 -18
- package/lib/commonjs/components/styled/StyledInput.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/CustomTypingIndicator.js +13 -8
- package/lib/commonjs/components/styled/StyledInputComponents/CustomTypingIndicator.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/MediaComponents.js +20 -9
- package/lib/commonjs/components/styled/StyledInputComponents/MediaComponents.js.map +1 -1
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +39 -18
- package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/commonjs/components/styled/TreadLabel.js +6 -3
- package/lib/commonjs/components/styled/TreadLabel.js.map +1 -1
- package/lib/commonjs/context/MessageNotificationContext.js +14 -3
- package/lib/commonjs/context/MessageNotificationContext.js.map +1 -1
- package/lib/commonjs/helpers/getChatBackground.js +4 -1
- package/lib/commonjs/helpers/getChatBackground.js.map +1 -1
- package/lib/commonjs/helpers/getDateLabelColor.js +3 -1
- package/lib/commonjs/helpers/getDateLabelColor.js.map +1 -1
- package/lib/commonjs/helpers/getIconColor.js +4 -1
- package/lib/commonjs/helpers/getIconColor.js.map +1 -1
- package/lib/commonjs/helpers/getSenderNameColor.js +3 -1
- package/lib/commonjs/helpers/getSenderNameColor.js.map +1 -1
- package/lib/commonjs/helpers/markdownParser.js +27 -5
- package/lib/commonjs/helpers/markdownParser.js.map +1 -1
- package/lib/commonjs/helpers/parseMessageBody.js +82 -24
- package/lib/commonjs/helpers/parseMessageBody.js.map +1 -1
- package/lib/commonjs/helpers/preferencesStorage.js +44 -0
- package/lib/commonjs/helpers/preferencesStorage.js.map +1 -0
- package/lib/commonjs/hooks/useCustomTypingIndicator.js +7 -3
- package/lib/commonjs/hooks/useCustomTypingIndicator.js.map +1 -1
- package/lib/commonjs/hooks/useLogout.js +10 -3
- package/lib/commonjs/hooks/useLogout.js.map +1 -1
- package/lib/commonjs/hooks/useTheme.js +35 -0
- package/lib/commonjs/hooks/useTheme.js.map +1 -0
- package/lib/commonjs/i18n/strings.js +60 -0
- package/lib/commonjs/i18n/strings.js.map +1 -1
- package/lib/commonjs/main.js +88 -0
- package/lib/commonjs/main.js.map +1 -1
- package/lib/commonjs/networking/api-requests/push.api.js +130 -45
- package/lib/commonjs/networking/api-requests/push.api.js.map +1 -1
- package/lib/commonjs/networking/api-requests/rooms.api.js +13 -0
- package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/commonjs/roomStore/chatSettingsSlice.js +17 -4
- package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/commonjs/services/pushRegistration.js +261 -0
- package/lib/commonjs/services/pushRegistration.js.map +1 -0
- package/lib/commonjs/services/pushSubscriptionService.js +0 -24
- package/lib/commonjs/services/pushSubscriptionService.js.map +1 -1
- package/lib/commonjs/theme/index.js +38 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/styled.d.js +4 -0
- package/lib/commonjs/theme/styled.d.js.map +1 -0
- package/lib/commonjs/theme/theme.js +161 -0
- package/lib/commonjs/theme/theme.js.map +1 -0
- package/lib/commonjs/version.js +1 -1
- package/lib/module/assets/EmptyChatIllustration.js +7 -6
- package/lib/module/assets/EmptyChatIllustration.js.map +1 -1
- package/lib/module/assets/icons.js +1 -1
- package/lib/module/assets/icons.js.map +1 -1
- package/lib/module/components/AuthForms/Login.js +23 -8
- package/lib/module/components/AuthForms/Login.js.map +1 -1
- package/lib/module/components/ContextMenu/ContextMenuComponents.js +12 -4
- package/lib/module/components/ContextMenu/ContextMenuComponents.js.map +1 -1
- package/lib/module/components/DropdownMenu/DropdownMenu.js +16 -9
- package/lib/module/components/DropdownMenu/DropdownMenu.js.map +1 -1
- package/lib/module/components/ExampleComponents/CustomMessage.js +25 -7
- package/lib/module/components/ExampleComponents/CustomMessage.js.map +1 -1
- package/lib/module/components/ExampleComponents/CustomTypingIndicatorExamples.js +18 -6
- package/lib/module/components/ExampleComponents/CustomTypingIndicatorExamples.js.map +1 -1
- package/lib/module/components/Header/HeaderRoomList.js +9 -6
- package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
- package/lib/module/components/InputComponents/Search.js +13 -4
- package/lib/module/components/InputComponents/Search.js.map +1 -1
- package/lib/module/components/MainComponents/ChatHeader.js +9 -3
- package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
- package/lib/module/components/MainComponents/ChatRoom.js +6 -3
- package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
- package/lib/module/components/MainComponents/ChatWrapper.js +8 -6
- package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/LanguageSelectorModal.js +37 -10
- package/lib/module/components/MainComponents/LanguageSelectorModal.js.map +1 -1
- package/lib/module/components/MainComponents/MediaMessage.js +42 -19
- package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
- package/lib/module/components/MainComponents/MessageList.js +9 -3
- package/lib/module/components/MainComponents/MessageList.js.map +1 -1
- package/lib/module/components/MainComponents/RNStyled.js +12 -4
- package/lib/module/components/MainComponents/RNStyled.js.map +1 -1
- package/lib/module/components/MainComponents/ReduxWrapper.js +64 -10
- package/lib/module/components/MainComponents/ReduxWrapper.js.map +1 -1
- package/lib/module/components/MainComponents/RoomList.js +12 -9
- package/lib/module/components/MainComponents/RoomList.js.map +1 -1
- package/lib/module/components/MainComponents/Select.js +29 -8
- package/lib/module/components/MainComponents/Select.js.map +1 -1
- package/lib/module/components/Menu/HeaderRoomListMenu.js +24 -13
- package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
- package/lib/module/components/MessageBubble/BottomReplyContainer.js +24 -8
- package/lib/module/components/MessageBubble/BottomReplyContainer.js.map +1 -1
- package/lib/module/components/MessageBubble/Message.js +47 -25
- package/lib/module/components/MessageBubble/Message.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageInteractions.js +15 -4
- package/lib/module/components/MessageBubble/MessageInteractions.js.map +1 -1
- package/lib/module/components/MessageBubble/MessageReaction.js +10 -5
- package/lib/module/components/MessageBubble/MessageReaction.js.map +1 -1
- package/lib/module/components/Modals/AddMembersModal/AddMembersModal.js +2 -6
- package/lib/module/components/Modals/AddMembersModal/AddMembersModal.js.map +1 -1
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js +42 -27
- package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +79 -26
- package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/DeleteChatModal.js +6 -8
- package/lib/module/components/Modals/ChatProfileModal/DeleteChatModal.js.map +1 -1
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +18 -16
- package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -1
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +20 -9
- package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
- package/lib/module/components/Modals/ModalHeaderComponent.js +8 -2
- package/lib/module/components/Modals/ModalHeaderComponent.js.map +1 -1
- package/lib/module/components/Modals/ModalWrapper/ModalWrapper.js +10 -10
- package/lib/module/components/Modals/ModalWrapper/ModalWrapper.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/ModalContent.js +2 -6
- package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
- package/lib/module/components/Modals/NewChatModal/NewChatModal.js +18 -15
- package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +14 -9
- package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -1
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -8
- package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js +8 -6
- package/lib/module/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/Referrals/Referrals.js +7 -2
- package/lib/module/components/Modals/SettingsModals/Referrals/Referrals.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/SharedStyledComponents.js +7 -3
- package/lib/module/components/Modals/SettingsModals/SharedStyledComponents.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/Visibility/RadioInput.js +10 -6
- package/lib/module/components/Modals/SettingsModals/Visibility/RadioInput.js.map +1 -1
- package/lib/module/components/Modals/SettingsModals/Visibility/VisibilityModal.js +7 -6
- package/lib/module/components/Modals/SettingsModals/Visibility/VisibilityModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +3 -2
- package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +18 -15
- package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +148 -12
- package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
- package/lib/module/components/Modals/styledModalComponents.js +59 -15
- package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
- package/lib/module/components/RoomComponents/ChatRoomItem.js +16 -10
- package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/LastAudioMessage.js +6 -2
- package/lib/module/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
- package/lib/module/components/RoomComponents/styled/StyledRoomComponents.js +6 -0
- package/lib/module/components/RoomComponents/styled/StyledRoomComponents.js.map +1 -1
- package/lib/module/components/Thread/ThreadWrapper.js +9 -2
- package/lib/module/components/Thread/ThreadWrapper.js.map +1 -1
- package/lib/module/components/Toast/Toast.js +3 -1
- package/lib/module/components/Toast/Toast.js.map +1 -1
- package/lib/module/components/styled/AudioMessage.js +16 -11
- package/lib/module/components/styled/AudioMessage.js.map +1 -1
- package/lib/module/components/styled/Button.js +17 -9
- package/lib/module/components/styled/Button.js.map +1 -1
- package/lib/module/components/styled/DateLabel.js +8 -5
- package/lib/module/components/styled/DateLabel.js.map +1 -1
- package/lib/module/components/styled/MediaModal.js +29 -23
- package/lib/module/components/styled/MediaModal.js.map +1 -1
- package/lib/module/components/styled/RoomListComponents/index.js +62 -39
- package/lib/module/components/styled/RoomListComponents/index.js.map +1 -1
- package/lib/module/components/styled/SendInput.js +13 -8
- package/lib/module/components/styled/SendInput.js.map +1 -1
- package/lib/module/components/styled/StyledComponents.js +67 -23
- package/lib/module/components/styled/StyledComponents.js.map +1 -1
- package/lib/module/components/styled/StyledInput.js +32 -18
- package/lib/module/components/styled/StyledInput.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/CustomTypingIndicator.js +13 -8
- package/lib/module/components/styled/StyledInputComponents/CustomTypingIndicator.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/MediaComponents.js +20 -9
- package/lib/module/components/styled/StyledInputComponents/MediaComponents.js.map +1 -1
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +39 -18
- package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
- package/lib/module/components/styled/TreadLabel.js +6 -3
- package/lib/module/components/styled/TreadLabel.js.map +1 -1
- package/lib/module/context/MessageNotificationContext.js +14 -3
- package/lib/module/context/MessageNotificationContext.js.map +1 -1
- package/lib/module/helpers/getChatBackground.js +5 -1
- package/lib/module/helpers/getChatBackground.js.map +1 -1
- package/lib/module/helpers/getDateLabelColor.js +4 -1
- package/lib/module/helpers/getDateLabelColor.js.map +1 -1
- package/lib/module/helpers/getIconColor.js +5 -1
- package/lib/module/helpers/getIconColor.js.map +1 -1
- package/lib/module/helpers/getSenderNameColor.js +4 -1
- package/lib/module/helpers/getSenderNameColor.js.map +1 -1
- package/lib/module/helpers/markdownParser.js +27 -5
- package/lib/module/helpers/markdownParser.js.map +1 -1
- package/lib/module/helpers/parseMessageBody.js +82 -24
- package/lib/module/helpers/parseMessageBody.js.map +1 -1
- package/lib/module/helpers/preferencesStorage.js +36 -0
- package/lib/module/helpers/preferencesStorage.js.map +1 -0
- package/lib/module/hooks/useCustomTypingIndicator.js +8 -3
- package/lib/module/hooks/useCustomTypingIndicator.js.map +1 -1
- package/lib/module/hooks/useLogout.js +10 -3
- package/lib/module/hooks/useLogout.js.map +1 -1
- package/lib/module/hooks/useTheme.js +30 -0
- package/lib/module/hooks/useTheme.js.map +1 -0
- package/lib/module/i18n/strings.js +60 -0
- package/lib/module/i18n/strings.js.map +1 -1
- package/lib/module/main.js +4 -0
- package/lib/module/main.js.map +1 -1
- package/lib/module/networking/api-requests/push.api.js +119 -45
- package/lib/module/networking/api-requests/push.api.js.map +1 -1
- package/lib/module/networking/api-requests/rooms.api.js +12 -0
- package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
- package/lib/module/roomStore/chatSettingsSlice.js +14 -3
- package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
- package/lib/module/services/pushRegistration.js +250 -0
- package/lib/module/services/pushRegistration.js.map +1 -0
- package/lib/module/services/pushSubscriptionService.js +0 -24
- package/lib/module/services/pushSubscriptionService.js.map +1 -1
- package/lib/module/theme/index.js +7 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/styled.d.js +6 -0
- package/lib/module/theme/styled.d.js.map +1 -0
- package/lib/module/theme/theme.js +156 -0
- package/lib/module/theme/theme.js.map +1 -0
- package/lib/module/version.js +1 -1
- package/lib/typescript/assets/EmptyChatIllustration.d.ts +1 -0
- package/lib/typescript/assets/EmptyChatIllustration.d.ts.map +1 -1
- package/lib/typescript/assets/icons.d.ts +8 -0
- package/lib/typescript/assets/icons.d.ts.map +1 -1
- package/lib/typescript/components/AuthForms/Login.d.ts.map +1 -1
- package/lib/typescript/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/lib/typescript/components/ExampleComponents/CustomMessage.d.ts.map +1 -1
- package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
- package/lib/typescript/components/InputComponents/Search.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ChatWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/LanguageSelectorModal.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/ReduxWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
- package/lib/typescript/components/MainComponents/Select.d.ts.map +1 -1
- package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/BottomReplyContainer.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageInteractions.d.ts.map +1 -1
- package/lib/typescript/components/MessageBubble/MessageReaction.d.ts.map +1 -1
- package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/DeleteChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ModalHeaderComponent.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ModalWrapper/ModalWrapper.d.ts.map +1 -1
- package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts.map +1 -1
- package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/Referrals/Referrals.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/SharedStyledComponents.d.ts +2 -2
- package/lib/typescript/components/Modals/SettingsModals/SharedStyledComponents.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/Visibility/RadioInput.d.ts.map +1 -1
- package/lib/typescript/components/Modals/SettingsModals/Visibility/VisibilityModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/EditUserModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
- package/lib/typescript/components/Modals/styledModalComponents.d.ts +2 -0
- package/lib/typescript/components/Modals/styledModalComponents.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/LastAudioMessage.d.ts.map +1 -1
- package/lib/typescript/components/RoomComponents/styled/StyledRoomComponents.d.ts.map +1 -1
- package/lib/typescript/components/Thread/ThreadWrapper.d.ts.map +1 -1
- package/lib/typescript/components/styled/AudioMessage.d.ts.map +1 -1
- package/lib/typescript/components/styled/Button.d.ts.map +1 -1
- package/lib/typescript/components/styled/DateLabel.d.ts.map +1 -1
- package/lib/typescript/components/styled/MediaModal.d.ts +2 -2
- package/lib/typescript/components/styled/MediaModal.d.ts.map +1 -1
- package/lib/typescript/components/styled/RoomListComponents/index.d.ts.map +1 -1
- package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledComponents.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledInput.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledInputComponents/MediaComponents.d.ts.map +1 -1
- package/lib/typescript/components/styled/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
- package/lib/typescript/components/styled/TreadLabel.d.ts.map +1 -1
- package/lib/typescript/context/MessageNotificationContext.d.ts.map +1 -1
- package/lib/typescript/helpers/getAvatarColor.d.ts +1 -1
- package/lib/typescript/helpers/getChatBackground.d.ts.map +1 -1
- package/lib/typescript/helpers/getDateLabelColor.d.ts +3 -7
- package/lib/typescript/helpers/getDateLabelColor.d.ts.map +1 -1
- package/lib/typescript/helpers/getIconColor.d.ts +4 -7
- package/lib/typescript/helpers/getIconColor.d.ts.map +1 -1
- package/lib/typescript/helpers/getSenderNameColor.d.ts +3 -7
- package/lib/typescript/helpers/getSenderNameColor.d.ts.map +1 -1
- package/lib/typescript/helpers/markdownParser.d.ts +8 -1
- package/lib/typescript/helpers/markdownParser.d.ts.map +1 -1
- package/lib/typescript/helpers/parseMessageBody.d.ts +8 -1
- package/lib/typescript/helpers/parseMessageBody.d.ts.map +1 -1
- package/lib/typescript/helpers/preferencesStorage.d.ts +11 -0
- package/lib/typescript/helpers/preferencesStorage.d.ts.map +1 -0
- package/lib/typescript/hooks/useCustomTypingIndicator.d.ts +2 -0
- package/lib/typescript/hooks/useCustomTypingIndicator.d.ts.map +1 -1
- package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
- package/lib/typescript/hooks/useTheme.d.ts +16 -0
- package/lib/typescript/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/i18n/strings.d.ts.map +1 -1
- package/lib/typescript/main.d.ts +9 -0
- package/lib/typescript/main.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/push.api.d.ts +46 -3
- package/lib/typescript/networking/api-requests/push.api.d.ts.map +1 -1
- package/lib/typescript/networking/api-requests/rooms.api.d.ts +1 -0
- package/lib/typescript/networking/api-requests/rooms.api.d.ts.map +1 -1
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts +12 -1
- package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
- package/lib/typescript/services/pushRegistration.d.ts +21 -0
- package/lib/typescript/services/pushRegistration.d.ts.map +1 -0
- package/lib/typescript/services/pushSubscriptionService.d.ts +0 -4
- package/lib/typescript/services/pushSubscriptionService.d.ts.map +1 -1
- package/lib/typescript/theme/index.d.ts +5 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/theme/theme.d.ts +127 -0
- package/lib/typescript/theme/theme.d.ts.map +1 -0
- package/lib/typescript/types/models/room.model.d.ts +1 -0
- package/lib/typescript/types/models/room.model.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +42 -0
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/version.d.ts +1 -1
- package/package.json +2 -2
- package/src/assets/EmptyChatIllustration.tsx +7 -5
- package/src/assets/icons.tsx +24 -0
- package/src/components/AuthForms/Login.tsx +11 -9
- package/src/components/ContextMenu/ContextMenuComponents.tsx +4 -4
- package/src/components/DropdownMenu/DropdownMenu.tsx +14 -6
- package/src/components/ExampleComponents/CustomMessage.tsx +9 -8
- package/src/components/ExampleComponents/CustomTypingIndicatorExamples.tsx +6 -6
- package/src/components/Header/HeaderRoomList.tsx +11 -6
- package/src/components/InputComponents/Search.tsx +7 -4
- package/src/components/MainComponents/ChatHeader.tsx +9 -3
- package/src/components/MainComponents/ChatRoom.tsx +5 -2
- package/src/components/MainComponents/ChatWrapper.tsx +8 -6
- package/src/components/MainComponents/LanguageSelectorModal.tsx +33 -7
- package/src/components/MainComponents/MediaMessage.tsx +37 -18
- package/src/components/MainComponents/MessageList.tsx +13 -3
- package/src/components/MainComponents/RNStyled.tsx +4 -4
- package/src/components/MainComponents/ReduxWrapper.tsx +67 -10
- package/src/components/MainComponents/RoomList.tsx +13 -7
- package/src/components/MainComponents/Select.tsx +13 -8
- package/src/components/Menu/HeaderRoomListMenu.tsx +30 -13
- package/src/components/MessageBubble/BottomReplyContainer.tsx +16 -11
- package/src/components/MessageBubble/Message.tsx +48 -25
- package/src/components/MessageBubble/MessageInteractions.tsx +17 -4
- package/src/components/MessageBubble/MessageReaction.tsx +9 -4
- package/src/components/Modals/AddMembersModal/AddMembersModal.tsx +2 -2
- package/src/components/Modals/AttachSheet/AttachSheet.tsx +57 -23
- package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +63 -25
- package/src/components/Modals/ChatProfileModal/DeleteChatModal.tsx +6 -4
- package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +18 -14
- package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +14 -9
- package/src/components/Modals/ModalHeaderComponent.tsx +9 -2
- package/src/components/Modals/ModalWrapper/ModalWrapper.tsx +14 -6
- package/src/components/Modals/NewChatModal/ModalContent.tsx +2 -2
- package/src/components/Modals/NewChatModal/NewChatModal.tsx +19 -15
- package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +15 -8
- package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +2 -3
- package/src/components/Modals/SettingsModals/ManageDataModal/ManageDataModal.tsx +8 -6
- package/src/components/Modals/SettingsModals/Referrals/Referrals.tsx +5 -3
- package/src/components/Modals/SettingsModals/SharedStyledComponents.ts +4 -4
- package/src/components/Modals/SettingsModals/Visibility/RadioInput.tsx +9 -5
- package/src/components/Modals/SettingsModals/Visibility/VisibilityModal.tsx +7 -7
- package/src/components/Modals/UserProfileModal/EditUserModal.tsx +3 -1
- package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +19 -15
- package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +171 -9
- package/src/components/Modals/styledModalComponents.tsx +23 -15
- package/src/components/RoomComponents/ChatRoomItem.tsx +19 -10
- package/src/components/RoomComponents/styled/LastAudioMessage.tsx +4 -2
- package/src/components/RoomComponents/styled/StyledRoomComponents.ts +2 -0
- package/src/components/Thread/ThreadWrapper.tsx +6 -5
- package/src/components/Toast/Toast.tsx +1 -1
- package/src/components/styled/AudioMessage.tsx +12 -9
- package/src/components/styled/Button.tsx +15 -8
- package/src/components/styled/DateLabel.tsx +7 -3
- package/src/components/styled/MediaModal.tsx +30 -25
- package/src/components/styled/RoomListComponents/index.tsx +60 -35
- package/src/components/styled/SendInput.tsx +23 -8
- package/src/components/styled/StyledComponents.ts +30 -23
- package/src/components/styled/StyledInput.tsx +35 -21
- package/src/components/styled/StyledInputComponents/CustomTypingIndicator.tsx +8 -8
- package/src/components/styled/StyledInputComponents/MediaComponents.tsx +20 -7
- package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +15 -19
- package/src/components/styled/TreadLabel.tsx +9 -3
- package/src/context/MessageNotificationContext.tsx +18 -4
- package/src/helpers/getChatBackground.ts +3 -1
- package/src/helpers/getDateLabelColor.ts +5 -3
- package/src/helpers/getIconColor.ts +6 -3
- package/src/helpers/getSenderNameColor.ts +5 -3
- package/src/helpers/markdownParser.tsx +29 -5
- package/src/helpers/parseMessageBody.tsx +79 -26
- package/src/helpers/preferencesStorage.ts +40 -0
- package/src/hooks/useCustomTypingIndicator.tsx +7 -3
- package/src/hooks/useLogout.tsx +10 -3
- package/src/hooks/useTheme.ts +41 -0
- package/src/i18n/strings.ts +60 -0
- package/src/main.ts +33 -0
- package/src/networking/api-requests/push.api.ts +185 -62
- package/src/networking/api-requests/rooms.api.ts +9 -0
- package/src/roomStore/chatSettingsSlice.ts +24 -2
- package/src/services/pushRegistration.ts +369 -0
- package/src/services/pushSubscriptionService.ts +0 -34
- package/src/theme/index.ts +10 -0
- package/src/theme/styled.d.ts +9 -0
- package/src/theme/theme.ts +277 -0
- package/src/types/models/room.model.ts +1 -0
- package/src/types/types.ts +47 -0
- package/src/version.ts +1 -1
- package/lib/commonjs/context/PushNotificationProvider.js +0 -79
- package/lib/commonjs/context/PushNotificationProvider.js.map +0 -1
- package/lib/commonjs/hooks/usePushNotifications.js +0 -110
- package/lib/commonjs/hooks/usePushNotifications.js.map +0 -1
- package/lib/commonjs/services/pushNotifications.js +0 -143
- package/lib/commonjs/services/pushNotifications.js.map +0 -1
- package/lib/module/context/PushNotificationProvider.js +0 -79
- package/lib/module/context/PushNotificationProvider.js.map +0 -1
- package/lib/module/hooks/usePushNotifications.js +0 -106
- package/lib/module/hooks/usePushNotifications.js.map +0 -1
- package/lib/module/services/pushNotifications.js +0 -130
- package/lib/module/services/pushNotifications.js.map +0 -1
- package/lib/typescript/context/PushNotificationProvider.d.ts +0 -2
- package/lib/typescript/context/PushNotificationProvider.d.ts.map +0 -1
- package/lib/typescript/hooks/usePushNotifications.d.ts +0 -5
- package/lib/typescript/hooks/usePushNotifications.d.ts.map +0 -1
- package/lib/typescript/services/pushNotifications.d.ts +0 -10
- package/lib/typescript/services/pushNotifications.d.ts.map +0 -1
- package/src/context/PushNotificationProvider.tsx +0 -78
- package/src/hooks/usePushNotifications.ts +0 -131
- package/src/services/pushNotifications.ts +0 -170
|
@@ -3,17 +3,20 @@
|
|
|
3
3
|
/** @format */
|
|
4
4
|
|
|
5
5
|
import React, { useCallback, useMemo } from 'react';
|
|
6
|
-
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
|
7
|
-
import { useDispatch } from 'react-redux';
|
|
6
|
+
import { StyleSheet, Switch, Text, TouchableOpacity, View } from 'react-native';
|
|
7
|
+
import { useDispatch, useSelector } from 'react-redux';
|
|
8
8
|
import { ModalContainerFullScreen } from '../styledModalComponents';
|
|
9
9
|
import ModalHeaderComponent from '../ModalHeaderComponent';
|
|
10
10
|
import { ArowDownIcon } from '../../../assets/icons';
|
|
11
|
-
import { setActiveModal } from '../../../roomStore/chatSettingsSlice';
|
|
11
|
+
import { setActiveModal, setPushEnabled, setThemePreference } from '../../../roomStore/chatSettingsSlice';
|
|
12
12
|
import { MODAL_TYPES } from '../../../helpers/constants/MODAL_TYPES';
|
|
13
13
|
import { useChatSettingState } from '../../../hooks/useChatSettingState';
|
|
14
14
|
import { chatTextStyle } from '../../../helpers/typography';
|
|
15
|
+
import { savePreferences } from '../../../helpers/preferencesStorage';
|
|
15
16
|
import { useT } from '../../../i18n/useT';
|
|
17
|
+
import { useTheme } from '../../../hooks/useTheme';
|
|
16
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
const APPEARANCES = ['light', 'dark', 'system'];
|
|
17
20
|
const UserSettingsModal = ({
|
|
18
21
|
handleCloseModal
|
|
19
22
|
}) => {
|
|
@@ -22,6 +25,19 @@ const UserSettingsModal = ({
|
|
|
22
25
|
const {
|
|
23
26
|
config
|
|
24
27
|
} = useChatSettingState();
|
|
28
|
+
const theme = useTheme();
|
|
29
|
+
const styles = useMemo(() => createStyles(theme), [theme]);
|
|
30
|
+
const themePreference = useSelector(s => s.chatSettingStore.themePreference);
|
|
31
|
+
const pushEnabled = useSelector(s => s.chatSettingStore.pushEnabled);
|
|
32
|
+
|
|
33
|
+
// What the picker shows before the user ever touched it: the host's
|
|
34
|
+
// config.dark, so the selected segment matches what is on screen.
|
|
35
|
+
const appearance = themePreference ?? (config?.dark === 'system' ? 'system' : config?.dark ? 'dark' : 'light');
|
|
36
|
+
const appearanceLabels = useMemo(() => ({
|
|
37
|
+
light: t('settings.appearance.light'),
|
|
38
|
+
dark: t('settings.appearance.dark'),
|
|
39
|
+
system: t('settings.appearance.system')
|
|
40
|
+
}), [t]);
|
|
25
41
|
const options = useMemo(() => [{
|
|
26
42
|
label: t('settings.manageData.title'),
|
|
27
43
|
key: MODAL_TYPES.MANAGE_DATA
|
|
@@ -32,15 +48,85 @@ const UserSettingsModal = ({
|
|
|
32
48
|
const handleClick = useCallback(key => {
|
|
33
49
|
dispatch(setActiveModal(key));
|
|
34
50
|
}, [dispatch]);
|
|
51
|
+
const handleAppearance = useCallback(pref => {
|
|
52
|
+
dispatch(setThemePreference(pref));
|
|
53
|
+
savePreferences({
|
|
54
|
+
theme: pref
|
|
55
|
+
});
|
|
56
|
+
}, [dispatch]);
|
|
57
|
+
|
|
58
|
+
// The SDK acts on the flag itself (pushRegistration releases / restores
|
|
59
|
+
// the device-token registrations); the host is told so it can mirror
|
|
60
|
+
// the choice on any native push side it owns.
|
|
61
|
+
const onPushNotificationsToggle = config?.eventHandlers?.onPushNotificationsToggle;
|
|
62
|
+
const handlePush = useCallback(enabled => {
|
|
63
|
+
dispatch(setPushEnabled(enabled));
|
|
64
|
+
savePreferences({
|
|
65
|
+
pushEnabled: enabled
|
|
66
|
+
});
|
|
67
|
+
if (onPushNotificationsToggle) {
|
|
68
|
+
Promise.resolve(onPushNotificationsToggle(enabled)).catch(err => console.warn('[settings] onPushNotificationsToggle failed', err));
|
|
69
|
+
}
|
|
70
|
+
}, [dispatch, onPushNotificationsToggle]);
|
|
35
71
|
return /*#__PURE__*/_jsxs(ModalContainerFullScreen, {
|
|
36
72
|
style: styles.screen,
|
|
37
73
|
children: [/*#__PURE__*/_jsx(ModalHeaderComponent, {
|
|
38
74
|
handleCloseModal: handleCloseModal,
|
|
39
75
|
headerTitle: t('settings.menu.title'),
|
|
40
76
|
titleStyle: chatTextStyle(config?.typography?.profile?.screenTitle)
|
|
41
|
-
}), /*#__PURE__*/
|
|
77
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
42
78
|
style: styles.body,
|
|
43
|
-
children:
|
|
79
|
+
children: [!config?.settings?.hideAppearance ? /*#__PURE__*/_jsxs(View, {
|
|
80
|
+
style: [styles.card, styles.stackCard],
|
|
81
|
+
testID: "settings-appearance",
|
|
82
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
83
|
+
style: styles.label,
|
|
84
|
+
children: t('settings.appearance.title')
|
|
85
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
86
|
+
style: styles.segmented,
|
|
87
|
+
accessibilityRole: "radiogroup",
|
|
88
|
+
children: APPEARANCES.map(pref => {
|
|
89
|
+
const selected = pref === appearance;
|
|
90
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
91
|
+
testID: `settings-appearance-${pref}`,
|
|
92
|
+
accessibilityRole: "radio",
|
|
93
|
+
accessibilityState: {
|
|
94
|
+
selected
|
|
95
|
+
},
|
|
96
|
+
activeOpacity: 0.7,
|
|
97
|
+
style: [styles.segment, selected && styles.segmentSelected],
|
|
98
|
+
onPress: () => handleAppearance(pref),
|
|
99
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
100
|
+
style: [styles.segmentLabel, selected && styles.segmentLabelSelected],
|
|
101
|
+
children: appearanceLabels[pref]
|
|
102
|
+
})
|
|
103
|
+
}, pref);
|
|
104
|
+
})
|
|
105
|
+
})]
|
|
106
|
+
}) : null, !config?.settings?.hidePushToggle ? /*#__PURE__*/_jsxs(View, {
|
|
107
|
+
style: styles.card,
|
|
108
|
+
testID: "settings-notifications",
|
|
109
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
110
|
+
style: styles.switchText,
|
|
111
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
112
|
+
style: styles.label,
|
|
113
|
+
children: t('settings.notifications.push')
|
|
114
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
115
|
+
style: styles.hint,
|
|
116
|
+
children: t('settings.notifications.pushHint')
|
|
117
|
+
})]
|
|
118
|
+
}), /*#__PURE__*/_jsx(Switch, {
|
|
119
|
+
testID: "settings-push-switch",
|
|
120
|
+
value: pushEnabled !== false,
|
|
121
|
+
onValueChange: handlePush,
|
|
122
|
+
trackColor: {
|
|
123
|
+
true: theme.primary,
|
|
124
|
+
false: theme.surfaceSecondary
|
|
125
|
+
},
|
|
126
|
+
thumbColor: theme.surface,
|
|
127
|
+
ios_backgroundColor: theme.surfaceSecondary
|
|
128
|
+
})]
|
|
129
|
+
}) : null, options.map(option => /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
44
130
|
testID: `settings-row-${option.key}`,
|
|
45
131
|
activeOpacity: 0.7,
|
|
46
132
|
style: styles.card,
|
|
@@ -49,18 +135,18 @@ const UserSettingsModal = ({
|
|
|
49
135
|
style: styles.label,
|
|
50
136
|
children: option.label
|
|
51
137
|
}), /*#__PURE__*/_jsx(ArowDownIcon, {
|
|
52
|
-
color:
|
|
138
|
+
color: theme.textSecondary,
|
|
53
139
|
width: 20,
|
|
54
140
|
height: 20,
|
|
55
141
|
style: styles.chevron
|
|
56
142
|
})]
|
|
57
|
-
}, option.key))
|
|
143
|
+
}, option.key))]
|
|
58
144
|
})]
|
|
59
145
|
});
|
|
60
146
|
};
|
|
61
|
-
const
|
|
147
|
+
const createStyles = theme => StyleSheet.create({
|
|
62
148
|
screen: {
|
|
63
|
-
backgroundColor:
|
|
149
|
+
backgroundColor: theme.listBackground
|
|
64
150
|
},
|
|
65
151
|
body: {
|
|
66
152
|
width: '100%',
|
|
@@ -71,11 +157,11 @@ const styles = StyleSheet.create({
|
|
|
71
157
|
flexDirection: 'row',
|
|
72
158
|
alignItems: 'center',
|
|
73
159
|
justifyContent: 'space-between',
|
|
74
|
-
backgroundColor:
|
|
160
|
+
backgroundColor: theme.surface,
|
|
75
161
|
borderRadius: 20,
|
|
76
162
|
paddingHorizontal: 20,
|
|
77
163
|
paddingVertical: 22,
|
|
78
|
-
shadowColor:
|
|
164
|
+
shadowColor: theme.shadow,
|
|
79
165
|
shadowOffset: {
|
|
80
166
|
width: 0,
|
|
81
167
|
height: 4
|
|
@@ -84,10 +170,60 @@ const styles = StyleSheet.create({
|
|
|
84
170
|
shadowRadius: 12,
|
|
85
171
|
elevation: 3
|
|
86
172
|
},
|
|
173
|
+
// Label above the control instead of beside it: three segments do not
|
|
174
|
+
// fit next to a label on narrow phones.
|
|
175
|
+
stackCard: {
|
|
176
|
+
flexDirection: 'column',
|
|
177
|
+
alignItems: 'stretch',
|
|
178
|
+
gap: 14
|
|
179
|
+
},
|
|
87
180
|
label: {
|
|
88
181
|
fontSize: 17,
|
|
89
182
|
fontWeight: '500',
|
|
90
|
-
color:
|
|
183
|
+
color: theme.text
|
|
184
|
+
},
|
|
185
|
+
hint: {
|
|
186
|
+
marginTop: 4,
|
|
187
|
+
fontSize: 13,
|
|
188
|
+
lineHeight: 18,
|
|
189
|
+
color: theme.textSecondary
|
|
190
|
+
},
|
|
191
|
+
switchText: {
|
|
192
|
+
flex: 1,
|
|
193
|
+
paddingRight: 16
|
|
194
|
+
},
|
|
195
|
+
segmented: {
|
|
196
|
+
flexDirection: 'row',
|
|
197
|
+
backgroundColor: theme.surfaceSecondary,
|
|
198
|
+
borderRadius: 12,
|
|
199
|
+
padding: 3,
|
|
200
|
+
gap: 3
|
|
201
|
+
},
|
|
202
|
+
segment: {
|
|
203
|
+
flex: 1,
|
|
204
|
+
alignItems: 'center',
|
|
205
|
+
justifyContent: 'center',
|
|
206
|
+
paddingVertical: 9,
|
|
207
|
+
borderRadius: 9
|
|
208
|
+
},
|
|
209
|
+
segmentSelected: {
|
|
210
|
+
backgroundColor: theme.surface,
|
|
211
|
+
shadowColor: theme.shadow,
|
|
212
|
+
shadowOffset: {
|
|
213
|
+
width: 0,
|
|
214
|
+
height: 1
|
|
215
|
+
},
|
|
216
|
+
shadowOpacity: 0.08,
|
|
217
|
+
shadowRadius: 3,
|
|
218
|
+
elevation: 2
|
|
219
|
+
},
|
|
220
|
+
segmentLabel: {
|
|
221
|
+
fontSize: 15,
|
|
222
|
+
fontWeight: '500',
|
|
223
|
+
color: theme.textSecondary
|
|
224
|
+
},
|
|
225
|
+
segmentLabelSelected: {
|
|
226
|
+
color: theme.text
|
|
91
227
|
},
|
|
92
228
|
chevron: {
|
|
93
229
|
transform: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useMemo","StyleSheet","Text","TouchableOpacity","View","useDispatch","ModalContainerFullScreen","ModalHeaderComponent","ArowDownIcon","setActiveModal","MODAL_TYPES","useChatSettingState","chatTextStyle","useT","jsx","_jsx","jsxs","_jsxs","UserSettingsModal","handleCloseModal","t","dispatch","config","options","label","key","MANAGE_DATA","VISIBILITY","handleClick","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","StyleSheet","Switch","Text","TouchableOpacity","View","useDispatch","useSelector","ModalContainerFullScreen","ModalHeaderComponent","ArowDownIcon","setActiveModal","setPushEnabled","setThemePreference","MODAL_TYPES","useChatSettingState","chatTextStyle","savePreferences","useT","useTheme","jsx","_jsx","jsxs","_jsxs","APPEARANCES","UserSettingsModal","handleCloseModal","t","dispatch","config","theme","styles","createStyles","themePreference","s","chatSettingStore","pushEnabled","appearance","dark","appearanceLabels","light","system","options","label","key","MANAGE_DATA","VISIBILITY","handleClick","handleAppearance","pref","onPushNotificationsToggle","eventHandlers","handlePush","enabled","Promise","resolve","catch","err","console","warn","style","screen","children","headerTitle","titleStyle","typography","profile","screenTitle","body","settings","hideAppearance","card","stackCard","testID","segmented","accessibilityRole","map","selected","accessibilityState","activeOpacity","segment","segmentSelected","onPress","segmentLabel","segmentLabelSelected","hidePushToggle","switchText","hint","value","onValueChange","trackColor","true","primary","false","surfaceSecondary","thumbColor","surface","ios_backgroundColor","option","color","textSecondary","width","height","chevron","create","backgroundColor","listBackground","padding","gap","flexDirection","alignItems","justifyContent","borderRadius","paddingHorizontal","paddingVertical","shadowColor","shadow","shadowOffset","shadowOpacity","shadowRadius","elevation","fontSize","fontWeight","text","marginTop","lineHeight","flex","paddingRight","transform","rotate"],"sourceRoot":"../../../../../src","sources":["components/Modals/UserSettingsModal/UserSettingsModal.tsx"],"mappings":";;AAAA;;AAEA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SACEC,UAAU,EACVC,MAAM,EACNC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,QACC,cAAc;AACrB,SAASC,WAAW,EAAEC,WAAW,QAAQ,aAAa;AACtD,SAASC,wBAAwB,QAAQ,0BAA0B;AACnE,OAAOC,oBAAoB,MAAM,yBAAyB;AAC1D,SAASC,YAA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AAoB,EAAE;IACpBe,KAAK,EAAErE,KAAK,CAAC6F;EACf,CAAC;EACDpB,OAAO,EAAE;IACPyB,SAAS,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAS,CAAC;EAClC;AACF,CAAC,CAAC;AAEF,eAAexG,iBAAiB","ignoreList":[]}
|
|
@@ -7,7 +7,9 @@ import Button from '../styled/Button';
|
|
|
7
7
|
export const ModalBackground = styled.View`
|
|
8
8
|
width: 100%;
|
|
9
9
|
height: 100%;
|
|
10
|
-
background:
|
|
10
|
+
background: ${({
|
|
11
|
+
theme
|
|
12
|
+
}) => theme.overlay};
|
|
11
13
|
flex: 1;
|
|
12
14
|
justify-content: center;
|
|
13
15
|
align-items: center;
|
|
@@ -20,13 +22,25 @@ export const CloseButton = styled.TouchableOpacity`
|
|
|
20
22
|
border: none;
|
|
21
23
|
font-size: 20px;
|
|
22
24
|
cursor: pointer;
|
|
23
|
-
color:
|
|
25
|
+
color: ${({
|
|
26
|
+
theme
|
|
27
|
+
}) => theme.textMuted};
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
/** The "×" glyph inside CloseButton — themed so it reads on dark surfaces. */
|
|
31
|
+
export const CloseButtonText = styled.Text`
|
|
32
|
+
font-size: 24px;
|
|
33
|
+
color: ${({
|
|
34
|
+
theme
|
|
35
|
+
}) => theme.text};
|
|
24
36
|
`;
|
|
25
37
|
export const ModalContainer = styled.View`
|
|
26
38
|
// flex: 1;
|
|
27
39
|
// width: 100%;
|
|
28
40
|
// height: 100%;
|
|
29
|
-
background:
|
|
41
|
+
background: ${({
|
|
42
|
+
theme
|
|
43
|
+
}) => theme.surface};
|
|
30
44
|
padding: 32px 64px;
|
|
31
45
|
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.2);
|
|
32
46
|
display: flex;
|
|
@@ -37,11 +51,17 @@ export const ModalContainer = styled.View`
|
|
|
37
51
|
align-items: center;
|
|
38
52
|
`;
|
|
39
53
|
export const ModalTitle = styled.Text`
|
|
54
|
+
color: ${({
|
|
55
|
+
theme
|
|
56
|
+
}) => theme.text};
|
|
40
57
|
font-size: 20px;
|
|
41
58
|
margin: 0;
|
|
42
59
|
font-weight: 400;
|
|
43
60
|
`;
|
|
44
61
|
export const ModalDescription = styled.Text`
|
|
62
|
+
color: ${({
|
|
63
|
+
theme
|
|
64
|
+
}) => theme.text};
|
|
45
65
|
font-size: 14px;
|
|
46
66
|
margin: 0;
|
|
47
67
|
font-weight: 400;
|
|
@@ -55,7 +75,9 @@ export const GroupContainer = styled.View`
|
|
|
55
75
|
export const ModalContainerFullScreen = styled.View`
|
|
56
76
|
width: 100%;
|
|
57
77
|
height: 100%;
|
|
58
|
-
background-color:
|
|
78
|
+
background-color: ${({
|
|
79
|
+
theme
|
|
80
|
+
}) => theme.surface};
|
|
59
81
|
display: flex;
|
|
60
82
|
flex-direction: column;
|
|
61
83
|
align-items: center;
|
|
@@ -79,12 +101,16 @@ export const HeaderContainer = styled.View`
|
|
|
79
101
|
* 20px on an SE). Together that's status-bar + 8px above the back
|
|
80
102
|
* button and 8px below — properly sized and properly centered. */
|
|
81
103
|
padding: 8px 16px;
|
|
82
|
-
background-color:
|
|
104
|
+
background-color: ${({
|
|
105
|
+
theme
|
|
106
|
+
}) => theme.surface};
|
|
83
107
|
/* Same card treatment as the room-list header: rounded bottom corners
|
|
84
108
|
* and a soft drop shadow instead of a hairline rule. */
|
|
85
109
|
border-bottom-left-radius: 20px;
|
|
86
110
|
border-bottom-right-radius: 20px;
|
|
87
|
-
shadow-color:
|
|
111
|
+
shadow-color: ${({
|
|
112
|
+
theme
|
|
113
|
+
}) => theme.shadow};
|
|
88
114
|
shadow-offset: 0px 4px;
|
|
89
115
|
shadow-opacity: 0.06;
|
|
90
116
|
shadow-radius: 12px;
|
|
@@ -114,7 +140,9 @@ export const ProfileImage = styled.View`
|
|
|
114
140
|
width: 120px;
|
|
115
141
|
height: 120px;
|
|
116
142
|
border-radius: 10000px;
|
|
117
|
-
border: 1px solid
|
|
143
|
+
border: 1px solid ${({
|
|
144
|
+
theme
|
|
145
|
+
}) => theme.border};
|
|
118
146
|
`;
|
|
119
147
|
export const UserInfo = styled.View`
|
|
120
148
|
width: 100%;
|
|
@@ -124,7 +152,9 @@ export const UserInfo = styled.View`
|
|
|
124
152
|
align-items: center;
|
|
125
153
|
`;
|
|
126
154
|
export const UserName = styled.Text`
|
|
127
|
-
color:
|
|
155
|
+
color: ${({
|
|
156
|
+
theme
|
|
157
|
+
}) => theme.text};
|
|
128
158
|
font-size: ${({
|
|
129
159
|
fontSize
|
|
130
160
|
}) => fontSize ?? 24}px;
|
|
@@ -133,25 +163,33 @@ export const UserName = styled.Text`
|
|
|
133
163
|
}) => fontWeight ?? 400};
|
|
134
164
|
`;
|
|
135
165
|
export const UserStatus = styled.Text`
|
|
136
|
-
color:
|
|
166
|
+
color: ${({
|
|
167
|
+
theme
|
|
168
|
+
}) => theme.textSecondary};
|
|
137
169
|
font-size: 16px;
|
|
138
170
|
font-weight: 400;
|
|
139
171
|
`;
|
|
140
172
|
export const BorderedContainer = styled.View`
|
|
141
173
|
width: 100%;
|
|
142
174
|
border-radius: 8px;
|
|
143
|
-
border: 1px solid
|
|
175
|
+
border: 1px solid ${({
|
|
176
|
+
theme
|
|
177
|
+
}) => theme.border};
|
|
144
178
|
display: flex;
|
|
145
179
|
flex-direction: column;
|
|
146
180
|
padding: 16px;
|
|
147
181
|
`;
|
|
148
182
|
export const LabelData = styled.Text`
|
|
149
|
-
color:
|
|
183
|
+
color: ${({
|
|
184
|
+
theme
|
|
185
|
+
}) => theme.textSecondary};
|
|
150
186
|
font-size: 14px;
|
|
151
187
|
font-weight: 400;
|
|
152
188
|
`;
|
|
153
189
|
export const Label = styled.Text`
|
|
154
|
-
color:
|
|
190
|
+
color: ${({
|
|
191
|
+
theme
|
|
192
|
+
}) => theme.text};
|
|
155
193
|
font-size: 16px;
|
|
156
194
|
`;
|
|
157
195
|
export const ActionButton = styled(Button)`
|
|
@@ -159,7 +197,9 @@ export const ActionButton = styled(Button)`
|
|
|
159
197
|
`;
|
|
160
198
|
export const EmptySection = styled.View`
|
|
161
199
|
height: 200px;
|
|
162
|
-
border: 1px solid
|
|
200
|
+
border: 1px solid ${({
|
|
201
|
+
theme
|
|
202
|
+
}) => theme.border};
|
|
163
203
|
border-radius: 8px;
|
|
164
204
|
width: 100%;
|
|
165
205
|
display: flex;
|
|
@@ -167,11 +207,15 @@ export const EmptySection = styled.View`
|
|
|
167
207
|
export const Viewider = styled.View`
|
|
168
208
|
height: 1px;
|
|
169
209
|
width: 100%;
|
|
170
|
-
background-color:
|
|
210
|
+
background-color: ${({
|
|
211
|
+
theme
|
|
212
|
+
}) => theme.surfaceHighlight};
|
|
171
213
|
`;
|
|
172
214
|
export const Divider = styled.View`
|
|
173
215
|
height: 1px;
|
|
174
216
|
width: 100%;
|
|
175
|
-
background-color:
|
|
217
|
+
background-color: ${({
|
|
218
|
+
theme
|
|
219
|
+
}) => theme.surfaceHighlight};
|
|
176
220
|
`;
|
|
177
221
|
//# sourceMappingURL=styledModalComponents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["styled","Button","ModalBackground","View","CloseButton","TouchableOpacity","
|
|
1
|
+
{"version":3,"names":["styled","Button","ModalBackground","View","theme","overlay","CloseButton","TouchableOpacity","textMuted","CloseButtonText","Text","text","ModalContainer","surface","ModalTitle","ModalDescription","GroupContainer","ModalContainerFullScreen","HeaderContainer","shadow","HeaderLeft","HeaderRight","CenterContainer","ProfileImage","border","UserInfo","UserName","fontSize","fontWeight","UserStatus","textSecondary","BorderedContainer","LabelData","Label","ActionButton","EmptySection","Viewider","surfaceHighlight","Divider"],"sourceRoot":"../../../../src","sources":["components/Modals/styledModalComponents.tsx"],"mappings":";;AAAA;;AAEA,OAAOA,MAAM,MAAM,0BAA0B;AAC7C,OAAOC,MAAM,MAAM,kBAAkB;AAErC,OAAO,MAAMC,eAAe,GAAGF,MAAM,CAACG,IAAI;AAC1C;AACA;AACA,gBAAg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AS,GAAGhC,MAAM,CAACU,IAAI;AACpC,WAAW,CAAC;EAAEN;AAAM,CAAC,KAAKA,KAAK,CAAC0B,aAAa;AAC7C;AACA;AACA,CAAC;AAED,OAAO,MAAMG,KAAK,GAAGjC,MAAM,CAACU,IAAI;AAChC,WAAW,CAAC;EAAEN;AAAM,CAAC,KAAKA,KAAK,CAACO,IAAI;AACpC;AACA,CAAC;AAED,OAAO,MAAMuB,YAAY,GAAGlC,MAAM,CAACC,MAAM,CAAC;AAC1C;AACA,CAAC;AAED,OAAO,MAAMkC,YAAY,GAAGnC,MAAM,CAACG,IAAI;AACvC;AACA,sBAAsB,CAAC;EAAEC;AAAM,CAAC,KAAKA,KAAK,CAACoB,MAAM;AACjD;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMY,QAAQ,GAAGpC,MAAM,CAACG,IAAI;AACnC;AACA;AACA,sBAAsB,CAAC;EAAEC;AAAM,CAAC,KAAKA,KAAK,CAACiC,gBAAgB;AAC3D,CAAC;AAED,OAAO,MAAMC,OAAO,GAAGtC,MAAM,CAACG,IAAI;AAClC;AACA;AACA,sBAAsB,CAAC;EAAEC;AAAM,CAAC,KAAKA,KAAK,CAACiC,gBAAgB;AAC3D,CAAC","ignoreList":[]}
|
|
@@ -10,6 +10,8 @@ import Composing from '../styled/StyledInputComponents/Composing';
|
|
|
10
10
|
import { Text, View } from 'react-native';
|
|
11
11
|
import LastMessageItem from './LastMessageItem';
|
|
12
12
|
import { LastRoomMessageText } from './styled/StyledRoomComponents';
|
|
13
|
+
import { useTheme } from '../../hooks/useTheme';
|
|
14
|
+
import { resolveTheme } from '../../theme/theme';
|
|
13
15
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
16
|
const ChatRoomItem = ({
|
|
15
17
|
chat,
|
|
@@ -17,6 +19,10 @@ const ChatRoomItem = ({
|
|
|
17
19
|
isDriver,
|
|
18
20
|
config
|
|
19
21
|
}) => {
|
|
22
|
+
// Rows can be rendered with an explicit `config` prop (tests, hosts
|
|
23
|
+
// composing their own list); honour its colours over the store's.
|
|
24
|
+
const storeTheme = useTheme();
|
|
25
|
+
const theme = useMemo(() => config ? resolveTheme(config) : storeTheme, [config, storeTheme]);
|
|
20
26
|
// Room icons can live on the membership-gated secure-files host.
|
|
21
27
|
const fileToken = useFileToken();
|
|
22
28
|
const displayName = String(chat?.title || chat?.name || '').trim();
|
|
@@ -121,9 +127,9 @@ const ChatRoomItem = ({
|
|
|
121
127
|
paddingVertical: 8,
|
|
122
128
|
paddingRight: 8,
|
|
123
129
|
borderBottomWidth: 1,
|
|
124
|
-
//
|
|
125
|
-
// than the ground itself, so the
|
|
126
|
-
borderBottomColor:
|
|
130
|
+
// `divider` reads against the list ground; the lighter border
|
|
131
|
+
// tone was paler than the ground itself, so the separators vanished.
|
|
132
|
+
borderBottomColor: theme.divider
|
|
127
133
|
},
|
|
128
134
|
children: [/*#__PURE__*/_jsxs(View, {
|
|
129
135
|
style: {
|
|
@@ -136,7 +142,7 @@ const ChatRoomItem = ({
|
|
|
136
142
|
})
|
|
137
143
|
}), stamp ? /*#__PURE__*/_jsx(UserCount, {
|
|
138
144
|
style: {
|
|
139
|
-
color:
|
|
145
|
+
color: theme.textSecondary,
|
|
140
146
|
fontSize: 12
|
|
141
147
|
},
|
|
142
148
|
text: stamp
|
|
@@ -159,7 +165,7 @@ const ChatRoomItem = ({
|
|
|
159
165
|
}) : undefined, chat.unreadMessages && chat.unreadMessages > 0 ? /*#__PURE__*/_jsx(View, {
|
|
160
166
|
style: {
|
|
161
167
|
borderRadius: 8,
|
|
162
|
-
backgroundColor:
|
|
168
|
+
backgroundColor: theme.primary,
|
|
163
169
|
padding: 2,
|
|
164
170
|
minWidth: 24,
|
|
165
171
|
minHeight: 24,
|
|
@@ -171,7 +177,7 @@ const ChatRoomItem = ({
|
|
|
171
177
|
children: /*#__PURE__*/_jsx(Text, {
|
|
172
178
|
style: {
|
|
173
179
|
// color: isChatActive ? "#141414" : "#fff",
|
|
174
|
-
color:
|
|
180
|
+
color: theme.text,
|
|
175
181
|
fontSize: 14,
|
|
176
182
|
fontWeight: '600'
|
|
177
183
|
},
|
|
@@ -180,13 +186,13 @@ const ChatRoomItem = ({
|
|
|
180
186
|
}) : null]
|
|
181
187
|
}), isDriver &&
|
|
182
188
|
/*#__PURE__*/
|
|
183
|
-
// Darker than the list's own ground
|
|
184
|
-
//
|
|
185
|
-
//
|
|
189
|
+
// Darker than the list's own ground, otherwise the separator
|
|
190
|
+
// disappears into it — white and the old highlight hairline both
|
|
191
|
+
// did.
|
|
186
192
|
_jsx(View, {
|
|
187
193
|
style: {
|
|
188
194
|
height: 1,
|
|
189
|
-
backgroundColor:
|
|
195
|
+
backgroundColor: theme.divider,
|
|
190
196
|
marginTop: 8
|
|
191
197
|
}
|
|
192
198
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useMemo","useSelector","useFileToken","appendFileToken","ProfileImagePlaceholder","ChatItem","ChatInfo","ChatName","UserCount","Composing","Text","View","LastMessageItem","LastRoomMessageText","jsx","_jsx","jsxs","_jsxs","ChatRoomItem","chat","index","isDriver","config","fileToken","displayName","String","title","name","trim","usersSet","state","rooms","withAuthorFallback","message","rawUserId","user","id","localId","split","entry","fromUsersSet","firstName","lastName","safeName","lastMessage","messages","length","undefined","i","msg","deleted","isDeleted","formatTimeToHHMM","isoTime","date","Date","trimmed","test","parseInt","isNaN","getTime","now","getFullYear","year","month","getMonth","toString","padStart","day","getDate","toDateString","hours","getHours","minutes","getMinutes","stamp","createdAt","children","pointerEvents","icon","active","style","flexDirection","justifyContent","flex","width","paddingVertical","paddingRight","borderBottomWidth","borderBottomColor","alignItems","text","color","fontSize","minHeight","composing","usersTyping","composingList","body","historyComplete","unreadMessages","borderRadius","backgroundColor","
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","useSelector","useFileToken","appendFileToken","ProfileImagePlaceholder","ChatItem","ChatInfo","ChatName","UserCount","Composing","Text","View","LastMessageItem","LastRoomMessageText","useTheme","resolveTheme","jsx","_jsx","jsxs","_jsxs","ChatRoomItem","chat","index","isDriver","config","storeTheme","theme","fileToken","displayName","String","title","name","trim","usersSet","state","rooms","withAuthorFallback","message","rawUserId","user","id","localId","split","entry","fromUsersSet","firstName","lastName","safeName","lastMessage","messages","length","undefined","i","msg","deleted","isDeleted","formatTimeToHHMM","isoTime","date","Date","trimmed","test","parseInt","isNaN","getTime","now","getFullYear","year","month","getMonth","toString","padStart","day","getDate","toDateString","hours","getHours","minutes","getMinutes","stamp","createdAt","children","pointerEvents","icon","active","style","flexDirection","justifyContent","flex","width","paddingVertical","paddingRight","borderBottomWidth","borderBottomColor","divider","alignItems","text","color","textSecondary","fontSize","minHeight","composing","usersTyping","composingList","body","historyComplete","unreadMessages","borderRadius","backgroundColor","primary","padding","minWidth","display","marginLeft","fontWeight","height","marginTop"],"sourceRoot":"../../../../src","sources":["components/RoomComponents/ChatRoomItem.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACnD,SAASC,WAAW,QAAQ,aAAa;AAGzC,SAASC,YAAY,QAAQ,0BAA0B;AACvD,SAASC,eAAe,QAAQ,6BAA6B;AAE7D,SAASC,uBAAuB,QAAQ,2CAA2C;AACnF,SACEC,QAAQ,EACRC,QAAQ,EACRC,QAAQ,EAERC,SAAS,QACJ,8BAA8B;AACrC,OAAOC,SAAS,MAAM,2CAA2C;AACjE,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AACzC,OAAOC,eAAe,MAAM,mBAAmB;AAC/C,SAASC,mBAAmB,QAAQ,+BAA+B;AACnE,SAASC,QAAQ,QAAQ,sBAAsB;AAC/C,SAASC,YAAY,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AASjD,MAAMC,YAAyC,GAAGA,CAAC;EACjDC,IAAI;EACJC,KAAK;EACLC,QAAQ;EACRC;A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ACjBG,QAAQ,EAAE,EAAE;cACZe,UAAU,EAAE;YACd,CAAE;YAAAjC,QAAA,EAED5D,IAAI,CAACqF,cAAc,IAAI;UAAE,CACtB;QAAC,CACH,CAAC,GACL,IAAI;MAAA,CACJ,CAAC,EACNnF,QAAQ;MAAA;MACP;MACA;MACA;MACAN,IAAA,CAACN,IAAI;QACH0E,KAAK,EAAE;UAAE8B,MAAM,EAAE,CAAC;UAAEP,eAAe,EAAElF,KAAK,CAACoE,OAAO;UAAEsB,SAAS,EAAE;QAAE;MAAE,CACpE,CACF;IAAA,CACG,CAAC;EAAA,GAzIM9F,KA0IL,CAAC;AAEf,CAAC;AAED,eAAeF,YAAY","ignoreList":[]}
|
|
@@ -4,6 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import { LastRoomMessageContainer, LastRoomMessageName, LastRoomMessageText } from './StyledRoomComponents';
|
|
5
5
|
import styled from 'styled-components/native';
|
|
6
6
|
import { PlayIcon } from '../../../assets/icons';
|
|
7
|
+
import { useTheme } from '../../../hooks/useTheme';
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
const PlayButton = styled.View`
|
|
9
10
|
width: 20px;
|
|
@@ -12,7 +13,9 @@ const PlayButton = styled.View`
|
|
|
12
13
|
display: flex;
|
|
13
14
|
justify-content: center;
|
|
14
15
|
align-items: center;
|
|
15
|
-
background-color:
|
|
16
|
+
background-color: ${({
|
|
17
|
+
theme
|
|
18
|
+
}) => theme.dark ? theme.surfaceSecondary : '#d8ecff'};
|
|
16
19
|
margin-top: 1px;
|
|
17
20
|
`;
|
|
18
21
|
const AudioRow = styled.View`
|
|
@@ -24,6 +27,7 @@ const LastAudioMessage = ({
|
|
|
24
27
|
user,
|
|
25
28
|
body
|
|
26
29
|
}) => {
|
|
30
|
+
const theme = useTheme();
|
|
27
31
|
return /*#__PURE__*/_jsxs(LastRoomMessageContainer, {
|
|
28
32
|
children: [/*#__PURE__*/_jsx(LastRoomMessageName, {
|
|
29
33
|
numberOfLines: 1,
|
|
@@ -33,7 +37,7 @@ const LastAudioMessage = ({
|
|
|
33
37
|
children: /*#__PURE__*/_jsx(PlayIcon, {
|
|
34
38
|
width: 10,
|
|
35
39
|
height: 10,
|
|
36
|
-
color:
|
|
40
|
+
color: theme.dark ? theme.text : '#1F2937'
|
|
37
41
|
})
|
|
38
42
|
}), /*#__PURE__*/_jsx(LastRoomMessageText, {
|
|
39
43
|
numberOfLines: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","LastRoomMessageContainer","LastRoomMessageName","LastRoomMessageText","styled","PlayIcon","jsx","_jsx","jsxs","_jsxs","PlayButton","View","AudioRow","LastAudioMessage","user","body","children","numberOfLines","name","width","height","color","trim"],"sourceRoot":"../../../../../src","sources":["components/RoomComponents/styled/LastAudioMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SACEC,wBAAwB,EACxBC,mBAAmB,EACnBC,mBAAmB,QACd,wBAAwB;AAE/B,OAAOC,MAAM,MAAM,0BAA0B;AAE7C,SAASC,QAAQ,QAAQ,uBAAuB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;
|
|
1
|
+
{"version":3,"names":["React","LastRoomMessageContainer","LastRoomMessageName","LastRoomMessageText","styled","PlayIcon","useTheme","jsx","_jsx","jsxs","_jsxs","PlayButton","View","theme","dark","surfaceSecondary","AudioRow","LastAudioMessage","user","body","children","numberOfLines","name","width","height","color","text","trim"],"sourceRoot":"../../../../../src","sources":["components/RoomComponents/styled/LastAudioMessage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAc,OAAO;AACjC,SACEC,wBAAwB,EACxBC,mBAAmB,EACnBC,mBAAmB,QACd,wBAAwB;AAE/B,OAAOC,MAAM,MAAM,0BAA0B;AAE7C,SAASC,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,QAAQ,QAAQ,yBAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAInD,MAAMC,UAAU,GAAGP,MAAM,CAACQ,IAAI;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,CAAC;EAAEC;AAAM,CAAC,KAAMA,KAAK,CAACC,IAAI,GAAGD,KAAK,CAACE,gBAAgB,GAAG,SAAU;AACtF;AACA,CAAC;AAED,MAAMC,QAAQ,GAAGZ,MAAM,CAACQ,IAAI;AAC5B;AACA;AACA;AACA,CAAC;AAED,MAAMK,gBAA2C,GAAGA,CAAC;EAAEC,IAAI;EAAEC;AAAK,CAAC,KAAK;EACtE,MAAMN,KAAK,GAAGP,QAAQ,CAAC,CAAC;EACxB,oBACEI,KAAA,CAACT,wBAAwB;IAAAmB,QAAA,gBACvBZ,IAAA,CAACN,mBAAmB;MAACmB,aAAa,EAAE,CAAE;MAAAD,QAAA,EAAEF,IAAI,EAAEI,IAAI,IAAI;IAAE,CAAsB,CAAC,eAC/EZ,KAAA,CAACM,QAAQ;MAAAI,QAAA,gBACPZ,IAAA,CAACG,UAAU;QAAAS,QAAA,eACTZ,IAAA,CAACH,QAAQ;UAACkB,KAAK,EAAE,EAAG;UAACC,MAAM,EAAE,EAAG;UAACC,KAAK,EAAEZ,KAAK,CAACC,IAAI,GAAGD,KAAK,CAACa,IAAI,GAAG;QAAU,CAAE;MAAC,CACrE,CAAC,eACblB,IAAA,CAACL,mBAAmB;QAACkB,aAAa,EAAE,CAAE;QAAAD,QAAA,EACnCD,IAAI,EAAEQ,IAAI,CAAC,CAAC,GAAGR,IAAI,GAAG;MAAO,CACX,CAAC;IAAA,CACd,CAAC;EAAA,CACa,CAAC;AAE/B,CAAC;AAED,eAAeF,gBAAgB","ignoreList":[]}
|
|
@@ -11,8 +11,14 @@ export const LastRoomMessageContainer = styled.View`
|
|
|
11
11
|
export const LastRoomMessageName = styled.Text`
|
|
12
12
|
font-weight: 600;
|
|
13
13
|
max-width: 190px;
|
|
14
|
+
color: ${({
|
|
15
|
+
theme
|
|
16
|
+
}) => theme.text};
|
|
14
17
|
`;
|
|
15
18
|
export const LastRoomMessageText = styled.Text`
|
|
19
|
+
color: ${({
|
|
20
|
+
theme
|
|
21
|
+
}) => theme.textSecondary};
|
|
16
22
|
max-width: 190px;
|
|
17
23
|
flex-shrink: 1;
|
|
18
24
|
flex-wrap: nowrap;
|