Commit graph

1499 commits

Author SHA1 Message Date
Luke Barnard
c7229967a6 Goto /home when forgetting the last room 2017-06-09 10:28:45 +01:00
Luke Barnard
a21b6e61a6 Default to home page when settings is closed
If the current room isn't set.
2017-06-09 10:08:26 +01:00
Richard van der Hoff
105c6b2b87 delint MatrixChat
once more. with feeling.
2017-06-09 03:09:03 +01:00
Richard van der Hoff
20bdae6079 delint UserSettings.js 2017-06-09 03:08:57 +01:00
Luke Barnard
ce0977373e Merge pull request #1058 from matrix-org/luke/fix-event-id-state
Control currently viewed event via RoomViewStore
2017-06-08 18:10:29 +01:00
Luke Barnard
5588e115eb Clarify doc for highlighted 2017-06-08 17:57:37 +01:00
Luke Barnard
9892566007 Highlighted means highlighted 2017-06-08 17:54:41 +01:00
Luke Barnard
c02dbd1cdc Rename initial state variables 2017-06-08 17:26:08 +01:00
David Baker
5e55b6a643 PR feedback 2017-06-08 16:23:43 +01:00
David Baker
9def0bb5c2 Oops, fix email check 2017-06-08 16:08:19 +01:00
David Baker
8dc20606c8 Use comma for list of three things 2017-06-08 16:07:29 +01:00
Luke Barnard
000a045e35 Rename RVS state (event -> initialEvent) and redocument 2017-06-08 15:52:21 +01:00
David Baker
d691c891e7 Move all login error string generation into view
This makes all the various hits done by login report the same
useful error messages and gets rid of the broken ones like printing
the http status code even if it was undefined. Also add text for
the case of overzealous browser extensions because lots of people
get bitten by it.
2017-06-08 15:49:48 +01:00
Luke Barnard
1792fa45f4 Null-guard roomId before sending a dispatch to update scroll state
Otherwise we pointlessly assign the null key to something
2017-06-08 15:45:50 +01:00
Luke Barnard
59e649f326 Add comment about roomId potentially not being resolved following an update from RoomViewStore 2017-06-08 15:43:45 +01:00
Luke Barnard
e58e4db628 Explain why search results are cleared when eventId changes 2017-06-08 15:38:58 +01:00
Luke Barnard
dca2be6325 Add RoomView initial state and docs 2017-06-08 15:37:30 +01:00
Luke Barnard
2e82bf40fb Explain setting of highlighted in room/$eventId showScreen handling. 2017-06-08 15:34:20 +01:00
Luke Barnard
8ddc38c9b1 Doc _viewRoom highlighted 2017-06-08 15:32:31 +01:00
Luke Barnard
aa20ad706e Remove redundant currentRoomAlias 2017-06-08 15:30:43 +01:00
Luke Barnard
ea97d16aa2 Merge branch 'develop' into luke/fix-event-id-state
Conflicts:
	src/components/structures/MatrixChat.js
2017-06-08 14:33:58 +01:00
Luke Barnard
f320f7d475 Remove redundant action id 2017-06-08 14:30:45 +01:00
Luke Barnard
d3cf78ff5a Control currently viewied event via RoomViewStore
Fix for https://github.com/vector-im/riot-web/issues/4224

Due to the way `MatrixChat` does a state update when the `view_room` dispatch fires and a second update when `RoomViewStore` sends an update, the current event ID and room ID were becoming out of sync. The solution devised was to have the event ID managed by the `RoomViewStore` itself and do any defaulting there (for when we revisit a room that we saved scroll state for previously).

This required a few changes:
 - The addition of `update_scroll_state` in `RoomViewStore` allows the `RoomView` to save scroll state for a room before swapping to another one. Previously the caching of scroll state was done in `RoomView`.
 - The `view_room` dispatch now accepts an `event_id`, which dictates which event is supposed to be scrolled to in the `MessagePanel` when a new room is viewed. It also accepts `event_offset`, but currently, this isn't passed in by a dispatch in the app, but it is clobbered when loading the default position when an `event_id` isn't specified. Finally, `highlighted` was added to distinguish whether the initial event being scrolled to is also highlighted. This flag is also used by `viewRoom` in `MatrixChat` in order to decide whether to `notifyNewScreen` with the specified `event_id`.
2017-06-08 14:17:49 +01:00
David Baker
6d1fa775a0 Formatting 2017-06-08 14:14:45 +01:00
Richard van der Hoff
566fb2caeb Add some logging around switching rooms
... which I wish had been there when I was staring at a rageshake.
2017-06-07 22:41:02 +01:00
Matthew Hodgson
ef2fedc3a9 fix missing translations and typos in i18n 2017-06-07 18:24:35 +01:00
Luke Barnard
53ea41e8a5 Merge branch 'develop' into new-guest-access 2017-06-07 12:08:37 +01:00
David Baker
1dbdbc163b Cancel 'join room' action if 'log in' is clicked
or 'choose different server'

