Commit Graph

3178 Commits

Author SHA1 Message Date
David Baker 5d46efc3e8 Get docs right on hasCancel 2018-04-30 14:17:21 +01:00
David Baker dcaacfd204 Merge remote-tracking branch 'origin/develop' into dbkr/fix_session_restore_fail_dialog_ux 2018-04-30 14:06:32 +01:00
David Baker 873993a7ca Clarify, hopefully 2018-04-27 17:56:33 +01:00
David Baker d3c368e19f typo 2018-04-27 17:53:11 +01:00
David Baker 27b18c457e Lint 2018-04-27 15:56:28 +01:00
David Baker 6d9e07580b UI fixes in SessionRestoreErrorDialog
* Make the 'delete my data' button not the default
 * Make it red
 * Give it a confirmation dialog
 * Remove the 'cancel' button: what does it mean to cancel an error?
   In this case, it tried again and almost certainly got the same error.
 * Remove the top-right 'x' and don't cancel on esc for the same reason.
 * Move 'send bug report' to a button rather than a 'click here' link
 * Add a 'refresh' button which, even if it's no more likely to work,
   will at least look like it's doing something (it's mostly so if you
   don't have a bug report endpoint, there's still a button other
   than the one that deletes all your data).
2018-04-27 12:38:49 +01:00
David Baker 0323f8ed0c Wrap exception handling around all of loadSession
The user might (probably does) have a session even if we haven't actually tried
to load it yet, so wrap the whole loadSession code in the error handler we were
using for restoring sessions so we gracefully handle exceptions that happen
before trying to restore sessions too.

Remove the catch in MatrixChat that sent you to the login screen.  This is
never the right way to handle an error condition: we should only display the
login screen if we successfully determined that the user has no session, or
they explicitly chose to blow their sessions away.
2018-04-27 11:25:13 +01:00
David Baker db1401f484 Pass false to onFinished from BaseDialog
Everywhere else, onFinished takes a boolean indicating whether the
dialog was confirmed on cancelled, and had function that were
expecting this variable and getting undefined.
2018-04-27 11:19:14 +01:00
David Baker f70096b8fa Fix error handling on session restore
Fix a number of failures that meant the excellent error handling
we had for failing to restore a session didn't work.

1. .catch on the promise rather than try/catch: it's async
2. Explicit cancel method in SessionRestoreErrorDialog that invokes
   onFinished with `false` because even with the catch fixed, this
   was getting the event as its first arg which is truthy, so
   clicking cancel still deleted your data.
3. DialogButtons: Don't pass onCancel straight into the button event
   handler as this leaks the MouseEvent through as an argument.
   Nothing is using it and it exacerbates failures like this
   because there are surprise arguments.

