Commit graph

286 commits

Author SHA1 Message Date
Matthew Hodgson
b7d5d2fd56 beautify UserSettings error msg
fix up default dialog cancel button
2017-03-12 20:03:14 +00:00
Luke Barnard
b7f1b1a424 Merge pull request #736 from matrix-org/luke/chat-create-or-reuse-dialog
Allow user to choose from existing DMs on new chat
2017-03-07 16:22:52 +00:00
Luke Barnard
bf348a0f78 Instead of listening for view_room, use a callback
But make sure that nothing other than the callback is done when RoomTile is clicked.
2017-03-06 17:44:29 +00:00
Luke Barnard
20fa36325f Remember to unregister on unmoun 2017-03-06 15:01:46 +00:00
Luke Barnard
4548d1b824 Use dispatch instead of passing onClick, adjust dialog wording. 2017-03-06 14:51:01 +00:00
Luke Barnard
a122b5d88e Style 2017-03-06 14:22:12 +00:00
David Baker
30eddf9fda Merge pull request #734 from matrix-org/luke/fix-resend
Fix resend bar and "send anyway" in UDD
2017-03-06 11:06:52 +00:00
David Baker
62d9439530 Remove old import & pass through result
in InteractiveAuthDialog
2017-03-03 14:31:52 +00:00
Luke Barnard
ca5c2fb82e Allow user to choose from existing DMs on new chat
When creating a new chat with one person, show a dialog that asks the user whether they'd like to use an existing chat or actually create a new room.

Fixes https://github.com/vector-im/riot-web/issues/2760
2017-03-03 13:48:37 +00:00
David Baker
1bdf213d67 Merge pull request #729 from matrix-org/dbkr/register_ui_auth
Port registration over to use InteractiveAuth
2017-03-03 13:37:41 +00:00
David Baker
977b8a7379 Make UIAuth Dialog show an error
when auth fails
2017-03-03 12:08:26 +00:00
Luke Barnard
ab9aaa9174 Merge pull request #732 from matrix-org/luke/fuse-test
Test to see how fuse feels
2017-03-03 10:46:41 +00:00
Luke Barnard
b822bc66ee Remove redundant null check 2017-03-03 10:22:02 +00:00
Luke Barnard
4fff383de5 Fix resend bar and "send anyway" in UDD 2017-03-03 10:02:08 +00:00
David Baker
0035a91596 Merge pull request #731 from matrix-org/luke/warn-users-e2e-first-time
Warn users about using e2e for the first time
2017-03-02 13:28:15 +00:00
Luke Barnard
6d296a0e7a Warn users about using e2e for the first time 2017-03-01 15:41:13 +00:00
Luke Barnard
7221900497 Refactor remove resend_all_events and cancel_all_events dispatches 2017-02-27 13:39:12 +00:00
David Baker
51467506f8 Port registration over to use InteractiveAuth
These changes are moved over from the dbkr/msisdn_signin branch
2017-02-24 11:41:23 +00:00
Luke Barnard
439bde309e General ChatInviteDialog optimisations
- Use avatar initial instead of "R" or "?"
- Use Fuse.js to do case-insensitive fuzzy search. This allows for better sorting of results as well as search based on weighted keys (so userId has a high weight when the input starts with "@").
- Added debounce of 200ms to prevent analysis on every key stroke. Fuse seems to degrade performance vs. simple, non-fuzzy, unsorted matching, but the debounce should prevent too much computation.
- Move the selection to the top when the query is changed. There's no point in staying mid-way through the items at that point.
2017-02-23 12:12:25 +00:00
Luke Barnard
b41787c335 Initial work on improving invite dialog 2017-02-23 09:03:20 +00:00
Luke Barnard
b68b0e25c8 Merge Matthew's wording patch 2017-02-22 16:59:45 +00:00
Luke Barnard
436e6b36f1 Move UDE handling to a its own file, adjust wording 2017-02-22 16:42:14 +00:00
Luke Barnard
816e0be3a0 Retry->Send anyway 2017-02-22 16:17:49 +00:00
Luke Barnard
c13ff254b1 Add "Retry" button to UDE 2017-02-22 10:21:43 +00:00
Luke Barnard
878e31eba2 Show UDDialog on m.call.invite failure
Requires https://github.com/matrix-org/matrix-js-sdk/pull/378