We canceled the deferred action in the MatrixChat SetMxId dialog
but not the one in roomview.

Fixes https://github.com/vector-im/riot-web/issues/4217
2017-06-07 11:55:24 +01:00
Kegan Dougal
4127e7121c Translate src/components/structures
Includes some pluralisation! Tested them manually to make sure they work.
2017-06-07 11:40:46 +01:00
Oliver Hunt
3d59d72aaa Fixed pagination infinite loop caused by long messages
Signed-off-by: Oliver Hunt <oliver@hunt.bz>
2017-06-07 04:49:41 +01:00
Matthew Hodgson
184c2d5e58 Merge pull request #1015 from matrix-org/t3chguy/random_fix_1
fix copy and paste derp and rip out unused imports
2017-06-06 18:02:35 +01:00
David Baker
9f15e8e152 Merge branch 'master' into develop 2017-06-06 17:41:05 +01:00
David Baker
00ccf4bb51 Revert "Call MatrixClient.clearStores on logout"
This reverts commit c3d37c1ff9.

This commit was introducing a bug where no rooms would be shown if
you want straight to /#/login and logged in (because this causes
a guest session to be created but the indexeddb store not to be
cleared, so the new login picks up the stale indexedb sync data.
2017-06-06 17:33:50 +01:00
Luke Barnard
205fd1fad4 Allow password reset when logged in 2017-06-06 17:22:49 +01:00
David Baker
c27f50207d comment 2017-06-06 11:43:07 +01:00
David Baker
12d2480916 Reset 'first sync' flag / promise on log in
Otherwise on any logins after the first,we always think the first
sync has completed.
2017-06-06 11:36:33 +01:00
David Baker
f8198ba9c9 Merge branch 'develop' into new-guest-access 2017-06-06 10:33:01 +01:00
Matthew Hodgson
ed7c138d91 quick and dirty override to disable MD globally 2017-06-05 21:38:25 +01:00
David Baker
a99f6525c9 Merge pull request #1039 from matrix-org/dbkr/ilag_cancel_action
Cancel deferred actions
2017-06-05 21:27:13 +01:00
Luke Barnard
4ab6dc9ddd Merge branch 'new-guest-access' into luke/ilag-i18n 2017-06-05 20:28:51 +01:00
David Baker
f6cfff9098 Cancel deferred actions
if the set mxid dialog is canceled
2017-06-05 18:37:38 +01:00
David Baker
5924654f9d Defer an intention for creating a room 2017-06-05 17:45:01 +01:00
David Baker
3dbea45426 Comment 2017-06-05 16:50:00 +01:00
David Baker
3c0290588c Always show the spinner during the first sync
Before, we were relying on the fact that `ready` would still have
been false from before. This was not the case, for example, if we
naviagted straight to /#/login (which causes a guest session to be
set up and the sync for that completes after we navigate to the
login screen).

We should always mark ourselves as not-ready after login since we
will always have to wait for the sync.
2017-06-05 16:17:32 +01:00
Luke Barnard
619830617a Merge branch 'develop' into luke/ilag-i18n
In order to get ILAG internationalised

Conflicts:
	src/components/structures/LoggedInView.js
	src/components/structures/MatrixChat.js
	src/components/views/dialogs/ChatCreateOrReuseDialog.js
	src/components/views/dialogs/SetDisplayNameDialog.js
	src/createRoom.js
	src/i18n/strings/en_EN.json
2017-06-05 16:08:03 +01:00
David Baker
c5cd6aecd6 Revert "Call MatrixClient.clearStores on logout"
This reverts commit c3d37c1ff9.

This commit was introducing a bug where no rooms would be shown if
you want straight to /#/login and logged in (because this causes
a guest session to be created but the indexeddb store not to be
cleared, so the new login picks up the stale indexedb sync data.
2017-06-05 15:54:44 +01:00
David Baker
85aa3f6f13 Merge pull request #1032 from matrix-org/luke/fix-welcome-user-background
Only view welcome user if we are not looking at a room
2017-06-05 14:38:55 +01:00
David Baker
d8e3423060 Merge pull request #1031 from matrix-org/luke/fix-deferred-start-chat-settings
Keep deferred actions for view_user_settings and view_create_chat
2017-06-05 14:10:29 +01:00
Luke Barnard
c82e79ab5f Only view welcome user if we are not looking at a room 2017-06-05 14:07:24 +01:00
Luke Barnard
3195b9f964 Keep deferred actions for view_user_settings and view_create_chat
This will bring up the correct UI as intended instead of defaulting to the home page with welcome user in the room list.