Fixes https://github.com/vector-im/riot-web/issues/6616
2018-04-26 17:07:58 +01:00
David Baker 53528f338a Replace document.origin with window.location.origin
document.origin is not a thing on firefox
2018-04-26 10:43:52 +01:00
David Baker e26c3f3dc9 Get variable name right in commented usercontent code 2018-04-26 10:12:50 +01:00
Richard Lewis b2d6dd8f6e Optionally hide widget popout button. 2018-04-25 16:28:27 +01:00
David Baker 81488b27e2 Merge pull request #1851 from matrix-org/rxl881/popoutWidget
Add a button to 'pop out' widgets in to their own tab.
2018-04-25 15:36:07 +01:00
Richard Lewis 0f0e89d394 Add a button to 'pop out' widgets in to their own tab. 2018-04-25 12:49:30 +01:00
David Baker 54040659ec Fix cross-origin renderer code in comment 2018-04-25 11:35:08 +01:00
David Baker 79c3335765 Support origin lock in cross-origin renderer
This adds a URL parameter to the cross-origin renderer that makes
it only accept messages from a given domain. This adds an extra
layer of security to the cross-origin iframe and is backwards
compatible in both directions.
2018-04-24 16:05:14 +01:00
David Baker f5956c87f6 Bind onImageError in constructor
Tt uses `this` but wasn't bound anywhere so the error handler was
just throwing an exception.
2018-04-23 18:14:59 +01:00
Aidan Gauland 6a918861bb Add UI for displaying room avatars full size
Change the onClick action on the RoomAvatar inside RoomHeader so that it brings
up a lightbox with the full-size avatar.
2018-04-21 15:47:31 +12:00
Matthew Hodgson d91c7f5e54 Add comment about enum hijinks 2018-04-17 16:53:11 +01:00
Matthew Hodgson ce809e16d9 fix i18n thinko on createTrackedDialog 2018-04-17 16:51:17 +01:00
Matthew Hodgson 32dd7f976f merge vector-im/riot-web#5881 into matrix-react-sdk 2018-04-16 00:04:04 +01:00
Matthew Hodgson 4da804fd64 Merge branch 'develop' into matthew/fix_layering 2018-04-15 23:59:09 +01:00
Matthew Hodgson cb5ff404e1 fix missing i18n 2018-04-15 23:16:31 +01:00
Matthew Hodgson 610747e76a fix paths and updateCheckStatusEnum 2018-04-13 16:49:59 +01:00
Matthew Hodgson 13765632e9 use new rageshake location 2018-04-13 01:36:41 +01:00
Matthew Hodgson 0336d99b9e move VectorConferenceHandler over and use getUpdateCheckStatusEnum via field rather than export 2018-04-13 01:29:38 +01:00
Matthew Hodgson 40a67ca8fe point imports at the new locations 2018-04-13 00:43:44 +01:00
Matthew Hodgson 8ab8f76254 move non-Riot-specific components over from riot-web 2018-04-11 23:58:04 +01:00
Travis Ralston fe2cbc584d Merge branch 'develop' into travis/remove-presence 2018-04-11 15:17:28 -06:00
Luke Barnard ab578a5c0c Merge pull request #1819 from pvagner/jump_to_first_unread_a11y
TopUnreadMessagesBar a11y
2018-04-11 15:47:43 +01:00
Luke Barnard d877384d64 Merge pull request #593 from matrix-org/luke/fix-render-1-1-avatars-when-others-leave
Use correct 1-1 room avatar after users leave
2018-04-11 11:21:18 +01:00
Luke Barnard edb754b76b Use GeminiScrollbarWrapper in Flair settings of UserSettings 2018-04-10 18:08:19 +01:00
Matthew Hodgson 2d8880ec5f patch NPE on Pill when lazyloading members 2018-04-09 23:02:15 +01:00
Luke Barnard 01dd494f50 Make stickers/messages continuations of each other 2018-04-06 17:47:44 +01:00
Luke Barnard 008572afe1 Revert "Handle non-m.room.message event types."
This reverts commit f8d7ab10fa.
2018-04-06 16:42:59 +01:00
David Baker 28bf76b319 Merge pull request #1824 from matrix-org/luke/fix-wrappedRef-warning
Fix warning "Unknown prop `wrappedRef` on <div> tag..."
2018-04-05 17:49:35 +01:00
Luke Barnard e20f223e78 Fix warning "Unknown prop wrappedRef on <div> tag..."
GeminiScrollbar should not receive wrappedRef as a property,
so remove it using object destructuring.
2018-04-05 17:39:25 +01:00
Richard Lewis a41384a994 Fix function binding. 2018-04-04 23:45:47 +01:00
Richard Lewis da6c2c51fb Remove left and right menu padding 2018-04-04 13:38:48 +01:00
Richard Lewis 06f1c504e7 Merge pull request #1672 from matrix-org/rxl881/snapshot
Bi-directional widget postMessaging API (stickerpacks) [WIP]
2018-04-03 18:37:03 +01:00
Luke Barnard 8ca1243ecb Add null-guard to prevent RoomAvatar NPE when room is null
which may have been occuring when peeking into a room that the
client hasn't got a Room object for.

Fixes https://github.com/vector-im/riot-web/issues/6432
2018-04-03 17:35:34 +01:00
Richard Lewis f8f8bc469e Merge branch 'develop' of https://github.com/matrix-org/matrix-react-sdk into rxl881/snapshot 2018-04-03 11:34:14 +01:00
Richard Lewis b109c9304c Put stickers behind labs flag. 2018-04-02 22:24:46 +01:00
Richard Lewis 8241afe87d Fix content references 2018-04-02 20:25:24 +01:00
Richard Lewis 49bea1a35b Move stickerpicker content out of state in to generator function. 2018-04-02 10:56:45 +01:00
Richard Lewis d83b6f1cf8 Use AccessibleButton. 2018-04-02 10:18:35 +01:00
Peter Vágner 778ebe63ff TopUnreadMessagesBar: turn clickables into accessible buttons and fix
over verbosity for the accessible name.
2018-03-31 17:42:10 +02:00
Richard Lewis 557a45e890 Remove inline styling. 2018-03-29 22:22:57 +01:00
Richard Lewis 9cc3d3c9bb Move default sticker content into generator function. 2018-03-29 21:48:03 +01:00
Richard Lewis 003cf61388 Handle remove sticker picker errors. 2018-03-29 21:16:35 +01:00