Also, refactored UDDialog creation into its own dispatch event, because there will be other parts of the code that will want to spawn one.
2017-02-21 17:22:22 +00:00
David Baker
db4b9691cc Support reasons for kick / ban
Don't ban me for fun, girl
Let me be the one, girl
Ban me for a reason
Let the reason be love.
2017-02-17 17:27:46 +00:00
Richard van der Hoff
bdb8f9d052 Don't force-logout the user if reading localstorage fails
Give them a modal dialog to give them a chance to abort.
2017-02-15 19:33:39 +00:00
David Baker
ec0ce76d87 Clarify docs 2017-02-14 16:09:02 +00:00
David Baker
8001c0b16b Add confirmation dialog to kick/ban buttons
Add a specific dialog used for confirming member actions.

Also remove onFinished from MemberInfo which did absolutely
nothing.
2017-02-14 13:40:19 +00:00
David Baker
36d126f3a9 PR feedback 2017-02-13 19:09:43 +00:00
David Baker
77b226631a Copyright 2017-02-13 16:15:00 +00:00
David Baker
79d9deb339 Split out InterActiveAuthDialog
Into a component that does Interactive Auth and a dialog that
wraps it, so we can do interactive auth not necessarily in a
dialog.

As a side effect:
 * Put the buttons for each auth stage in the stage itself.
   Some stages don't have submit buttons (and it's very possible
   other stages may have other buttons entirely, like 'resend')
   so it makes more sense for the buttons to live in the stage
   components themselves. Plus it saves the slightly evil
   calling-functions-on-react-children thing we were doing (and
   indeed extending that to show the submit button at all).
 * Give all BaseDialogs a cross in the top right to cancel. They
   were all dismissable by clicking outside or pressing esc, so
   this adds a more visually obvious way of dismissing them. Plus,
   it means our InteractiveAuthDialog can have a way of canceling
   the whole operation separate from buttons for the individual
   stages.
2017-02-13 16:03:21 +00:00
Richard van der Hoff
484d9d708e Logging to try to track down riot-web#3148
Since I can't figure out how this is happening, add a shedload of logging to
try to pin it down.
2017-02-06 16:01:25 +00:00
Richard van der Hoff
e018eef9fa UnknownDeviceDialog.js: tweak warning 2017-02-03 10:50:03 +00:00
Matthew Hodgson
5de84f845a tweak verbiage 2017-02-03 01:49:05 +00:00
Matthew Hodgson
be41462f3a merge 2017-02-02 22:05:44 +00:00
Matthew Hodgson
5d5125df15 fix copyright & always show gemini 2017-02-02 18:02:07 +00:00
Matthew Hodgson
5e5b7f89f4 support scrollable content for UnknownDeviceDialog 2017-02-02 00:25:49 +00:00
Matthew Hodgson
c09d173415 Merge branch 'develop' into matthew/warn-unknown-devices 2017-02-01 22:34:55 +00:00
David Baker
f5458d34aa Fix inviting import fail 2017-01-27 21:57:34 +00:00
Richard van der Hoff
2c7b3d9a02 UnknownDeviceDialog: Reword the warning 2017-01-26 14:55:58 +00:00
Richard van der Hoff
0a3d9fc17f Fix lint 2017-01-26 14:12:00 +00:00
Richard van der Hoff
67bd2cf9dd Merge branch 'matthew/warn-unknown-devices' into matthew/blacklist-unverified 2017-01-26 14:09:25 +00:00
David Baker
c42b705497 Use a cancel function
rather than checking queryList each time
2017-01-26 10:54:07 +00:00
David Baker
23a25e550d Missed a function 2017-01-26 10:09:33 +00:00
David Baker
bf66f77acb Set state in _lookupThreepid 2017-01-26 10:08:44 +00:00
Richard van der Hoff
60d7575146 Merge branch 'matthew/warn-unknown-devices' of github.com:matrix-org/matrix-react-sdk into matthew/warn-unknown-devices 2017-01-25 23:17:57 +00:00
Matthew Hodgson
ebf6ba8994 explicitly set device known-ness 2017-01-25 23:52:56 +01:00
Richard van der Hoff
5da6ca8fc1 Refactor UnknownDeviceDialog
hopefully make this a bit more readable, and use our new BaseDialog.
2017-01-25 22:23:21 +00:00
David Baker
e1e87807b5 Look up email addresses in ChatInviteDialog
So email addresses known to the IS get a display name & avatar
2017-01-25 18:51:28 +00:00
Richard van der Hoff
a2dd1fa0a9 Merge branch 'develop' into matthew/warn-unknown-devices 2017-01-25 16:44:03 +00:00
David Baker
a3b938427d Merge pull request #625 from matrix-org/dbkr/user_search_feedback
Better feedback in invite dialog
2017-01-25 15:59:47 +00:00
David Baker
ced1c45a34 Doc state in getinitialstate 2017-01-25 15:23:50 +00:00
David Baker
e9804086ca Point to InviteAddressType 2017-01-25 15:03:01 +00:00
Richard van der Hoff
adf8f50f6e Merge remote-tracking branch 'origin/develop' into rav/base_dialog 2017-01-25 15:01:11 +00:00
David Baker
9020a7515c Correctly bail out on unknown address 2017-01-25 14:50:00 +00:00
David Baker
e567162d28 Merge pull request #648 from matrix-org/rav/fix_set_displayname
Fix SetDisplayNameDialog
2017-01-25 14:32:52 +00:00
David Baker
fc9987a827 Merge pull request #646 from matrix-org/matthew/password-reset-warning
Warn users of E2E key loss when changing/resetting passwords or logging out
2017-01-25 11:04:35 +00:00
Richard van der Hoff
29b4dde878 Fix SetDisplayNameDialog
SetDisplayNameDialog got broken by the changes to support asynchronous loading
of dialogs.