Fixes https://github.com/vector-im/riot-web/issues/4162
2017-06-05 13:41:52 +01:00
Luke Barnard
beafb68538 Don't do a deferred start chat if user is welcome user
There's no point in deferring creating a new DM with the welcome user because the setMxId dialog will do so anyway.
2017-06-05 13:14:55 +01:00
Luke Barnard
239874ccce Introduce state peekLoading to avoid collision with roomLoading
The room loading spinner will now be displayed if the alias is being resolved (roomLoading) or if the peek is being loaded for the room `peekLoading`.
2017-06-05 09:52:39 +01:00
Michael Telatynski
464863acd6 remove unused imports
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-02 21:35:55 +01:00
David Baker
2cc9f9c403 Fix accepting a 3pid invite
Fixes https://github.com/vector-im/riot-web/issues/4123
2017-06-02 16:25:14 +01:00
David Baker
ec0ad93ad7 Merge pull request #1007 from matrix-org/dbkr/propagate_room_join_errors
Propagate room join errors to the UI
2017-06-02 16:09:34 +01:00
Kegan Dougal
bfb313ce9d riot-bot only if english please 2017-06-02 14:13:45 +01:00
Matthew Hodgson
375b435dfe hide analytics settings if no piwik url 2017-06-02 13:34:01 +01:00
Matthew Hodgson
adfeff34ae Merge pull request #1004 from matrix-org/t3chguy/hide_redactions
allow hiding redactions, restoring old behaviour
2017-06-02 12:27:52 +01:00
Luke Barnard
953a573f81 Merge pull request #1006 from matrix-org/luke/new-guest-access-user-action-chat
Implement /user/@userid:domain?action=chat
2017-06-02 12:03:11 +01:00
David Baker
03f4f269ce Propagate room join errors to the UI
Dispatch so we can set the state in RoomViewStore. Show the error
when the room join fails (unsure if it's better to do this from
the component or the store). Remove unused joinError from roomview.
2017-06-02 11:53:10 +01:00
Luke Barnard
e88b52fa8f Add comment 2017-06-02 11:42:47 +01:00
Luke Barnard
6a9781f023 Remove redundant state 2017-06-02 11:41:09 +01:00
Luke Barnard
defecb1b14 Implement /user/@userid:domain?action=chat
This is a URL that can be used to start a chat with a user.
 - If the user is a guest, setMxId dialog will appear before anything and a defered action will cause `ChatCreateOrReuseDialog` to appear once they've logged in.
 - If the user is registered, they will not see the setMxId dialog.

fixes https://github.com/vector-im/riot-web/issues/4034
2017-06-02 11:36:18 +01:00
Kegan Dougal
a8ca7c899f Review comments 2017-06-02 11:16:08 +01:00
Kegan Dougal
f54c182eb1 Add remaining strings for vector-im/riot-web#4151 2017-06-02 10:47:08 +01:00
Michael Telatynski
5e2e550bf9 don't lose date seperator when the first event of the new day is redacted
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-02 04:39:44 +01:00
Michael Telatynski
d2d0ba952a allow hiding redactions. no point onAccountData as it'd cause a full
refresh, this may need to be handled differently in the future.
Currently handling same as the new timestamp stuff

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-02 04:23:07 +01:00
Michael Telatynski
b1973d7998 undefined =/= ''
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-02 00:42:19 +01:00
Michael Telatynski
f4db83a031 try empty string as falsey key
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-02 00:31:43 +01:00
Michael Telatynski
6b4daf02a9 i18 missed things
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-02 00:27:20 +01:00
Michael Telatynski
0bafd6458a Revert voodoo 2017-06-02 00:26:31 +01:00
Michael Telatynski
46a9326607 special case default - CallMediaHandler can figure it out
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-02 00:20:34 +01:00
Michael Telatynski
3eb519b227 this is just endless
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-01 23:54:17 +01:00
Michael Telatynski
beedeec163 copy the arrays so we're not making a mess
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-01 23:50:14 +01:00
Michael Telatynski
0f2c89d525 lets actually make things work, eh?
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-01 23:39:54 +01:00
Michael Telatynski
4e36c10c38 only unshift default if there is no deviceId===default
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-01 23:33:36 +01:00
Michael Telatynski
dd4480f8c3 change device data structure to array of objects
so that we can set falsey values, for unsetting device
                               most dolphinately needs testing

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-01 23:26:43 +01:00
Michael Telatynski
aa90d6b097 fix **AMAZING** C&P derp
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-01 23:00:25 +01:00
Michael Telatynski
dbba1dedb6 i18nize all the things and change show logic
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-06-01 22:58:17 +01:00
Michael Telatynski
04b86e5d1d Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into webrtc_settings
and i18nize webrtc stufffs

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

