Commit Graph

12 Commits

Author SHA1 Message Date
Gerzon Z 4c148bde3b
[CHORE] BackdropOpacity based on themes (#2863)
* Added backdropOpacity based on theme

* Updated ActionSheet, ReactionsModal, ReactionPicker and Sidebar

* Updated MultiSelect

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2021-02-19 15:05:47 -03:00
Djorkaeff Alexandre 10ba9d5138
[NEW] Support RTL (#2656)
* wip: RTL (iOS)

* wip: RTL (Android)

* wip: reload bundle when change between RTL languages

* fix: Stack Animation on Android

* fix: update snapshot

* fix: Swipe Room Actions in RTL mode

* fix: snapshots

* Move isRTL to i18n

* Fix styling

* Update tests

* Update pods

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-11-30 18:47:05 -03:00
Diego Mello fade17d0de
[IMPROVEMENT] Add `Change Encryption Password` and `Reset E2E Key` (#2542)
* init

* Basic tests passing

* Add SecurityPrivacyView

* List.Item

* section

* Start removing theme as prop

* Remove StatusBar theme prop

* SafeAreaView theme prop

* Minor fixes

* List.Container

* Add translateTitle and translateSubtitle props

* Storybook

* Show action indicator

* Header

* Info

* Theme stories

* FlatList

* DisplayName

* Fix settings

* FlatList tweaks

* ThemeView

* Screen Lock Config

* DefaultBrowserView

* PickerView and User Prefs

* Notification Prefs

* StatusView

* Auto Translate

* InviteUsersEdit

* Visitor

* Minor fixes

* Remove Separator

* Remove iteminfo

* Font scale

* Legal

* Jitsi and e2e

* Block

* search, star, etc

* auto translate and notifications

* RoomInfo

* Refactor RoomActions

* lint

* Remove DisclosureIndicator

* padding horizontal 12

* Detox

* Tests

* SecurityPrivacy

* E2E encryption sec view

* stash

* Reset own key

* Reset key

* Change password

* Hide content

* Small refactor

* Fix tests

* Tests passing

* Change test order

* add pt-br

* Address review comments

* tests

* Missing i18n ptbr

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
2020-10-30 15:31:04 -03:00
Djorkaeff Alexandre 3c9017a62d
[NEW] E2E Encryption (#2394)
* Add E2EKey to Subscription Model

* Install react-native-simple-crypto

* Install bytebuffer

* Add translations

* CreateChannel Encrypted toggle

* Request E2E_Enabled setting

* Add some E2E API methods

* POC E2E Encryption

* Garbage remove

* Remove keys cleaner

* Android cast JWK -> PKCS1

* Initialize E2E when Login Success

* Add some translations

* Add e2e property to Message model

* Send Encrypted messages

* (iOS) PKCS1 -> JWK & e2e.setUserPublicAndPrivateKeys

* (Android) PKCS1 -> JWK & e2e.setUserPublicAndPrivateKeys

* Create an encrypted channel

* Fix app crashing on RoomsList

* Create room key

* Set Room E2E Key (Android)

* Edit room encrypted

* Show encrypted icon on messages

* logEvents

* Decrypt pending subscriptions & messages

* Handle user cancel e2e password entry

* E2ESavePasswordView

* Update Snapshot

* Add encrypted props to message on Send

* Thread messages encryption

* E2E -> Encryption

* Share Extension: Share encrypted text

* (POC) Search messages on Encrypted room

* Provide room key to new users

* Request roomKey on stream-notify-room-users

* Add e2eKeyId to Room Model

* (WIP) E2E Encryption Screens

* Remove encryption subscription file

* Move E2E_Enable to Server Model

* Encryption List Banner

* Move Encryption init to Sagas

* Show banner only when enabled

* Use RocketChat/react-native-simple-crypto

* Search on WM only when is an Encrypted channel

* (WIP) Encryption Banner

* Encryption banner

* Patch -> Fork

* Improve send encrypted message

* Update simple-crypto

* Not decrypt already decrypted messages

* Add comments

* Change eslint disable to inline

* Improve code

* Remove comment

* Some fixes

* (WIP) Encryption Screens

* Improve sub find

* Resend an encrypted message

* Fix comment

* Code improvements

* Hide e2e buttons on features if it is not enabled

* InApp notifications of a encrypted room

* Encryption stop logic

* Edit encrypted message

* DB batch on decryptPending

* Encryption ready client

* Comments

* Handle getRoomInstance errors

* Multiple messages decrypt

* Remove unnecessary try/catch

* Fix decrypt all messages history

* Just add a questionmark

* Fix some subscriptions missing decrypt

* Disable request key logic

* Fix unicode emojis

* Fix e2ekey request

* roomId -> subscription

* Decrypt subscription after merge

* E2ERoom -> EncryptionRoom

* Fix infinite loading

* Handle import key errors

* Handle request key errors

* Move e2eRequestRoomKey to Rocket.Chat

* WIP handshake when key should be requested

* Add search messages explanation

* Remove some TODO and update comments

* Improvements

* Dont show message hash to user

* Handle key request & prevent multiple calls

* Request E2EKey on decryptSubscription that doesn't exists on database yet

* Insert decrypted subscription

* Fix crash after login

* Decrypt sub when receive the key

* Decrypt pending messages of a room

* Encrypted as a switch

* Buffer to Base64 URI Safe

* Add a relevant comment

* Prevent import key without a privateKey

* Prevent create a new instance when client is not ready

* Update simple-crypto & remove replace trick

* More comments

* Remove useless comment

* Remove useless try/catch

* I18n all E2E screens

* E2ESavePassword -> E2ESaveYourPassword

* Prevent multiple views on message when is not encrypted

* Fix encryption toggle not working sometimes

* follow some suggestions

* dont rotate icons

* remove unnecessary condition

* remove unreachable event

* create channel comment

* disable no-bitwise rule for entire file

* loadKeys -> persistKeys

* getMasterKey -> generateMasterKey

* explicit difference between E2EKey & e2eKeyId

* roomId -> rid

* group columns

* Remove server selector

* missing log events

* remove comment

* use stored public key

* update simple-crypto & remove base64-js patch

* add some logs

* remove unreachable condition

* log errors

* handle errors on provide key directly on subscription

* Downgrade RocketChat/react-native-simple-crypto

* improve get room instance

* migration of older apps

* check encrypted status before send a message

* wait client ready

* use our own base64-js

* add more jest tests

* explain return

* remove unncessary stop

* thrown error to caller

* remove superfluous checks

* use Encryption property

* change ready state logic

* ready -> establishing

* encryption.room -> encryptionRoom

* EncryptionRoom -> Room

* add documentation

* wait establishing before provide a room key

* remove superfluous condition

* improve error handling logic

* fallback e2ekey set

* remove no longer necessary check

* remove e.g.

* improve getRoomInstance

* import from index

* use batch

* fix a comment

* decrypt tmsg

* dont show hash when message is encrypted

* Fix detox

* Apply suggestions from code review

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-09-11 11:31:38 -03:00
Diego Mello 7172c028cc
[IMPROVEMENT] Move toggle and inquiry to Enterprise Edition license (#2426)
* [IMPROVEMENT] Move toggle and inquiry to Enterprise

* Move inquiry stream to ee

* Emit inquiry subscribe

* imports to ee last

* Add readme to ee

Co-authored-by: Djorkaeff Alexandre <djorkaeff.unb@gmail.com>
2020-08-28 16:41:08 -03:00
Djorkaeff Alexandre 7813ed3b28
[FIX] User Preferences (#2418)
* [FIX] User Preferences

* PreferencesView -> UserPreferencesView

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-08-21 15:14:06 -03:00
Ezequiel de Oliveira 54c4614e2e
[NEW] User notification preferences (#2403)
* Button to preferences view

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Create screen to preferences and listItem to notifications

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Refactoring NotificationPreferencesView

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* List notification preferences

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Adding translations to labels

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* SetUserPreferences api call

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Saving new user preference in API

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Fix lint

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Add in-app notification test

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Fix in app mentions preference

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Improve object in testInAppNotification

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Removing improper options for NotificationpreferencesView

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Adding API version

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Use redux in UserNotificationPrefView

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Remove in app test

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Use components from another view

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Removing verification for testing in-app notifications

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Move to ProfileView

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-08-21 10:30:11 -03:00
Djorkaeff Alexandre ac708dd32b
[NEW] Omnichannel inquiry queue (#2352)
* [WIP] Omnichannel queue

* Request inquiry when login

* Show take inquiry queued room

* Queue List as a Screen

* Poc using unread badge

* Prevent navigation to empty list

* Remove chat from queue when taked

* Fix header status on omnichannel preview room

* Fix room actions view to preview queued chat

* Use isOmnichannelPreview and dont show actions when is preview

* Filter queue chats taken by other people

* Fix room info to omnichannel preview room

* Handle show Queue

* Reset inquiry store when change server

* Improve queue logic

* Disable swipe on RoomItem when is a Queue Item

* Add unreadBadge style

* Move unread badge to presentation folder

* Cleanup inquiry reducers

* Move take saga to rocketchat function

* Remove comments

* Add relevant comments

* Subscribe to public stream if is livechat manager or doesnt have departments

* Add pt-br and improve queue empty message

* Fix take when dont have view-livechat-manager permission

* Add missing events

* Create selector for inquiry queue

* Minor fixes

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-07-31 15:22:30 -03:00
Ezequiel de Oliveira e5aaa667e7
[FIX] MessagesView title not working (#2294)
* Set title in header of room actions view items

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Remove unneeded spaces

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Set header title on constructor

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

* Remove unused navigation options

Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-07-24 16:58:14 -03:00
Djorkaeff Alexandre 07e9bcb776
[NEW] Send multiple attachments (#2162)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-06-26 17:22:56 -03:00
Ezequiel de Oliveira 2632ef50f5
[IMPROVEMENT] Use react-native-notifier for in-app notifications (#2139)
Signed-off-by: Ezequiel De Oliveira <ezequiel1de1oliveira@gmail.com>

Co-authored-by: Diego Mello <diegolmello@gmail.com>
2020-06-16 17:32:30 -03:00
Diego Mello 98ed84ba5c
[CHORE] Update react-navigation to v5 (#2154)
* react-navigation v5 installed

* compiling

* Outside working

* InsideStack compiling

* Switch stack

* Starting room

* RoomView header

* SafeAreaView

* Slide from right stack animation

* stash

* Fix params

* Create channel

* inapp notification

* Custom status

* Add server working

* Refactor appStart

* Attachment

* in-app notification

* AuthLoadingView

* Remove compat

* Navigation

* Outside animations

* Fix new server icon

* block modal

* AttachmentView header

* Remove unnecessary code

* SelectedUsersView header

* StatusView

* CreateDiscussionView

* RoomInfoView

* RoomInfoEditView style

* RoomMembersView

* RoomsListView header

* RoomView header

* Share extension

* getParam

* Focus/blur

* Trying to fix inapp

* Lint

* Simpler app container

* Update libs

* Revert "Simpler app container"

This reverts commit 1e49d80bb4.

* Load messages faster

* Fix safearea on ReactionsModal

* Update safe area to v3

* lint

* Fix transition

* stash - drawer replace working

* stash - modal nav

* RoomActionsView as tablet modal

* RoomStack

* Stop showing RoomView header when there's no room

* Custom Header and different navigation based on stack

* Refactor setHeader

* MasterDetailContext

* RoomView header

* Fix isMasterDetail rule

* KeyCommands kind of working

* Create channel on tablet

* RoomView sCU

* Remove withSplit

* Settings opening as modal

* Settings

* StatusView headerLeft

* Admin panel

* TwoFactor style

* DirectoryView

* ServerDropdown and SortDropdown animations

* ThreadMessagesView

* Navigate to empty RoomView on server switch when in master detail

* ProfileView header

* Fix navigation issues

* Nav to any room info on tablet

* Room info

* Refactoring

* Fix rooms search

* Roomslist commands

* SearchMessagesView close modal

* Key commands

* Fix undefined subscription

* Disallow navigate to focused room

* isFocused state on RoomsListView

* Blur text inputs when focus is lost

* Replace animation

* Default nav theme

* Refactoring

* Always open Attachment with close modal button

* ModalContainer backdrop following themes

* Screen tracking

* Refactor get active route for in-app notification

* Only mark room as focused when in master detail layout

* Lint

* Open modals as fade from bottom on Android

* typo

* Fixing tests

* Fix in-app update

* Fixing goRoom issues

* Refactor stack names

* Fix unreadsCount

* Fix stack

* Fix header animation

* Refactor ShareNavigation

* Refactor navigation theme

* Make sure title is set

* Fix create discussion navigation

* Remove unused variable

* Create discussions from actions fixed

* Layout animation

* Screen lock on share extension

* Unnecessary change

* Admin border

* Set header after state callback

* Fix key commands on outside stack

* Fix back button pressed

* Remove layout animations from Android

* Tweak animations on Android

* Disable swipe gesture to open drawer

* Fix current item on RoomsListView

* Fix add server

* Fix drawer

* Fix broadcast

* LayoutAnimation instead of Transitions

* Fix onboarding back press

* Fix assorted tests

* Create discussion fix

* RoomInfoView header

* Drawer active item
2020-06-15 11:00:46 -03:00