Commit graph

5550 commits

Author SHA1 Message Date
David Baker
c03abddd1c s/terms and conditions/legal/ 2018-08-24 11:38:38 +01:00
David Baker
18ed6eb63c Rener terms & conditions in settings
If configured in config file
2018-08-24 11:35:21 +01:00
David Baker
98dabe1a46
Merge pull request #2132 from matrix-org/bwindels/fixllcomposeravatar
Fix LL crash trying to render own avatar in composer when member isn't available yet
2018-08-23 12:41:18 +01:00
David Baker
06ffc70aa4
Merge pull request #2127 from matrix-org/dbkr/hide_replaced_rooms
Hide replaced rooms
2018-08-23 09:33:40 +01:00
David Baker
269670ed20
Merge pull request #2128 from matrix-org/dbkr/move_tiffany_check
Fix CPU spin on joining large room
2018-08-23 09:33:17 +01:00
David Baker
b34aad50bc
Merge pull request #2131 from matrix-org/dbkr/change_mau_server_notice_format
Change format of server usage limit message
2018-08-23 09:32:56 +01:00
Bruno Windels
37e60e4fc4 wait for members loading to finish to show the avatar in the composer 2018-08-23 00:02:20 +02:00
David Baker
3b0b836637 Change format of server usage limit message
As per https://github.com/matrix-org/matrix-doc/issues/1452 /
https://github.com/matrix-org/synapse/pull/3680/
2018-08-22 17:54:02 +01:00
David Baker
a5f98b6a29 Make the is-alone check use efficient methods 2018-08-22 17:05:36 +01:00
David Baker
f679acea08
Revert "Revert "Fix showing peek preview while LL members are loading"" 2018-08-22 16:35:58 +01:00
David Baker
bf7633250a
Revert "Fix showing peek preview while LL members are loading" 2018-08-22 16:16:17 +01:00
David Baker
852d6a3be5 Fix CPU spin on joining large room
checkIfAlone() filters the whole member list, which is fine until
we do it once for every membership event, then we have an n^2
problem. Move it into the rate limited function.

Fixes https://github.com/vector-im/riot-web/issues/7163
2018-08-22 14:34:02 +01:00
Bruno Windels
a54629276f use getJoinedMemberCount() instead of getJoinedMembers().length as the latter doesnt take LL into account 2018-08-22 14:08:18 +02:00
Bruno Windels
860c6355f0 do self membership checks with getMyMembership elsewhere as well 2018-08-22 14:06:28 +02:00
David Baker
b7570002e0 Hide replaced rooms
By using new getVisibleRooms() in js-sdk
2018-08-22 12:01:29 +01:00
Bruno Windels
c38b286e8e falsy check is obsolete now 2018-08-22 12:28:00 +02:00
Bruno Windels
01a0260ac8 use getMyMembership instead of member 2018-08-22 10:33:13 +02:00
David Baker
8d6d1be992 Typo 2018-08-21 16:40:04 +01:00
David Baker
7f8cd203a8 Support m.room.tombstone events
For https://github.com/vector-im/riot-web/issues/7164
2018-08-21 15:56:56 +01:00
David Baker
ab10b5493b Support room creation events
For https://github.com/vector-im/riot-web/issues/7164
2018-08-20 16:20:59 +01:00
David Baker
9f19896df0 Support for room upgrades
* Show when a room upgrade is needed
 * Dialog box to perform the upgrade
2018-08-17 14:54:43 +01:00
David Baker
94c7ae2bf5
Merge pull request #2098 from matrix-org/dbkr/destroy_widget
Destroy non-persistent widgets when switching room
2018-08-17 09:53:41 +01:00
David Baker
e3643bd74c Lint 2018-08-17 09:42:23 +01:00
Bruno Windels
cead4096d8
Merge pull request #2118 from matrix-org/bwindels/feature_lazyloading
Lazy loading of room members
2018-08-16 18:14:55 +02:00
David Baker
8567ce585b Factor out duplication of resource limit i18n 2018-08-16 13:31:17 +01:00
David Baker
7d690d98e3 Rename variable as it's now not just MAU 2018-08-16 10:35:27 +01:00
David Baker
9bde468e30 Shift to M_RESOURCE_LIMIT_EXCEEDED errors
With support for admin_contact and limit_type fields