# Conflicts:
#	src/components/structures/UserSettings.js
2017-06-01 22:56:31 +01:00
Matthew Hodgson
ee965a89a7 Merge pull request #986 from uhoreg/compact
enable useCompactLayout user setting an add a class when it's enabled
2017-06-01 21:32:54 +01:00
Matthew Hodgson
6c56fa3381 Merge pull request #990 from matrix-org/kegan/translation-marmoset
Translation fixes for everything but src/components
2017-06-01 21:22:00 +01:00
Matthew Hodgson
33214b8752 Merge pull request #991 from turt2live/travis/date-sep-12hr
Support 12hr time on DateSeparator
2017-06-01 18:26:13 +01:00
Luke Barnard
16c4c14a16 Fix to show the correct room 2017-06-01 18:01:30 +01:00
Richard van der Hoff
53ebc8d7bd Merge pull request #983 from matrix-org/rav/clear_storage_on_logout
Call MatrixClient.clearStores on logout
2017-06-01 17:34:21 +01:00
turt2live
ab1e277f5f Support 12hr time on DateSeparator
Signed-off-by: Travis Ralston <travpc@gmail.com>
2017-06-01 09:53:24 -06:00
Kegan Dougal
ced68f2719 Find a way to translate the name of RTE in user settings
I never said it was a *nice* way...
2017-06-01 15:53:08 +01:00
Matthew Hodgson
00750b4686 quick and dirty RoomAvatarEvent 2017-06-01 13:31:24 +01:00
Hubert Chathi
92d1a9a6ff enable useCompactLayout user setting an add a class when it's enabled
Signed-off-by: Hubert Chathi <hubert@uhoreg.ca>
2017-05-31 22:00:30 -04:00
Matthew Hodgson
b4284cf000 fix up Can't connect to HS i18n with _tJsx 2017-06-01 01:17:39 +01:00
Richard van der Hoff
cbbed3f544 Fixes to i18n code 2017-05-31 18:31:10 +01:00
Richard van der Hoff
c3d37c1ff9 Call MatrixClient.clearStores on logout
... to make sure that we don't have any sensitive data sitting around in the
stores.
2017-05-31 18:28:21 +01:00
Luke Barnard
7abaadddde Merge pull request #977 from matrix-org/luke/session-store-null-on-logout
Remove cachedPassword from localStorage on_logged_out
2017-05-31 16:00:24 +01:00
Luke Barnard
d0e270bd1c Only re-render LoggedInView if MatrixClientPeg.get() is truthy 2017-05-31 15:15:27 +01:00
Richard van der Hoff
2d73f094ff Delint MatrixChat, again (#979)
grrr.
2017-05-31 15:09:09 +01:00
Michael Telatynski
dcd99ac3de Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/electron_settings
# Conflicts:
#	src/components/structures/UserSettings.js
#	src/i18n/strings/en_EN.json

First time using JetBrains Merge Tool, MAY HAVE GONE HORRIBLY WRONG

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-30 23:54:57 +01:00
Michael Telatynski
0d930c0553 change wording and i18n it
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2017-05-30 23:46:51 +01:00
Matthew Hodgson
e30e45a82c Merge branch 'develop' into new-guest-access 2017-05-30 21:05:07 +01:00
Matthew Hodgson
93a35dc07a Merge branch 'develop' into t3chguy/piwik 2017-05-30 15:58:55 +01:00
Marcel
70e7d81093 More i18n strings (#963)
* Add i18n for E2E import and Export Dialogs

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add various previous missing i18n strings

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Translate CreateRoomButton

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add ChatInviteDialog and fix missing to.

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add ConfitmRedactDialog translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add DeactivateAccountDialog translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add DeviceVerifyDialog translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add SessionRestoreErrorDialog translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add SetDisplayNameDialog translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add UnknownDeviceDialog translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add AddressTile translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add DeviceVerifyButtons translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add Dropdown translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add UserSelector translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add CaptchaForm translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add CasLogin translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add CustomServerDialog translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add InteractiveAuthEntryComponents translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add LoginFooter translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add RegistrationForm translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add ServerConfig translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add MAudioBody translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add MImageBody translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add MVideoBody translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add TextualBody translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add UnknownBody translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add UrlPreviewSettings translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add AuxPanel translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* Add PresenceLabel translations

Signed-off-by: MTRNord <mtrnord1@gmail.com>

* fix syntax error

* weird space :P

* missing ','

* fix missing value

* fix json fail

* remove acidential added file

* fix another json fail
2017-05-30 15:09:57 +01:00