Rather than poking into its internals via a ref, make it return its result via
onFinished.

Fixes https://github.com/vector-im/riot-web/issues/3047
2017-01-25 08:01:45 +00:00
Richard van der Hoff
770820e6fa Fix a bunch of lint complaints 2017-01-24 22:41:52 +00:00
Matthew Hodgson
6e55bb4956 actually, move signout warning to UserSettings.js
also, kill off the inexplicably useless LogoutPrompt in favour of a normal QuestionDialog.
This in turn fixes https://github.com/vector-im/riot-web/issues/2152
2017-01-24 23:15:00 +01:00
Richard van der Hoff
79e1108564 Merge branch 'develop' into rav/base_dialog 2017-01-24 21:03:08 +00:00
Richard van der Hoff
6dd46d532a Merge remote-tracking branch 'origin/develop' into rav/hotkey-ux 2017-01-24 20:47:24 +00:00
David Baker
6c263c1c89 Change what AddressTile takes to be Objects
Rather than just passing in a list of strings. This paves the way
for passing in display names & avatars of looked-up threepids.
2017-01-24 18:23:34 +00:00
Richard van der Hoff
56cf7a6af7 Create a common BaseDialog
I'm fed up with copying the boilerplate for modal dialogs the whole time.
2017-01-24 18:18:54 +00:00
David Baker
f1f6fc809c Merge remote-tracking branch 'origin/develop' into dbkr/user_search_feedback 2017-01-24 11:26:09 +00:00
David Baker
506d37bbad Merge remote-tracking branch 'origin/develop' into dbkr/add_searching_known_users 2017-01-23 11:34:44 +00:00
David Baker
f64a4e0ecb Merge pull request #623 from matrix-org/dbkr/user_search_word_boundary
Make user search do a bit better on word boundary
2017-01-23 11:31:26 +00:00
Matthew Hodgson
7bc3fc8696 make UnknownDeviceDialog work again, other than the mess of vector-im/vector-web#3020 2017-01-22 01:28:43 +01:00
Matthew Hodgson
532f4e59c9 literally blindly add verification buttons 2017-01-21 19:06:15 +01:00
Matthew Hodgson
071e364be2 improve the verify warning if blacklisting is unabled 2017-01-21 17:56:48 +00:00
Matthew Hodgson
3071fc0ddc UI for blacklisting unverified devices per-room & globally
(written blind; untested as yet)
2017-01-21 17:39:39 +00:00
Matthew Hodgson
2e15e8f9b4 very barebones support for warning users when rooms contain unknown devices 2017-01-21 05:13:36 +00:00
David Baker
18d4d3392a Fix a bunch of linting errors
eslint --fix and a few manual ones
2017-01-20 14:22:27 +00:00
Richard van der Hoff
2d060c8d2e Fix error display in account deactivate dialog 2017-01-20 11:04:47 +00:00
David Baker
afa384c4f3 Use null instead of false 2017-01-19 18:13:27 +00:00
David Baker
a2ff1cd8e6 Factor out adding the input field to the list 2017-01-19 17:03:16 +00:00
David Baker
ee1f6c772e Remove duplicate case handled above
And fix typo where it was handled
2017-01-19 16:50:09 +00:00
David Baker
2a08abaa95 Keep old behaviour of submitting on enter
if input is empty
2017-01-19 16:35:40 +00:00
David Baker
d8bcc1f067 Merge remote-tracking branch 'origin/develop' into dbkr/sanitize_chatinvitedialog 2017-01-19 16:26:59 +00:00
David Baker
b58a67f6b1 Add more punctuation. Also s/let/const/ 2017-01-19 10:51:43 +00:00
David Baker
242f5e0301 PR feedback
* Doc & properly indent escapeRegExp
 * Add close bracket to the list of punctuation chars we search after