For https://github.com/vector-im/riot-web/issues/7091
2018-08-15 17:03:54 +01:00
David Baker
c736ae7efb Copyright 2018-08-14 16:53:34 +01:00
David Baker
f20920718a Show room version number in room settings
Also change wording of the Room ID bit to match

Requires https://github.com/matrix-org/matrix-js-sdk/pull/689
For https://github.com/vector-im/riot-web/issues/7164
2018-08-14 14:28:30 +01:00
Bruno Windels
a86ca952b3 forgot to remove this 2018-08-14 09:38:43 +02:00
Bruno Windels
7dc92fe917 Avoid clearing e2e encryption keys, also avoid warning 2018-08-13 17:24:27 +02:00
Bruno Windels
84b74247e6 check if server supports lazy loading before enabling 2018-08-13 16:19:44 +02:00
David Baker
f7f62ba09d Lint 2018-08-13 14:04:08 +01:00
David Baker
d84ecbe97c s/m.server_notices/m.server_notice/ 2018-08-13 13:53:38 +01:00
David Baker
05bf200a72 Don't crash if scrollbars updated before init
The initialisation here is done on a timer to allow the DOM
elements to be in place before it's run, so it's possible for an
update to happen ebfore the initialisation. Stop & bail out if
there is no this.stickies.
2018-08-13 13:49:22 +01:00
Bruno Windels
28292c3388 implement PR feedback, move LL dialog to UserSettings 2018-08-13 11:14:30 +02:00
Bruno Windels
a02e1aa2b2 add action/method to flush storage and reload the session 2018-08-09 18:41:18 +02:00
Bruno Windels
308a6b419e allow a setting controller to validate and revert a change (asynchronously) 2018-08-09 16:56:02 +02:00
David Baker
16b7763c0e s/limit/limit_type/ 2018-08-07 17:22:12 +01:00
David Baker
6593ee09d1 Warning bar for MAU limit hit
Somewhat untested, sorry
2018-08-07 17:04:37 +01:00
Bruno Windels
1009bc43ae call method on room now to LL members 2018-08-07 14:47:06 +02:00
David Baker
f44cc8e66e
Merge pull request #2112 from matrix-org/dbkr/recognise_server_notices_room
Recognise server notices room(s)
2018-08-07 09:52:25 +01:00
David Baker
879cf24a50
Merge pull request #2111 from matrix-org/dbkr/room_tags_spec_update
Update room tags behaviour to match spec more
2018-08-07 09:52:01 +01:00
Bruno Windels
07083e61b7
Merge pull request #2058 from matrix-org/t3chguy/hide_logout_warning_whilst_logging_out
while logging out ignore `Session.logged_out` as it is intentional
2018-08-07 10:31:29 +02:00
David Baker
b5ce1ac5e1 Recognise server notices room(s)
and put them in their own section at the bottom
2018-08-06 18:00:40 +01:00
David Baker
b2302af708 Update room tags behaviour to match spec more
Fix Riot's behaviour with room tags after my cleanup in
https://github.com/matrix-org/matrix-doc/pull/1457 . Although, reading
it again, it's not clear how you're supposed to tell the difference
between a reverse-dns tag name and a legacy freeform text tag
(contains a '.'?) - I've left it detecting these as freeform text
for now.
2018-08-06 16:58:54 +01:00
David Baker
ccdb5fa770 Don't show 'connection lost' bar on MAU error
We don't need both warning bars

