Commit graph

269 commits

Author SHA1 Message Date
Luke Barnard
f199f3599e Replace NeedToRegisterDialog /w SetMxIdDialog
This uses MatrixChat's `view_set_mxid`
2017-05-15 17:31:26 +01:00
Luke Barnard
5151264f60 Merge branch 'develop' into new-guest-access
Conflicts:
	src/component-index.js
2017-05-11 13:22:30 +01:00
Luke Barnard
6257bfcd87 Add prop type for onDifferentServerClicked 2017-05-10 14:28:48 +01:00
Luke Barnard
ad2ed12980 Redesign mxID chooser, add availability checking
Requires https://github.com/matrix-org/matrix-js-sdk/pull/432 for availability checking.

Changes:
 - Redesign the dialog to look more like https://github.com/vector-im/riot-web/issues/3604#issuecomment-299226875
 - Attempt to fix wrong password being stored by generating one per SetMxIdDialog (there's no issue tracking this for now, I shall open one if it persists)
 - Backwards compatible with servers that don't support register/availability - a spinner will appear the first time a username is checked because server support can only be determined after a request.
 - Rate-limited by a 2s debounce
 - General style improvements
2017-05-10 14:22:17 +01:00
Michael Telatynski
f02e659fb7 Consume key{up,down,pressed} events
so they don't trigger other things bubbling up
until Modal is closed
2017-05-09 11:27:06 +01:00
Michael Telatynski
bd32df4ef6 comment wording 2017-05-07 20:58:30 +01:00
Michael Telatynski
360f1cd250 completely missed the ESC check
I need sleep
2017-05-07 20:57:54 +01:00
Michael Telatynski
78e7272344 Fixes 2 issues with Dialog closing
+ Upload Confirmation dialog would just change focus on ESC and not close
+ Keywords Dialog in UserSettings would also close UserSettings because event bubbled up
2017-05-07 20:43:42 +01:00
Michael Telatynski
18ba5d3e49 fix typo
made in #849
2017-05-03 12:39:24 +01:00
Luke Barnard
4f71f4c331 Store mx_pass at the same point as access_token
So that we don't overwrite the existing one every time we try to register.
2017-05-02 10:07:06 +01:00
Luke Barnard
a887af9f92 copyright 2017-05-02 09:56:14 +01:00
Luke Barnard
8774100508 Initial implementation: SetDisplayName -> SetMxIdDialog
- Replaces SetDisplayNameDialog with SetMxIdDialog. This new dialog will use InteractiveAuth to authenticate a user with their chosen mxid.

De-scoped:
 - style tweaks for the InteractiveAuth in the dialog (capcha) and error message.
 - checking for mxid availability
2017-04-28 13:22:55 +01:00
Luke Barnard
5f0ecc588f Fix dialog reappearing after hitting Enter
Fixes https://github.com/vector-im/riot-web/issues/3714

https://github.com/vector-im/riot-web/issues/3714#issuecomment-297460620 :
> It's as if there are two dialogs and as one closes, the other one appears. For some reason matrix-org/matrix-react-sdk#822 is causing this.
> I've realised it's because the `priorActiveElement` is probably the button that opened the dialog. If this is focused and the enter key is released, this triggers a keyPress which fires once the dialog has closed and the button has been focused 😬 the BaseDialog only calls stopPropagation _onKeyDown.

The soln. was to submit the dialog as finished `onKeyUp`. This means the `priorActiveElement` is focussed after any key events that should be associated with the dialog.
2017-04-26 17:37:52 +01:00
Luke Barnard
5c83d4d2ed Merge pull request #832 from t3chguy/ude_break_out_room
show the room name in the UDE Dialog
2017-04-25 10:04:23 +01:00
Michael Telatynski
e64b647799 show the room name in the UDE Dialog
especially useful when it appears after you switch rooms

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-04-25 09:26:21 +01:00
turt2live
e6fd380947 Change redact -> remove for clarity
Addresses vector-im/riot-web#2814

Non-technical users may not understand what 'redact' means and can more easily understand what 'Remove' does. See discussion on vector-im/riot-web#2814 for more information.

Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-04-24 12:49:09 -06:00
Matthew Hodgson
a2be764681 display err.message to user if available in error msgs 2017-04-23 01:48:27 +01:00
Matthew Hodgson
34c1a8f3cf make autofocus explicit on errordialog as it autoFocus attr seems unreliable 2017-04-22 17:28:48 +01:00
Michael Telatynski
6a657a6555 Remember element that was in focus before rendering dialog
restore focus to that element when we unmount

also remove some whitespace because ESLint is a big bad bully...

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-04-22 05:44:27 +01:00
Matthew Hodgson
90f526bdeb autofocus doesn't seem to work on this button 2017-04-20 00:42:13 +01:00
David Baker
db3339de33 I still can't type 2017-03-27 17:03:59 +01:00
David Baker
9125c1b2cc I can't type 2017-03-27 17:00:05 +01:00
David Baker
a230354dbe Fix bug where you can't invite a valid address
Always show the entered text as an option if it's a valid address,
otherwise there's no way to invite an address that is valid and
also returns other mxids in the search results.

Fixes https://github.com/vector-im/riot-web/issues/3496
2017-03-27 16:40:01 +01:00
Matthew Hodgson
df63c779dd clarify that redact === delete 2017-03-19 02:34:25 +00:00
Keyvan Fatehi
25a4f4e3b6 Add ConfirmRedactDialog component
Signed-off-by: Keyvan Fatehi <keyvanfatehi@gmail.com>
2017-03-18 18:58:28 -07:00
Luke Barnard
b21f016d37 Add "Export E2E keys" option to logout dialog
Fixes https://github.com/vector-im/riot-web/issues/3184
2017-03-16 14:18:18 +00:00
Luke Barnard
ba0715ba7c Fix import for Lifecycle
This fixes https://github.com/vector-im/riot-web/issues/2991 although we might need to give more feedback than just showing the login screen. Maybe a dialog that says "your account has been deactivated".
2017-03-13 14:10:14 +00:00
Matthew Hodgson
925bbb79ad fix kick dialog CSS 2017-03-13 00:47:33 +00:00
Matthew Hodgson
8a0b08e7f6 fix CSS for ChatCreateOrReuseDialog.js 2017-03-13 00:03:33 +00:00
Matthew Hodgson
bf64f387ce name class to match file 2017-03-12 23:50:12 +00:00
Matthew Hodgson
3a849bce60 name class to match file 2017-03-12 23:48:57 +00:00
Matthew Hodgson
3aaf37df1a beautify a tonne more errors 2017-03-12 22:59:41 +00:00
Matthew Hodgson
e5a5b5cd08 oops 2017-03-12 20:13:39 +00:00
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