2017-01-19 10:24:21 +00:00
David Baker
7b7728c93a Make behaviour of ChatInviteDialog more consistent
* Pressing enter now always adds whatever was in the input box
   to the invite list, if it's a valid address (previously it
   added it to the list of it was a search result but submitted
   the form straight away if there were no results).
 * Remove isValidAddress as it was only used in the context of
   testing whether its return value was true or null (where null
   meant "unsure") so just use getAddressType instead.
2017-01-18 18:32:38 +00:00
David Baker
f105ec2794 Attempt to sanitize ChatInviteDialog a bit
* Use binds rather than onFoo functions which aren't actually
   handler functions themselves but return them
 * Rename onKeyUp to moveSelectionDown etc,, reserving onKeyUp
   for "a key has been released" rather than, "the up arrow key
   has been pressed"
2017-01-18 17:51:39 +00:00
David Baker
de621902fc Better feedback in invite dialog
Show feedback if you enter a valid but unknown email address
or mxid

Fixes https://github.com/vector-im/riot-web/issues/2933
2017-01-18 15:21:50 +00:00
David Baker
a87e7d6617 Make user search do a bit better on word boundary 2017-01-17 18:17:51 +00:00
David Baker
0b67fd5b4e Add 'searching known users' to the user picker
So it's more obvious it's only finding people you've already seen

