Commit graph

1244 commits

Author SHA1 Message Date
David Baker
21d65d2ad1 Fix the download icon on attachments 2016-11-25 23:19:20 +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
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
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
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
David Baker
ec999f6fa1 Merge pull request #552 from matrix-org/rav/event_tile_withmatrixclient
Update EventTile to use WithMatrixClient instead of MatrixClientPeg
2016-11-15 11:25:48 +00:00
Mark Haines
13f28e53e1 Generate thumbnails when sending m.image and m.video messages. (#555)
* Send a thumbnail when sending a m.image

* Use the 'thumbnail_file' when displaying encrypted images

* Whitespace

* Generate thumbnails for m.video

* Fix docstring, remove unused vars, use const

* Don't change the upload promise behaviour

* Polyfill for Canvas.toBlob to support older browsers

* Lowercase for integer types in jsdoc
2016-11-15 11:22:39 +00:00
Richard van der Hoff
b209cc551e Update eventtiles when the events are decrypted
Events are sometimes decrypted after they arrive, so add an eventlistener for
it and update the tile.
2016-11-15 11:12:52 +00:00
Richard van der Hoff
0e8a49ebb7 Update EventTile to use WithMatrixClient instead of MatrixClientPeg 2016-11-14 16:00:24 +00:00
David Baker
1ff3a86457 Merge pull request #548 from matrix-org/markjh/encrypted-attachments
Encrypt attachments in encrypted rooms
2016-11-11 14:49:52 +00:00
Mark Haines
72d24f58d0 Make the promises be q promises 2016-11-11 13:57:45 +00:00
Mark Haines
9edfea3b32 Make imports more consistent, fix m.video 2016-11-11 13:57:45 +00:00
Mark Haines
bf5ecbd016 Review comments
Conflicts:
	src/ContentMessages.js
2016-11-11 13:57:42 +00:00
Mark Haines
734c4eb638 Fix gif hoverover 2016-11-11 13:57:11 +00:00
Mark Haines
de384480c6 Pass the decryptedUrl to the MFileBody so that it doesn't need to decrypt it itself.
Conflicts:
	src/components/views/messages/MImageBody.js
2016-11-11 13:57:08 +00:00
Mark Haines
736ab743ee Make everything use MFileBody for downloads, ensure that encrypted attachments are actually downloaded
Conflicts:
	src/components/views/messages/MImageBody.js
2016-11-11 13:56:30 +00:00
Mark Haines
ee1768f644 Use data:// URI rather than blob: URI to avoid XSS 2016-11-11 13:55:57 +00:00
Mark Haines
b69e88d4e3 Decrypt m.file attachments 2016-11-11 13:55:57 +00:00
Mark Haines
4e01a4f692 Decrypt m.audio attachments 2016-11-11 13:55:57 +00:00
Mark Haines
48340a2817 Fix unencrypted video thumbnail 2016-11-11 13:55:57 +00:00
Mark Haines
b56417f46e Remove spurious TODO 2016-11-11 13:55:57 +00:00
Mark Haines
95e8889857 Decypt m.video events 2016-11-11 13:55:57 +00:00
Mark Haines
a4a0d02848 Move decryptFile into a utility function so that it can be shared between different components
Conflicts:
	src/components/views/messages/MImageBody.js
2016-11-11 13:55:48 +00:00
Luke Barnard
5109833c42 Use correct prop types 2016-11-11 13:55:32 +00:00
Mark Haines
49b3aec1e2 Include the mimetype with the file info. Store the objectURL in state so that it can be used normally by the exising templates
Conflicts:
	src/ContentMessages.js
	src/components/views/messages/MImageBody.js
2016-11-11 13:54:07 +00:00
Mark Haines
23e764604c Merge remote-tracking branch 'origin/master' into develop 2016-11-11 12:00:53 +00:00
Mark Haines
61921327c2 Merge remote-tracking branch 'origin/master' into develop 2016-11-11 12:00:30 +00:00
David Baker
1e163eabf0 Revert "Encrypt attachments in encrypted rooms," 2016-11-11 11:59:08 +00:00
Luke Barnard
d3a548773a Remove redundant lines 2016-11-10 18:01:34 +00:00
Luke Barnard
3d7f6919cf Refactor renderNameList (thanks, @richvdh) 2016-11-10 17:36:22 +00:00
Luke Barnard
0695037f5f pass in prop onClick by default 2016-11-10 17:30:35 +00:00
Luke Barnard
87e8f0e4da trailing commas 2016-11-10 17:27:59 +00:00
Luke Barnard
b11dd9542f Add class to expand link for pointer and colour 2016-11-10 17:09:18 +00:00
Luke Barnard
e05aeb35a1 npm run reskindex 2016-11-10 17:03:24 +00:00
Luke Barnard
ac460122cc revert now redundant TruncatedList edits 2016-11-10 15:51:27 +00:00
Luke Barnard
f71ac93946 Prefer null to falsy, use correct plural 2016-11-10 15:38:20 +00:00
Luke Barnard
1a4df38500 remove href 2016-11-10 15:20:53 +00:00
Luke Barnard
d8bc4d9a6f Factor out avatar click leads to view_user 2016-11-10 15:18:59 +00:00
Luke Barnard
6b2aa43b71 Factor out "and others" 2016-11-10 14:33:41 +00:00
Luke Barnard
d6b74becfc Children are required 2016-11-10 14:12:45 +00:00
Luke Barnard
370f5f0a11 Use _ prefix for private methods 2016-11-10 14:12:05 +00:00
Luke Barnard
8422017827 events are required 2016-11-10 14:09:40 +00:00
Luke Barnard
dcbb31279f Prefer import React, set prevEvent to last MemberhsipChange 2016-11-10 14:08:11 +00:00
Luke Barnard
e2936376b6 Unnecessary props 2016-11-10 13:26:27 +00:00
Luke Barnard
566034cf2b Render children EventTiles before passing to summary element 2016-11-10 13:25:48 +00:00
Luke Barnard
79c01fa1a4 Remove empty lines 2016-11-10 11:03:43 +00:00
Luke Barnard
f5bc8d1fe0 Removed logs, updated phrasing on 'others joined'
Now it's:
 1 user joined and left
 >1 others joined and left
2016-11-10 10:42:33 +00:00
Luke Barnard
5f0b891d47 Add date seperator to the expanded events
netsplits across midnight is not handled, and @richvdh suggested splitting the list in two
2016-11-09 17:44:43 +00:00
Luke Barnard
2f02c4b84e WIP nicer join/part folding 2016-11-09 16:03:35 +00:00
Luke Barnard
cd241a4a17 Truncate consecutive member events
This is needed for the IRC bridge to be able to do full membership list syncing without cluttering the message panel.
2016-11-08 16:34:02 +00:00
Mark Haines
c838164f40 Make the promises be q promises 2016-11-08 16:26:25 +00:00
Mark Haines
93ddb5539e Make imports more consistent, fix m.video 2016-11-08 12:57:24 +00:00
Mark Haines
911f9e4e63 Review comments 2016-11-08 11:42:20 +00:00
Luke Barnard
de83e578e7 Use generic error message 2016-11-08 11:18:44 +00:00
Luke Barnard
c0c662aeaf Show the error that occured when trying to reach scalar
Instead of removing the button and printing an error to console, show the error in a popup that appears next to the `Manage Integrations` button.
2016-11-08 10:57:48 +00:00
David Baker
5c2c01d414 Fix function to consistently return boolean 2016-11-07 11:45:55 +00:00
David Baker
2bb7aec0de Don't do URL previews for matrix.to 2016-11-07 10:57:08 +00:00
Mark Haines
dc679a8eca Fix gif hoverover 2016-11-04 18:41:05 +00:00
Mark Haines
4214c67f8f Pass the decryptedUrl to the MFileBody so that it doesn't need to decrypt it itself. 2016-11-04 18:20:20 +00:00
Mark Haines
1529396ef5 Make everything use MFileBody for downloads, ensure that encrypted attachments are actually downloaded 2016-11-04 18:09:12 +00:00
Mark Haines
8f778f54fd Use data:// URI rather than blob: URI to avoid XSS 2016-11-04 15:39:39 +00:00
Mark Haines
6ea0085290 Decrypt m.file attachments 2016-11-04 14:00:26 +00:00
Mark Haines
94bfe31857 Decrypt m.audio attachments 2016-11-04 13:45:00 +00:00
Mark Haines
91123431dd Fix unencrypted video thumbnail 2016-11-04 13:13:25 +00:00
Mark Haines
71c002d588 Remove spurious TODO 2016-11-04 13:08:17 +00:00
Mark Haines
48cfd4f399 Decypt m.video events 2016-11-04 13:05:34 +00:00
Mark Haines
b6653dd0ed Move decryptFile into a utility function so that it can be shared between different components 2016-11-04 12:46:45 +00:00
Mark Haines
12fc70c671 Include the mimetype with the file info. Store the objectURL in state so that it can be used normally by the exising templates 2016-11-04 11:52:47 +00:00
Richard van der Hoff
ab7007784f Make MemberInfo use the matrixclient from the context
An arbitrary component to demonstrate how this works
2016-11-03 19:05:48 +00:00
Mark Haines
e949d91162 Handle decryption errors 2016-11-03 16:39:20 +00:00
Mark Haines
e0cea74c7e Encrypt attachments in encrypted rooms, decrypt image attachments when displaying them 2016-11-02 16:26:10 +00:00
David Baker
8cf273a460 Run highlight.js asynchronously
Move the very minimal logic of highlightDOM into TextualBody
because then we can avoid scheduling a lot of timeouts which
would ultimately do nothing (ie. any messages that don't have code
blocks).
2016-10-26 18:41:28 +01:00
David Baker
a2eb0a9cf0 Fix CPU spin on joining rooms
Ratelimit roomheader's updates and move some other things into
rate limited functions.
2016-10-26 13:09:53 +01:00
Aviral Dasgupta
022eb575d9 Upgrade to babel6 and enable some presets. 2016-10-17 16:23:25 +01:00
David Baker
3f067cbdf6 Give our input fields names
Otherwise browsers' 'Remember Password' feature has to guess
badly and ends up putting the login username / password in the
first two password reset fields which is a bit odd.
2016-10-14 15:34:44 +01:00
David Baker
920f498925 Merge pull request #517 from matrix-org/rav/interactive_auth_on_device_delete
Interactive auth for device delete
2016-10-12 18:31:38 +01:00
David Baker
ef22ba1f39 Merge pull request #516 from matrix-org/rav/interactive_auth_dialog
InteractiveAuthDialog
2016-10-12 18:27:23 +01: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
5c18a9ccca Interactive auth for device delete 2016-10-12 08:23:08 +01:00
Richard van der Hoff
eb36509620 Refactor CaptchaForm to put less logic in signupstages
A bunch of work being done in the Recaptcha signupstage makes more sense in
the CaptchaForm; let's move it.
2016-10-11 18:57:51 +01:00
Richard van der Hoff
78c3d5943a Fix a load of warnings in the tests
Stub things out to make the tests not throw warnings, so we can see the actual
problems.
2016-10-11 14:20:40 +01:00
David Baker
3756add402 Merge pull request #502 from matrix-org/dbkr/join_3p_location
Move 'show join button' functionality out
2016-10-05 14:00:14 +01:00
Matthew Hodgson
9d303712f2 more s/Vector/Riot/ 2016-10-03 10:18:43 +01:00
Richard van der Hoff
dca19a4940 Merge pull request #506 from matrix-org/dbkr/sign_in_not_log_in
Use 'Sign In' / 'Sign Out' universally
2016-09-30 11:30:00 +01:00
Richard van der Hoff
302074c71f Merge pull request #504 from matrix-org/dbkr/fix_login_if_joined
Prevent error when clicking 'log in'
2016-09-30 11:04:18 +01:00
Matthew Hodgson
ca5204c3f8 fix collapsed tooltip - https://github.com/vector-im/vector-web/issues/2381 2016-09-30 00:17:52 +01:00
David Baker
d5af2d2c52 Use 'Sign In' / 'Sign Out' universally
Rather than a mix of 'sign in/out' and 'log in/out'
2016-09-29 17:38:52 +01:00
David Baker
7b28dde263 Prevent error when clicking 'log in'
If you joined a room before clicking 'log in', it would throw an
exception here and break.
2016-09-29 16:57:10 +01:00
David Baker
60ce49910a Merge pull request #497 from matrix-org/dbkr/richtext_use_markdown_wrapper
Make RTE mode use the new Markdown wrapper class
2016-09-29 15:33:18 +01:00
David Baker
9a633ee449 Move 'show join button' functionality out
And have it as a prop to the directory search box instead, so the
room directory can do more complex logic.
2016-09-29 15:05:15 +01:00
Matthew Hodgson
b366973151 let anyone create aliases - fixes https://github.com/vector-im/vector-web/issues/1585 2016-09-27 23:39:25 +01:00
David Baker
b9576754e6 Nomenclature 2016-09-27 14:50:18 +01:00
Richard van der Hoff
30ce35c3b4 Merge pull request #498 from matrix-org/dbkr/fast_lgm
Bring back the little green men without slowness
2016-09-27 11:28:48 +01:00
David Baker
690309adfc Bring back the little green men without slowness
Introduces a singleton DMRoomMap that subscribes to account data to keep itself up to date so we don't have to keep doing the map inversion for each room tile.
2016-09-26 18:02:14 +01:00
David Baker
2e1644877d Merge pull request #496 from matrix-org/dbkr/directory_search_box
Directory search join button
2016-09-26 15:38:45 +01:00
David Baker
ba090a1198 Trailing .+ was redundant 2016-09-26 15:13:57 +01:00
David Baker
9333f91533 Give react callbacks underscores too 2016-09-26 14:29:12 +01:00
David Baker
2dd0165bfc Correct regex for hash at the start 2016-09-26 14:24:35 +01:00
David Baker
bbfc05b0c0 Fix name of text emote sending & fix tests 2016-09-26 10:20:56 +01:00
Matthew Hodgson
40ba1ff5aa disable LGM badges for DMs temporarily - see https://github.com/vector-im/vector-web/issues/2343 2016-09-24 00:43:46 +01:00
David Baker
bf037ed6c7 Add comment 2016-09-23 19:09:32 +01:00
David Baker
db3f0d298a Make RTE mode use the new Markdown wrapper class
Equivalent of https://github.com/matrix-org/matrix-react-sdk/pull/492 for rich text mode
2016-09-23 18:50:25 +01:00
David Baker
fa193e775a Implement join button appearing
Also switch input to controlled so we re-render when it changes so we can show/hide the join button
2016-09-23 16:34:47 +01:00
David Baker
eb5b175213 Layout to support less hardcoded CSS 2016-09-23 15:58:11 +01:00
David Baker
b1e4c911eb WIP omnipresent join button 2016-09-23 15:25:38 +01:00
David Baker
6281d76ade Merge remote-tracking branch 'origin/develop' into dbkr/directory_search_box 2016-09-23 14:43:13 +01:00
David Baker
d0a15975c8 Merge pull request #492 from matrix-org/dbkr/make_markdown_less_aggressive
Make markdown less aggressive
2016-09-23 14:31:20 +01:00
David Baker
61b48a5b1a Add component for the directory search box 2016-09-23 13:48:24 +01:00
Richard van der Hoff
dd2da20031 Add the deviceId back to memberdeviceinfo
It was removed by @ara4n in 5fa5489, but it's still useful!
2016-09-22 19:28:50 +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
David Baker
de0c92dadf Remove unused code 2016-09-22 18:37:14 +01:00
David Baker
6c7259eec8 Better detection of when input contains markdown 2016-09-22 17:18:12 +01:00
David Baker
898fbcee30 Merge pull request #489 from aviraldg/fix-2128
Force-hide autocomplete after sending message.
2016-09-22 10:49:23 +01:00
David Baker
b83d1db24a Missed some Vectors 2016-09-21 14:03:35 +01:00
David Baker
5fa67d9617 Merge pull request #490 from matrix-org/rav/encrypted_event_dialog
EncryptedEventDialog updates
2016-09-21 10:52:22 +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
Aviral Dasgupta
f171985e4c Fix click-to-complete in RTE
Closes vector-im/vector-web#2179
2016-09-21 07:40:48 +05:30
Aviral Dasgupta
44217422d0 Force-hide autocomplete after sending message.
Fixes vector-im/vector-web#2128
2016-09-21 07:28:07 +05:30
Matthew Hodgson
a2904ad33f fix 'new chat' layout bug 2016-09-20 10:06:57 -04:00
David Baker
c40a7a696e Merge pull request #485 from matrix-org/dbkr/riot
Rebrand
2016-09-19 13:36:55 +01:00
David Baker
31753fc3f3 Rebrand 2016-09-19 13:26:59 +01:00
Matthew Hodgson
b348cf1244 actually apply scalar CSS :( 2016-09-19 07:01:46 -04:00
Matthew Hodgson
7691559e01 more disclaimer 2016-09-17 22:07:43 +01:00
Matthew Hodgson
53bb6b96ce don't warn when disabling crypto 2016-09-17 21:56:10 +01:00
Matthew Hodgson
5fa5489bbd disambiguate devices by ID in memberinfo 2016-09-17 20:12:56 +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
88273e8065 move admin tools to the top 2016-09-17 15:07:41 +01:00
Matthew Hodgson
0046ae50b5 switch to 3-digit formatting for counts 2016-09-17 02:39:19 +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
cfba600961 Merge pull request #482 from aviraldg/fix-2165
Replace <p>s with <br/>s consistently
2016-09-16 22:46:41 +01:00
Matthew Hodgson
08543a66c4 fix race between setting canonical alias and creating aliases 2016-09-16 18:01:14 +01:00
Aviral Dasgupta
6befb09509 Replace <p>s with <br/>s consistently
Also, allow newlines in /commands.
Fixes vector-im/vector-web#2114, vector-im/vector-web#2165.
2016-09-16 21:40:00 +05:30
Matthew Hodgson
e1bd97d509 don't try to set DM data for guests 2016-09-16 16:15:34 +01:00
Matthew Hodgson
b852756332 DM title 2016-09-16 14:35:43 +01:00
Matthew Hodgson
2b9258d377 use new rawDisplayName in AddressTile 2016-09-16 03:19:33 +01:00
Matthew Hodgson
2c7c382d56 stop continuations leaking on filepanel 2016-09-16 02:40:09 +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
77595320a7 close the RoomSettings when you close Scalar 2016-09-15 22:56:12 +01:00
Matthew Hodgson
3fcea1bfc7 only apply verified css to genuinely verified tiles 2016-09-15 22:56:12 +01:00