Requires https://github.com/matrix-org/matrix-js-sdk/pull/680
2018-08-03 18:02:09 +01:00
David Baker
cd18744101 unused import 2018-08-03 16:10:50 +01:00
David Baker
9a2155f1ad Oops, add file to right branch 2018-08-03 16:03:27 +01:00
David Baker
b5d2fa769c Support MAU error on sync
For https://github.com/vector-im/riot-web/issues/7091
2018-08-03 14:54:52 +01:00
David Baker
bc1d359398
Merge pull request #2106 from matrix-org/dbkr/chairman_mau_pt_2_message_send
Support active user limit on message send
2018-08-03 13:14:18 +01:00
Bruno Windels
f1643f77ac fix lint 2018-08-02 19:57:20 +02:00
David Baker
02019a58b3 Support active user limit on message send
For https://github.com/vector-im/riot-web/issues/7091
2018-08-02 17:09:04 +01:00
David Baker
bb9a3eb33d Support MAU limit error on register too 2018-08-02 16:09:57 +01:00
Bruno Windels
e1843601be support directional content in pill member fake 2018-08-02 17:09:18 +02:00
David Baker
cc58b06226 Support montly active user limit error on /login
The 'contact your service administrator' should be a link but we
don't have this info from the HS yet.
2018-08-02 14:25:17 +01:00
Bruno Windels
802efc7694 given the != join check, isInvite will never be true
Also, put comments in right order
2018-08-02 11:47:24 +02:00
Bruno Windels
b151956f7b Use room method to help with DM detection with fallback to summary heroes/counts. 2018-08-02 11:42:19 +02:00
Bruno Windels
908de56c6d replace getMember(myId).membership with getMyMembership
This works with rooms which haven't had their members
loaded yet.
2018-08-02 11:42:05 +02:00
David Baker
7875d37c8e Destroy non-persistent widgets when switching room 2018-08-01 15:01:11 +01:00
David Baker
f4c073ad45 Nest ifs to avoid unnecessary work 2018-07-27 18:58:11 +01:00
David Baker
e059a08d7b Make clicking on side panels close settings (mk 3)
Just do it by fixing the somewhat hacky logic to not break if the
target elements also have additional classes, like they do if the
toolbar is showing (I think it turns out this bug is only that it
doesn't work with the toolbar showing...)

Fixes https://github.com/vector-im/riot-web/issues/5658
2018-07-27 18:53:36 +01:00
David Baker
148308235d
Merge pull request #2092 from matrix-org/dbkr/reposition_jitsi
Fix persistent element location not updating
2018-07-27 14:51:29 +01:00
David Baker
1fe0f04986 Fix persistend element location not updating
As hopefully all explained in comment
2018-07-27 14:33:05 +01:00
David Baker
b6ebb0cc37
Merge pull request #2089 from matrix-org/t3chguy/slate_cont2
Slate Fixes 42?
2018-07-27 14:00:53 +01:00
Michael Telatynski
0174f67fe7
fix Devtools input autofocus && state traversal when len === 1 && key=""
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-26 18:20:09 +01:00
Michael Telatynski
f264075369
null-guard history properly
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-26 17:11:32 +01:00
Michael Telatynski
265e4267b8
remove faulty onBlur/onFocus code which caused selection to rollback
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-26 15:00:43 +01:00
Bruno Windels
d87d34030a fix dm detection and conf call code with lazy loading 2018-07-25 16:10:49 +02:00
Bruno Windels
f79e2eae40 might not have loaded members here yet 2018-07-25 16:10:49 +02:00
Bruno Windels
33f5560666 move error message to caller of lazy loading 2018-07-25 16:10:49 +02:00
Bruno Windels
201332d96c move comment after rebase 2018-07-25 16:10:49 +02:00
Bruno Windels
af07d73432 hide lazy loading behind feature flag 2018-07-25 16:10:49 +02:00
Bruno Windels
866b4bb067 use isKicked method in preview bar 2018-07-25 16:10:49 +02:00
Bruno Windels
8c9ceca14f take into account lazy loading when enlarging avatar 2018-07-25 16:10:49 +02:00
Bruno Windels
e237a02fa5 use more consistent naming 2018-07-25 16:10:49 +02:00
Bruno Windels
6ff92ede8f this code actually never fires, so remove it
and that's ok because createRoom will already mark a DM as such
on the inviter's side. So here we just handle the invitees side.
2018-07-25 16:10:49 +02:00
Bruno Windels
19387805ac Don't assume RoomMember has a state event in direct chat detection
Instead call the method on the member that takes lazy loading into account
2018-07-25 16:10:49 +02:00
Bruno Windels
de3e143a8f only lazy load the members when viewing a joined room 2018-07-25 16:10:49 +02:00
David Baker
cf6ce0c1e2
Merge pull request #2082 from matrix-org/t3chguy/slate_cont2
Moar Slate Fixes
2018-07-24 17:34:20 +01:00
David Baker
c19a5bd2a8
Merge pull request #2084 from matrix-org/dbkr/store_destroy_persistent_widget
Make ActiveWidgetStore clear persistent widgets
2018-07-24 17:12:49 +01:00
David Baker
7044410a13 Move destroyPersistentWidget to store 2018-07-24 16:50:34 +01:00
David Baker
ec4c7ffb71 Make ActiveWidgetStore clear persistent widgets
ActiveWidgetStore is now reponsible for removing the current
persistent widget from the store if it's been removed from whatever
room it was in. As per comment, this leaves us with the store updating
itself in this case but in all other cases, views call setters on the
store to update its state. We should make it so the store keeps itself
up to date and views aren't responsible for keeping the store up to date.

The store now emits events so it can notify PersistentApp when it changes.

Fixes https://github.com/vector-im/riot-web/issues/7076
2018-07-24 16:21:43 +01:00
Michael Telatynski
fe3850d61f
Merge pull request #2078 from psaavedra/fix_render_in_CreateRoomDialog
CreateRoomDialog is rendered before getting the config default_federate
2018-07-24 16:03:26 +01:00
Michael Telatynski
020e714b85
fix focus and too many <p>s after a Event>Quote in RT mode
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-24 15:54:24 +01:00
Michael Telatynski
afa19cd60d
make clicking autocomplete suggestions work again
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-24 13:48:05 +01:00
Michael Telatynski
7c3873b449
fix @room pill href=undefined and @room parsing breaking subsequent pills
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-24 12:18:10 +01:00
David Baker
b8ca65627b
Merge pull request #2076 from matrix-org/t3chguy/slate_cont2
Slate Fixes
2018-07-23 17:25:51 +01:00
David Baker
6804647dda Destroy widget when its permission is revoked 2018-07-23 17:11:53 +01:00
Pablo Saavedra
77ab7d2589 CreateRoomDialog is rendered before get default_federate value
In React the order of the execution of mount and render functions
is: `componentWillMount --> render --> componentDidMount`

The `CreateRoomDialog` `render()` function is executed before than
the `componentDidMount()` function so the

  `this.defaultNoFederate = config.default_federate === false;`

; instruction which is executed in the `componentDidMount` function
(in `CreateRoomDialog`) is evaluated always after than the rendering
of the page.

Therefore, the obvious issue is that the values obtained from the
`SdkConfig.get()` function (`config.default_federate`) are obtained
later than their usage on `render()`.

This patch makes this change to fix the described issue:

* componentWillMount instead of componentDidMount

Signed-off-by: Pablo Saavedra <psaavedra@igalia.com>
2018-07-23 17:51:51 +02:00
David Baker
4f8ece53b2 Fix CSS naming 2018-07-23 15:58:07 +01:00
David Baker
5adcd673ab Fix persisent apps being the wrong size 2018-07-23 15:08:17 +01:00
David Baker
00f78822c5 Fix widgets resetting when going to the top-left
Remove the hash from the parentUrl because this change when we
change rooms.
2018-07-23 13:50:16 +01:00
Michael Telatynski
93abb4b74b
workaround to prevent Slate getting too empty when undoing RT pastes
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-20 15:06:27 +01:00
Bruno Windels
6f278ceab0
Merge pull request #2071 from matrix-org/dbkr/persistedelement_border
Fix border around persisted widgets
2018-07-20 12:23:02 +01:00
David Baker
f9af96d422
Merge pull request #2070 from matrix-org/t3chguy/slate_cont2
Even More Slate Fixes :D
2018-07-19 13:49:42 +01:00
Michael Telatynski
855f8871b8
replace heuristic for the time being as it failed with inlines like pills. Fixes vector-im/riot-web#7059
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-18 16:50:07 +01:00
David Baker
f868cd6699 Fix border around persisted widgets
The PersistedElement had zero height so the border ended up in the
wrong place. Add a wrapper to fix the height back.

Fixes https://github.com/vector-im/riot-web/issues/7030
Fixes https://github.com/vector-im/riot-web/issues/7029
2018-07-18 11:52:57 +01:00
Michael Telatynski
88dddb628d
in MD mode forgo any Magic Rich Pasting conversion as its confusing
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-18 11:50:13 +01:00
Michael Telatynski
6bb88c0548
attempt to fix clash of Cmd-M on Mac. Should fix vector-im/riot-web#7047
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2018-07-18 11:28:48 +01:00