Fixes https://github.com/vector-im/riot-web/issues/2931
2017-01-17 14:48:50 +00:00
Richard van der Hoff
ac22803ba0 Allow Modal to be used with async-loaded components
Add Modal.createDialogAsync, which can be used to display asynchronously-loaded
React components. Also make EncryptedEventDialog use it as a handy
demonstration.
2017-01-16 17:18:38 +00:00
Jani Mustonen
959163f2ef Proper accessible buttons 2017-01-13 19:36:41 +02:00
Jani Mustonen
8d79716421 Turned the links to buttons to comply with MDN's recommendations 2017-01-13 19:36:40 +02:00
Jani Mustonen
ad072cc179 Turned buttons from divs to links. Makes it possible for screen readers and hotkeys to recognize the buttons. 2017-01-13 19:36:40 +02:00
Matthew Hodgson
cc8b3d4ba4 spell out email invites better 2017-01-12 13:46:19 +00:00
Richard van der Hoff
c7fb83ed2d s/block/blacklist for e2e
Fixes https://github.com/vector-im/vector-web/issues/2315
2016-11-29 18:48:43 +00:00
Richard van der Hoff
1a81397d31 InteractiveAuthDialog
A dialog which will take the user through an interactive-auth process
2016-10-12 08:23:28 +01:00
Richard van der Hoff
2f7b4f74fd Move the device verification buttons to their own class
Instead of pulling in the whole of MemberDeviceInfo into EncryptedEventDialog
for utterly no reason and breaking everything
2016-09-22 19:24:09 +01:00
Richard van der Hoff
2842506b27 EncryptedEventDialog updates
* Separate info on the event from info on the device, and add a couple of new
   fields.

 * Use MatrixClient.getEventSenderDeviceInfo (requires
   https://github.com/matrix-org/matrix-js-sdk/pull/214)

 * Don't force a download of the device keys every time we open the dialog

 * Fix a react warning if the device query takes a while
2016-09-21 10:36:23 +01:00
Matthew Hodgson
6e57faecb0 trim whitespace when adding to list 2016-09-17 16:14:02 +01:00
Matthew Hodgson
da85df9d1a let comma trigger autocomplete. hook up backspace. search displaynames that include space 2016-09-17 15:21:08 +01:00
Matthew Hodgson
671eacaac7 fix self/this crash, and don't let guests invite 2016-09-17 02:05:27 +01:00
Matthew Hodgson
8519756c8c add dialog keyboard shortcuts. 2016-09-16 02:26:17 +01:00
Matthew Hodgson
eeb01563f8 add dialog keyboard shortcuts. download keys on demand 2016-09-16 02:26:09 +01:00
Matthew Hodgson
b98c2ae25e update crypto state of the room in realtime when turned on 2016-09-15 19:25:53 +01:00
Matthew Hodgson
2bd408983d Merge pull request #475 from matrix-org/wmwragg/remove-old-filter
Wmwragg/remove old filter
2016-09-15 15:01:19 +01:00
wmwragg
54a65f8bd7 Corrected onKeyUp misstype and return can now be used instead of clicking the button 2016-09-15 12:17:32 +01:00
wmwragg
27456d0e20 Removed no longer used MultiInviteDialog, as it's now been replaced with the ChatInviteDialog 2016-09-15 11:46:06 +01:00
Matthew Hodgson
ce655c7f50 improve device info 2016-09-15 02:44:55 +01:00
Matthew Hodgson
1a126fee54 Merge pull request #473 from matrix-org/wmwragg/multi-invite-bugfix
Wmwragg/multi invite bugfix
2016-09-14 22:06:28 +01:00
Matthew Hodgson
acd999be45 better describe keys 2016-09-14 18:23:14 +01:00
wmwragg
a06896f96c Added the room name to the error message 2016-09-14 16:28:44 +01:00
wmwragg
435570a022 Better error reporting for failed multi invites 2016-09-14 16:19:09 +01:00
wmwragg
75c9f707e0 Don't show current user in queryList 2016-09-14 15:35:04 +01:00
wmwragg
d3a709f98e Missed a _isDmChat call when refactoring 2016-09-14 15:19:57 +01:00
wmwragg
c3566e0b49 _isDmChat needs to check the passed in addrs rather than the state.inviteList as they may now differ 2016-09-14 15:17:29 +01:00
wmwragg
a7a81c8a32 A manual address doesn't have to be converted to an address tile before it can be used if it is the still in the input field when the start/invite button is pressed 2016-09-14 15:09:23 +01:00
wmwragg
2a8518b72b Tab can now be used for selection of address from list, as well as adding a manual mxid or email address 2016-09-14 14:53:13 +01:00
wmwragg
7fa102998c Added valid but unknown mx user 2016-09-13 17:09:40 +01:00
wmwragg
890100a5bc Silly mistake fixed, spotted by Dave (cheers) 2016-09-13 16:28:35 +01:00
wmwragg
272dd82b9d Added multi invite functionality 2016-09-13 16:06:04 +01:00
wmwragg
538b68a6b2 Updated with the new createRoom DM stuff 2016-09-13 12:47:31 +01:00
wmwragg
524eeaa315 Merge up from develop 2016-09-13 12:37:52 +01:00
wmwragg
cba76d651a Moved the isValidAddress method to the Invite utilty object 2016-09-13 12:12:33 +01:00
wmwragg
0b267763e2 Small refactor to handle Direct Message chat as well as multi invite chat 2016-09-13 12:07:49 +01:00
wmwragg
ca2ba55288 Added error checking, and UI 2016-09-13 11:02:59 +01:00
wmwragg
a7ea193189 A supplied roomId property, will make the dialog use that room for the invites, rather than creating a new one 2016-09-13 10:29:17 +01:00
Matthew Hodgson
ce40fa1a8f add missing dialog 2016-09-12 23:43:00 +01:00
Matthew Hodgson
9b7ab46a72 dedicated dialog box for E2E messages 2016-09-12 23:42:24 +01:00
David Baker
e49547eb3e Merge pull request #461 from matrix-org/dbkr/dont_reuse_parted_rooms
Don't re-use parted rooms for DMs
2016-09-12 18:30:55 +01:00
wmwragg
0f720dd6b8 Oops, toLowerCase call in wrong place 2016-09-12 17:41:32 +01:00
wmwragg
96299e864a Need cto push the actual userId not the toLowerCase version, as userId's are case sensitive 2016-09-12 17:38:32 +01:00
wmwragg
44b8c29c84 Allow addresses to be added as text when space or comma are pressed 2016-09-12 17:06:43 +01:00
wmwragg
5b2cc555a3 Refactored AddressTile to use string address rather than user object, so it can user email as well mx userId 2016-09-12 16:52:04 +01:00
David Baker
6ffa7c23cd Don't re-use parted rooms for DMs 2016-09-12 16:05:51 +01:00
wmwragg
e28a3f10a0 Don't allow someone who is already on the invite list to appear in the AddressSelector 2016-09-12 15:48:32 +01:00
wmwragg
4836025a1d First pass at adding multiple addresses, can only add from AddressSelector at the moment 2016-09-12 15:21:17 +01:00
wmwragg
5acdb8233b The dismiss function now correctly deletes the dismissed element. Also the query render, will now render all invitees 2016-09-12 15:04:32 +01:00
wmwragg
d538377b82 Added an inviteList state to hold all the users to invite, but currently pretend it only has one users (the first one) 2016-09-12 14:48:00 +01:00
wmwragg
28dcbb2a78 Refactored the queryList into seperate AddressSelector component 2016-09-12 13:00:44 +01:00
David Baker
96fabe09d2 Update createRoom to support creating DM rooms
* Make ChatInviteDialog and MemberInfo createRoom use it
* Fix bug in setDMRoom
2016-09-09 19:25:00 +01:00
wmwragg
d1974a75fd Only Direct Message rooms, that aren't parted or forgotten are used 2016-09-08 13:09:54 +01:00
wmwragg
d0523cae70 If a Direct Message room already exists for the users specified, then just go to that room, rather than creating another one 2016-09-08 11:45:09 +01:00
wmwragg
ca3910f5a8 Mouse actions on the queryList added, as well as better queryListElement styling 2016-09-07 16:18:50 +01:00
wmwragg
dd186dd612 Fixed wrong type to justified prop 2016-09-07 10:59:06 +01:00
wmwragg
7e60012bd4 Added justification for the AddressTile, when requested 2016-09-07 10:55:44 +01:00
wmwragg
45256f5d58 Validation checks added 2016-09-06 17:46:00 +01:00
wmwragg
52f050b5f9 Better scrolling UX, and fixed bug which created a room when no address supplied 2016-09-06 17:20:37 +01:00
wmwragg
c03f145f04 Basic keyboard scrolling of queryList 2016-09-06 17:00:28 +01:00
wmwragg
91b1c1f0fc Initial highlighting selected address - styling not final 2016-09-06 16:39:50 +01:00
wmwragg
d1398b137a Circumventing autofill by using a textarea rather than an input type=text 2016-09-06 16:15:48 +01:00
wmwragg
0f73c4326e Added scrolling to queryList 2016-09-06 15:46:58 +01:00
wmwragg
391fe0ab77 Basic address list created, and UX tweaks for interaction 2016-09-06 15:24:23 +01:00