Commit Graph

2533 Commits (3b9a1121369e48630af8a1879af5991a8cdee180)

Author SHA1 Message Date
David Baker a87e7d6617 Make user search do a bit better on word boundary 2017-01-17 18:17:51 +00:00
Johannes Löthberg 893a5c971f Fix escaping markdown by rendering plaintext
We still need to parse "plaintext" messages through the markdown
renderer so that escappes are rendered properly.

Fixes vector-im/riot-web#2870.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2017-01-17 16:23:58 +01: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
Matthew Hodgson a18d94099e switch to using <span/> for edit button 2017-01-17 14:11:15 +00:00
Matthew Hodgson 203172c886 typos 2017-01-17 14:11:01 +00:00
Kegsay fcb1d7a664 Merge pull request #575 from kyrias/commonmark
Replace marked with commonmark
2017-01-17 11:57:08 +00:00
Kegan Dougal 4f860b4c6d Review comments: If-statement style 2017-01-17 10:50:44 +00:00
Richard van der Hoff 09ce74cc76 Fix a couple of minor review comments 2017-01-16 18:44:46 +00:00
Kegan Dougal f168f9cd06 Fix vector-im/riot-web#2833 : Fail nicely when people try to register numeric user IDs 2017-01-16 17:25:44 +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
Richard van der Hoff d63f7e8359 Expose megolm import/export via the devtools 2017-01-14 01:34:34 +00:00
Richard van der Hoff f8e56778ea Encryption and decryption for megolm backups 2017-01-14 01:34:34 +00:00
Richard van der Hoff 1d5d44d63d TextEncoder polyfill
Apparently Safari doesn't sport a TextEncoder, so here's a polyfill for it.
2017-01-14 00:45:51 +00:00
Kegan Dougal dcd0acb2b5 Review comments 2017-01-13 15:17:34 +00:00
Kegan Dougal e196cfaf91 Show the error dialog when requests to PUT power levels fail
This is why I dislike Q.
2017-01-13 14:51:01 +00:00
Matthew Hodgson cc8b3d4ba4 spell out email invites better 2017-01-12 13:46:19 +00:00
David Baker 1f96467145 Merge pull request #609 from matrix-org/luke/fix-join-part-collapsing-redacted-joins
Fix redacted member events being visible
2017-01-11 17:10:35 +00:00
Luke Barnard baaf827c48 Use `getStateKey` instead of `getSender`
This makes sure that the kickee is not the user used for the MemberEventListSummary
2017-01-11 17:03:14 +00:00
Luke Barnard 6e2a75bbee Fix redacted member events being visible
This was due to the `MemberEventListSummary` not ignoring redacted joins/leaves. This was also causing bug #2765.
2017-01-11 11:27:07 +00:00
David Baker 37d9108ceb Add error popup if screen sharing fails 2017-01-11 10:06:48 +00:00
David Baker a16aae1124 Move screen sharing error check into platform
Because on the browser it depends on HTTPS, on electron it doesn't
matter.
2017-01-10 18:37:57 +00:00
David Baker 13a5337e0f Fix 'create account' link in 'forgot password'
Fixes https://github.com/vector-im/riot-web/issues/2853
2017-01-10 15:16:39 +00:00
Richard van der Hoff 42de77e588 Remove "Cannot re-join empty room" error
This is a lying error message. burn it with fire
2016-12-27 19:17:48 +00:00
Matthew Hodgson 9c4671568d fix disasterous thinko in 69b277b282 2016-12-24 22:33:04 +00:00
Matthew Hodgson e2e3bc0637 improve captcha warning 2016-12-24 18:40:20 +00:00
Matthew Hodgson 69b277b282 ask electron users to do captchas in a web browser.
This will happen anyway when they follow email verification links.
make captchas poll for success so if they are completed elsewhere, electron moves on
2016-12-24 03:15:30 +00:00
Matthew Hodgson b1c4c759f4 blind fix for captcha on electron 2016-12-23 14:35:40 +00:00
Luke Barnard 2a63017372 Account for timezone in date separator calculation (#595)
* Account for timezone in date separator calculation

Decide on date separators using MatrixEvent.getDate(). This requires matrix-org/matrix-js-sdk#311
2016-12-22 17:54:30 +00:00
David Baker fd44d9f4d6 Merge pull request #597 from matrix-org/dbkr/delete_threepid
Add support for deleting threepids
2016-12-22 15:31:34 +00:00
David Baker 8a3f2d9e91 Merge pull request #598 from matrix-org/dbkr/display_msisdn_threepid
Display msisdn threepids as 'Phone'
2016-12-22 15:28:09 +00:00
David Baker a6fdbda011 Get variable name right 2016-12-22 15:26:08 +00:00
David Baker 98b22460ec They're not all emails anymore 2016-12-22 15:03:24 +00:00
Daniel Dent 7c841a86ef Unbranded error messages 2016-12-21 14:28:01 -08:00
David Baker 3dfffa385e Display msisdn threepids as 'Phone'
rather than pretending only email exists
2016-12-21 18:56:50 +00:00
David Baker 5e10ec4ece Add support for deleting threepids 2016-12-21 18:49:38 +00:00
Richard van der Hoff 4804fb3a1c Revert "Fix performance issues with wantsDateSeperator"
This change broke timezone handling, so that date-separators are shown at the
wrong time of day.

This reverts commit b908e7ef29.
2016-12-21 09:48:41 +00:00
Luke Barnard 2658cd09b5 Fix scroll jumping when a video is decrypted
Call the `onWidgetLoad` prop on MVideoBody to notify the scroll panel to keep it's position when the size of the video widget updates.
2016-12-20 12:33:07 +00:00
Matthew Hodgson d0d056e308 hide read markers 2016-12-20 02:26:23 +00:00
David Baker 4be14080e1 Fix cancel button on uploads 2016-12-16 17:12:04 +00:00
Richard van der Hoff b8c0fa507e Merge pull request #590 from matrix-org/luke/fix-membereventlistsummary-performance
Improve the performance of MemberEventListSummary
2016-12-16 10:53:51 +00:00
Luke Barnard 7475056bb4 MELS component should update if there are fewEvents, effectively expanding the summary 2016-12-15 18:33:13 +00:00
Luke Barnard 6b52b247e7 Update comment on MELS key 2016-12-15 18:26:41 +00:00
Luke Barnard 88aeb6417e Use the first member event ID or "initial" in the MELS key 2016-12-15 18:23:54 +00:00
Kegsay 71132c4610 Merge pull request #592 from matrix-org/kegan/bulk-reject-invites
Implement bulk invite rejections
2016-12-15 16:16:55 +00:00
Kegan Dougal ec41fc284a Null guard on componentWillUnmount 2016-12-15 16:13:09 +00:00
Luke Barnard 55f85befc1 Allow component to update if currently expanded or if about to collapse 2016-12-15 14:43:59 +00:00
Kegan Dougal 8a511ed54b Add .done() to catch exceptions which may be thrown in setState 2016-12-15 14:17:29 +00:00
Luke Barnard e7564f4dc5 Spelling 2016-12-15 13:16:36 +00:00
Luke Barnard 86739e7d1e Simplify handling of only one member event 2016-12-15 13:15:00 +00:00
Kegan Dougal 8f42134d9f Explain why binding 2016-12-14 16:04:20 +00:00
Luke Barnard b908e7ef29 Fix performance issues with wantsDateSeperator
This was causing rendering of MemberEventListSummary to be quite slow. Instead of creating two date objects, just check to see if they represent timestamps that happened on different days.
2016-12-14 16:01:32 +00:00
Kegan Dougal 13dfe9ef0f Implement bulk invite rejects 2016-12-14 16:00:50 +00:00
Luke Barnard c07e5d4992 Improve the performance of MemberEventListSummary
- The MessagePanel now uses the same key for the MELS instances rendered so that entirely new instances are not created, they are simply passed new props (namely when new events arrive).
- MELS itself now uses `shouldComponentUpdate` so that it only updates if it is given a different number of events to previous or if it is toggled to expand.
2016-12-14 15:31:35 +00:00
Kegan Dougal 1d4591ce68 Add UI in UserSettings for bulk rejecting invites 2016-12-14 15:01:50 +00:00
Kegsay 21e7b03e53 Merge pull request #586 from matrix-org/kegan/read-receipt-show-time-on-hover
Add read receipt times to the hovertip of read markers
2016-12-09 13:19:44 +00:00
Kegan Dougal 5d99d68a64 Show the full date and time if the receipt was sent days after the event 2016-12-09 11:43:23 +00:00
Kegan Dougal 49010c3e93 Refactor how 'readReceipts' are passed into EventTiles
Instead of passing a list of RoomMembers, pass a list of records with a
`roomMember` prop and a `ts` prop so we can display the timestamp on hover.
2016-12-09 11:24:10 +00:00
David Baker 8d1095bc26 Don't throw exception on stop if no DMRoomMap
Prevents an exception when running the riot 'loading' tests in
isolation
2016-12-09 10:32:56 +00:00
Kegan Dougal bd7553d1ea Add read receipt times to the hovertip of read markers
Fixes #2709. Surprisingly, this data was never passed down to
ReadReceiptMarker.
2016-12-08 16:23:20 +00:00
Richard van der Hoff 587325b36c Merge pull request #585 from matrix-org/dbkr/fix_exception_roomdir
Fix exception when clearing room dir search
2016-12-06 15:58:07 +00:00
David Baker fe0dc85d66 Merge pull request #583 from matrix-org/luke/fix-post-message-api-origin-check
Allow integration UI URLs with paths
2016-12-06 15:00:26 +00:00
David Baker 9e3c94edf4 Fix exception when clearing room dir search
Needed more isMounted checks after promises return.
2016-12-06 14:59:10 +00:00
Richard van der Hoff b3f642e835 Merge pull request #584 from matrix-org/dbkr/search_box_field_name
Give the search box field a name
2016-12-06 14:48:25 +00:00
David Baker a3ab59832e Give the search box field a name
Should fix https://github.com/vector-im/riot-web/issues/2462
2016-12-06 14:40:09 +00:00
Luke Barnard ef1cb9530f Allow integration UI URLs with paths
The postMessage API assumed that event origins contained paths of their window origins, but they do not (https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage). This changes the origin check such that the integrations UI URL must start with the event origin.
2016-12-06 14:30:21 +00:00
David Baker 28e663dd48 Pass the room object into displayNotification
It needs it to do the view_room if the notification is clicked.
2016-12-06 13:27:36 +00:00
David Baker 6777e07a41 Remove device name from crypto section
As it was getting it by assuming our device was the first one,
which is just not a valid assumption.
2016-12-05 20:03:43 +00:00
David Baker 8ffe14881e Don't throw an exception entering settings page
if end to end encryption is disabled (eg. if you're a guest and
the server is too old to support e2e for guests).
2016-12-05 18:33:38 +00:00
Johannes Löthberg f321c6c346 Strip (IRC) when clicking on username
Fixes vector-im/riot-web#2072.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2016-12-03 01:20:50 +01:00
Mark Haines 81e429eb14 Fix e2e attachment download by using iframes. (#562)
* Render attachments inside iframes.

* Fix up the image and video views

* Fix m.audio

* Comments, and only use the cross domain renderer if the attachment is encrypted

* Fix whitespace

* Don't decrypt file attachments immediately

* Use https://usercontent.riot.im/v1.html by default

* typos

* Put the config in the React context.

Use it in MFileBody to configure the cross origin renderer URL.

* Call it appConfig in the context

* Return the promises so they don't get dropped
2016-12-02 14:21:07 +00:00
Luke Barnard 5665a0ef37 Fix scroll jump on image decryption
`onWidgetLoad` is now being called when an image has been decrypted so that the ScrollPanel maintains its scroll position (whether it's stuckAtBottom or not). This attempts to fix https://github.com/vector-im/riot-web/issues/2624
2016-12-02 11:11:35 +00:00
Kegan Dougal 5d03543f85 Make cut operations update the tab complete list 2016-11-30 10:49:40 +00:00
Johannes Löthberg 5f160d2e7f Markdown: Use .call instead of .bind
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2016-11-30 01:03:05 +01:00
Johannes Löthberg 4d2926485b Replace marked with commonmark
Marked has some annoying bugs, and the author is inactive, so replace it
with commonmark.js, which is the reference JavaScript implementation of
CommonMark.  CommonMark is also preferable since it has a specification,
and a conformance test suite to make sure that parsers are correct.

Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
2016-11-29 23:14:04 +01: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
David Baker 21d65d2ad1 Fix the download icon on attachments 2016-11-25 23:19:20 +00:00
David Baker 8547d00f32 Don't default the page_type to room directory
As it breaks the behaviour of redirecting to /#/directory
2016-11-24 16:39:48 +00:00
David Baker 2aba646acd Clear room alias etc. on logout 2016-11-24 14:58:37 +00:00
David Baker 0069393650 Go back to same room after logging in 2016-11-24 13:28:51 +00:00
David Baker 0bc4659fe0 Fix crash on logging in
If you arrived at the page via a link to a room.

Fixes https://github.com/vector-im/vector-web/issues/2634
2016-11-24 12:33:31 +00:00
Richard van der Hoff 6e6bcf8b78 Reinstate missing sections from the UserSettings
The 'devices' and 'cryptography' sections got removed from UserSettings by #566.
2016-11-23 11:08:21 +00:00
Luke Barnard 42fc7b1b66 Use UNFILL_REQUEST_DEBOUNCE_MS constant, reset unfillDebouncer timeout reference. 2016-11-22 17:23:06 +00:00
Luke Barnard d1a5d94916 Make the unpagination process less aggressive
This increases `UNPAGINATION_PADDING` (see the ASCII on ScrollPanel.js, `_getExcessHeight`), and also debounces unfilling requests made for 200ms. This forces unfilling requests not to be sent unless the next 200ms has no scrolling, effectively.
2016-11-22 16:47:56 +00:00
Richard van der Hoff 06f12b91b8 Merge pull request #566 from matrix-org/rav/remove_dead_labs_settings
Get rid of always-on labs settings
2016-11-21 10:38:06 +00:00
Richard van der Hoff 4476b09ce7 Get rid of always-on labs settings
If the setting is on by default, it's not much use as a Labs setting. The E2e
setting was only confusing everyone anyway.
2016-11-21 10:25:48 +00:00
Richard van der Hoff 03988015aa Fix 'Quote' for e2e messages
Fixes https://github.com/vector-im/vector-web/issues/2612
2016-11-21 09:19:40 +00:00
Matthew Hodgson 2e691240ae fix e2e disclaimer 2016-11-19 02:44:36 +02:00
Mark Haines 7cb3c0935b Make the spinner smaller, don't decrypt files as eagerly (#564) 2016-11-18 20:08:26 +00:00
Luke Barnard 341175ea58 Fix pagination issue where recent events are lost (#563)
Fix pagination issue where recent events are lost

Scrolling up a few pages followed by scrolling down to the most recent events previously caused some events to go missing. A test has been modified in conjunction with this fix to make sure that this failure mode is tested for in future. This commit should fix the issue, and the most recent events should be paginated back in.
2016-11-18 11:15:14 +00:00
Richard van der Hoff f3582edb99 Merge pull request #560 from matrix-org/luke/fix-join-part-collapsing-regressions2
Fix more membership change collapsing bugs
2016-11-16 16:33:18 +00:00
Luke Barnard 7e88f0083d Fix more join-part collapsing regressions
Use the previous content of the first event known for a user in a block of membership changes. This means single events are not special cased.
2016-11-16 16:26:24 +00:00
Luke Barnard 3618b49982 Use new js-sdk public unpaginate 2016-11-16 16:10:23 +00:00
Luke Barnard 324448563a If only one mevent, return than one
Also, the net change of nil is detected as having the first and last events being _different_. The summary should only include those that have their first and last events being the _same_ because that is a net change (within the block of member events).
2016-11-16 16:07:19 +00:00
Luke Barnard beecbc7cd7 Fix join/part collapsing regressions (#553)
* Fix join/part collapsing regressions

* Simplify loop

* Explain e,e

* Explain return null in _renderSummary

* Kill it properly

* Move . to _renderSummary

* Only use the first and last events to decide whether a net change has occured

* Do not sort events by TS before summarising

* fix loop and comment

* remove data-number-events

* Better explanation comment in _renderSummary

* Less tortuous comment
2016-11-16 14:42:30 +00:00
Luke Barnard b718f1542c Fix infinite loop when there are a lot of invisible events (#554)
Instead of using a window of a fixed number of events, unpaginate based on the distance of the viewport from the end of the scroll range.

The ScrollPanel uses the scrollTokens to convey to its parent (the TimelinePanel, in this case) the point to unpaginate up to. The TimelinePanel then takes a chunk of events off the front or back of `this.state.events` using `timelineWindow.unpaginate`.

Fixes https://github.com/vector-im/vector-web/issues/2020
2016-11-16 14:25:52 +00:00
Mark Haines 6ccc825f0d Cache the tinted SVGs for MFileBody as data URLs (#559)
* Use a list of callbacks for things that need tinting.

Rather than gutwrenching the internals of TintableSVG inside the Tinter.

* Share a data: url for the tinted download svg in MFileBody

* Check image exists before tinting

* Add comments

* Use fetch+DomParser rather than XMLHttpRequest

* Remove comment about XMLHttpRequest
2016-11-16 14:16:51 +00:00
David Baker 218ced0276 Merge pull request #557 from matrix-org/rav/show_padlock_on_unencrypted_room
Show an open padlock for unencrypted rooms
2016-11-16 13:03:52 +00:00
Mark Haines 595493e5bb Clean up MFileBody.presentableTextForFile 2016-11-15 15:58:24 +00:00
David Baker bb776c217d Merge pull request #556 from matrix-org/rav/decrypt_after_keys_arrive
Update eventtiles when the events are decrypted
2016-11-15 14:56:21 +00:00
Richard van der Hoff a3d4ed5aee Show an open padlock for unencrypted rooms
Also, add a tooltip, and enlarge the img to 12px wide, because the open padlock
looked silly at 10px and they both look fine at 12px
2016-11-15 12:31:17 +00:00