Commit graph

2115 commits

Author SHA1 Message Date
Bruno Windels
25e0211ca1
Merge pull request #279 from Johennes/feature/safari-viewport
Manually adapt UI when keyboard shows or hides on mobile Safari
2021-04-28 11:04:43 +02:00
Bruno Windels
b23ec5ef70 remove obsolete comment 2021-04-28 10:08:11 +02:00
Bruno Windels
e850874019 clarify order 2021-04-28 10:05:34 +02:00
Bruno Windels
15dfb6c202 clarify 2021-04-28 10:05:21 +02:00
Bruno Windels
ef6f10c5a2 test for Path.replace 2021-04-28 09:53:44 +02:00
Bruno Windels
1c5b953026 hide non-joined rooms in left panel for now
until we support archiving/forgetting the room
2021-04-27 16:16:07 +02:00
Bruno Windels
025320b83e fix filtered map 2021-04-27 16:15:20 +02:00
Bruno Windels
396ec4dfd9 also in grid remove room id from nav path when refreshing room vm fails 2021-04-27 15:33:12 +02:00
Bruno Windels
c47b27428b implement invite view + styling 2021-04-27 15:10:12 +02:00
Bruno Windels
f4f153ac4b don't seems to throw the letter off-center more than anything else
apart for some rare cases ... shrug
2021-04-27 15:09:45 +02:00
Bruno Windels
a9838fed06 don't set a default avatar size in the css, makes it easier to change it 2021-04-27 15:09:29 +02:00
Bruno Windels
fbe255f837 support extra classes in static avatar 2021-04-27 15:04:01 +02:00
Bruno Windels
441bb4d5d7 keep .room-placeholder display settings separate from .middle 2021-04-27 15:03:13 +02:00
Bruno Windels
34cca2ba0f add invite view to view gallery 2021-04-27 15:02:43 +02:00
Bruno Windels
1f36122283 remove debugging code 2021-04-27 15:02:29 +02:00
Bruno Windels
799ea50c68 remove obsolete logging 2021-04-27 15:02:00 +02:00
Bruno Windels
32d9f6e830 expose inviter user id 2021-04-27 15:01:35 +02:00
Bruno Windels
a95df54978 scale down inviter avatar 2021-04-27 15:01:20 +02:00
Bruno Windels
15fba7a07d missing semicolon 2021-04-27 14:43:26 +02:00
Bruno Windels
781235cb07 scale up room avatar 2021-04-27 14:43:13 +02:00
Bruno Windels
f902f255a4 add roomDescription property 2021-04-27 14:42:37 +02:00
Bruno Windels
b6573258fb always show inviter if present 2021-04-27 14:42:12 +02:00
Bruno Windels
87defbfb51 sort invites most recent first 2021-04-27 14:27:14 +02:00
Bruno Windels
fd454f1e20 don't expose joinRule prop, as it is protocol specific 2021-04-27 14:26:40 +02:00
Bruno Windels
86e8b27cb3 fix middle-shown to use new active vm 2021-04-27 11:01:51 +02:00
Bruno Windels
aaf4e79a73 make media repo available on invite 2021-04-27 11:01:33 +02:00
Bruno Windels
9b9e6fceda refine action buttons style 2021-04-27 10:32:06 +02:00
Bruno Windels
bb6664a9a8 fix room header height 2021-04-27 10:31:47 +02:00
Bruno Windels
ab8111f847 make all middle containers column flexboxes, not just the room view 2021-04-27 10:28:25 +02:00
Bruno Windels
55b576a299 rename .TimelinePanel to .RoomView_body 2021-04-27 10:28:09 +02:00
Bruno Windels
bd748549f7 fix updates in Invite not firing on collection 2021-04-26 10:45:27 +02:00
Bruno Windels
47b2eb0bdb don't create a room when rejecting an invite 2021-04-26 10:41:21 +02:00
Bruno Windels
f2d7f5e4da refresh vm when left room receives invite
clean up room vm switching in the process
2021-04-23 18:06:38 +02:00
Bruno Windels
827075bc37 only apply the invite when joining 2021-04-23 18:05:46 +02:00
Bruno Windels
847738a76c set invite on left room so we can detect a vm refresh is needed 2021-04-23 18:05:14 +02:00
Bruno Windels
b9f145caa4 emit events for rooms before invites
so the room is already there when removing the invite
2021-04-23 18:04:10 +02:00
Bruno Windels
b77d0f75ce can just use vm here 2021-04-22 17:23:41 +02:00
Bruno Windels
d289a44624 also sync leave now that we can handle it 2021-04-22 17:23:29 +02:00
Bruno Windels
2e9ddf9c2c prevent key collisions between rooms and invites before creating tile vm 2021-04-22 17:22:47 +02:00
Bruno Windels
ec0de15da6 handle overlap with existing timeline when rejoining room 2021-04-22 17:21:29 +02:00
Bruno Windels
ff4abbc5ba make dispose not fail 2021-04-22 17:18:07 +02:00
Bruno Windels
4e3127c4cf handle key collisions in JoinedMap 2021-04-22 13:28:14 +02:00
Bruno Windels
20f4474eb6 missing semicolon 2021-04-21 18:13:29 +02:00
Bruno Windels
35992ac2fc show very basic buttons to accept or reject invite 2021-04-21 17:50:41 +02:00
Bruno Windels
b4ad6142f4 show spinner in room list while accepting or rejecting invite 2021-04-21 17:50:22 +02:00
Bruno Windels
ac312cbdc7 fix c/p error in invite store 2021-04-21 17:49:59 +02:00
Bruno Windels
76933e51aa fix default avatar color being broken in room list 2021-04-21 17:48:40 +02:00
Bruno Windels
1cf49688d6 show invites at the top of the room list 2021-04-21 17:26:34 +02:00
Bruno Windels
16df40331b fix refactor mistake in sync 2021-04-21 17:26:10 +02:00
Bruno Windels
bfb7f58a3d add very basic invite view 2021-04-21 17:25:59 +02:00
Bruno Windels
f596b34cac add very basic join observable map, joining several maps into one
will be used to join invites and rooms into one map
2021-04-21 17:25:37 +02:00
Bruno Windels
1d3a2aca0e add 'get' method to common observable map api 2021-04-21 17:23:49 +02:00
Bruno Windels
0dc796b863 spacing 2021-04-21 15:48:41 +02:00
Bruno Windels
9961d3e4fc unused code 2021-04-21 15:48:27 +02:00
Bruno Windels
7e2870acef wire up InviteViewModel in Session/RoomGridViewModel
and:
 - switch to room once accepted
 - close invite if rejected
2021-04-21 15:47:39 +02:00
Bruno Windels
0cc95f5083 first draft of InviteViewModel 2021-04-21 15:45:51 +02:00
Bruno Windels
16f275ca34 make pass-through props smaller 2021-04-21 15:34:35 +02:00
Bruno Windels
a91a584201 not used anymore 2021-04-21 15:33:45 +02:00
Bruno Windels
9c19fa5c63 utility to remove room from path (with our without grid)
which will be used when rejecting an invite
2021-04-21 15:33:08 +02:00
Bruno Windels
ad5d7fc9f0 add note collection emit should happen first in Invite 2021-04-21 15:32:37 +02:00
Bruno Windels
a5e6294593 test accepted/rejected fields in invite tests 2021-04-21 15:32:13 +02:00
Bruno Windels
465e0c191f add logging to accepting or rejecting an invite 2021-04-21 15:31:55 +02:00
Bruno Windels
5ce138539b network calls to accept and reject invite 2021-04-20 19:02:45 +02:00
Bruno Windels
bb1c64e1ac add left panel tile view model for invites
and track in-progress state in Invite so it is shared by left panel
and open invite
2021-04-20 19:01:40 +02:00
Bruno Windels
ee98eaa640 restore invites when loading the session 2021-04-20 18:09:48 +02:00
Bruno Windels
5876e5200b don't need this for now 2021-04-20 18:03:27 +02:00
Bruno Windels
4560e0e491 split sync lifecycle steps out in different methods to keep it smaller 2021-04-20 17:57:17 +02:00
Bruno Windels
09ac503e22 add test for removing invite 2021-04-20 17:57:03 +02:00
Bruno Windels
d1dc4c9e9c remove extra layer of log items 2021-04-20 17:56:53 +02:00
Bruno Windels
a072426e07 integrate invites into the sync lifecycle and expose them on session 2021-04-20 17:39:46 +02:00
Bruno Windels
de125441d1 add write/load test for Invite 2021-04-20 17:34:45 +02:00
Bruno Windels
39c772300a fix indenting 2021-04-20 16:21:35 +02:00
Bruno Windels
81a35639ba add Invite class
calculating the room name, avatar, etc ...
with empty accept and reject methods for now
2021-04-20 16:21:27 +02:00
Bruno Windels
7c4a6fbe4b invite store 2021-04-20 13:13:56 +02:00
Bruno Windels
33f1ba686c add warning when rendering outside of render fn for templates 2021-04-15 15:14:02 +02:00
Bruno Windels
766ce4e217 create AvatarView and renderStaticAvatar (for timeline) and use it
in RoomTileView, we make some efforts to only have one update listener
for the entire list, because by default a subview would listen on
the view model
2021-04-15 15:12:14 +02:00
Bruno Windels
c85b2ca3c9 allow manually updating subviews in templates w/ parentProvidesUpdates 2021-04-15 15:11:05 +02:00
Bruno Windels
357ce21678 extract base class from Template view to select update mechanism 2021-04-15 15:09:45 +02:00
Bruno Windels
16fda4dde0 white background for transparent avatar images 2021-04-15 14:59:01 +02:00
Bruno Windels
d414fb6b94 sync can also stop without an error 2021-04-09 19:50:22 +02:00
Bruno Windels
ba38ce7976 use canonical way of check error type 2021-04-09 16:30:53 +02:00
Bruno Windels
b852feeb9c ConnectionError isn't throw from start, but sets sync.error 2021-04-09 16:28:14 +02:00
Bruno Windels
4b19e3c498 remove unused member 2021-04-09 16:27:25 +02:00
Bruno Windels
606e30fed2 make comment easier to read 2021-04-09 15:24:10 +02:00
Bruno Windels
c604c31032 use external mock for request in timeout tests 2021-04-09 15:16:43 +02:00
Bruno Windels
c36e812360 move RequestWrapper to own file
and add tests, improve comments, and and don't use timeout connection
error as that's not what happens if aborted request from service worker
is reported as TypeError either.
2021-04-09 15:15:28 +02:00
Bruno Windels
2b1f4866a9 map unexpected fetch AbortError to ConnectionError, so doesn't stop sync 2021-04-09 14:25:19 +02:00
Bruno Windels
2341748023 add some tests to timeout code 2021-04-09 14:09:48 +02:00
Bruno Windels
e17fb24bd8 also await sharing the key in encrypt 2021-04-09 10:37:55 +02:00
Bruno Windels
13f20cdd26 wait for running key share operation in encrypt 2021-04-09 10:37:43 +02:00
Bruno Windels
bdc8451c4a better logging 2021-04-08 18:39:52 +02:00
Bruno Windels
9e697c6cbe don't add the pending event again if removed already, fixes #289 2021-04-08 18:36:26 +02:00
Bruno Windels
f976eeaf13 rename SortedArray.replace to update 2021-04-08 18:36:09 +02:00
Bruno Windels
863f659774 fall back to bare userid for local echo profile 2021-04-08 16:30:46 +02:00
Bruno Windels
813be758d7 we should prefer to not pick the event itself if it's a member event
but still fall back to that if it's a new join
2021-04-08 15:33:21 +02:00
Bruno Windels
f67ccc18f4 take most recent member rather than first in timeline for inline lookup
noticed this while inspecting the code, looks related to #269
2021-04-08 12:57:10 +02:00
Bruno Windels
6f37c232f7 Don't cache members that haven't been written yet - fixes #271 2021-04-08 12:56:24 +02:00
Bruno Windels
f5db6babf2 forgot to change the type of the hs field, so it still nags 2021-04-08 10:27:50 +02:00
Bruno Windels
ced98d02d5
Merge pull request #318 from vector-im/bwindels/avoid_bogus_notifs
opt-out for unread count notifications, which cause bogus notifs
2021-04-07 12:41:28 +00:00
Bruno Windels
141cf95eac some minor TODOs for template view improvements 2021-04-07 14:38:48 +02:00
Bruno Windels
ca9663d2f5 opt-out for unread count notifications, which cause bogus notifs 2021-04-07 14:37:46 +02:00
Bruno Windels
97030f7ef3 add https to homeserver if not already a valid url 2021-04-01 17:44:55 +02:00
Bruno Windels
1505f2d101
Merge pull request #307 from vector-im/hs/deault-hs-url
Allow specifying a custom defaultHomeServer
2021-04-01 13:03:46 +00:00
Bruno Windels
10e9e7388f expose checking pusher on homeserver in setting 2021-04-01 15:01:04 +02:00
Bruno Windels
c06659c0be support checking if pusher is still present on server 2021-04-01 14:59:46 +02:00
Bruno Windels
010b782a96 allow t.map render fn to not return a dom node 2021-04-01 14:59:18 +02:00
Bruno Windels
8894329fa3 don't use url to open room as it still refreshes the page on chrome
even though only the hash is different
2021-03-31 16:52:37 +02:00
Bruno Windels
3767060632 fix reloading or opening wrong page when clicking notif 2021-03-31 16:34:37 +02:00
Will Hunt
6bdf7f1ee9 Allow specifying a custom defaultHomeServer 2021-03-30 17:43:03 +01:00
Johannes Marbach
14ed5fd1e8 Manually adapt UI when keyboard shows or hides on mobile Safari
Mobile Safari seems to be the only browser that does *not* resize the
viewport when the keyboard shows and hides. Instead the window is moved
to make room for the keyboard which moves content at the top off screen.

This uses the VisualViewport API to manually resize the `SessionView`
in response to keyboard display events. Additionally, if a DOM element
exists that has the `bottom-aligned-scroll` CSS class, its scroll
position is retained. Currently this only applies to the `Timeline`.

Note that the VisualViewport API was only introduced with iOS 13.
According to [statista.com], versions below 13 made up for 19% of
all iOS users in summer 2020, with the share continuing to fall off.
As a result, this seems like an acceptable workaround.

Fixes: #181

[statista.com]: https://www.statista.com/statistics/565270/apple-devices-ios-version-share-worldwide/

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2021-03-26 08:29:33 +01:00
Bruno Windels
07fc49e371 Never close notifs unless clicking them as all browsers only seem to show the last one anyway 2021-03-25 11:13:54 +01:00
Bruno Windels
b3680af342 move comment back to right place, and explain we we do it after 2021-03-25 10:23:43 +01:00
Bruno Windels
889ca05506 log when we get a click from a notif without a tag
like when the browser decides to show "site got updated in the
background" notif in response to a unread=0 push message.
2021-03-25 10:11:05 +01:00
Bruno Windels
e54a707684 rework notifications
- we don't close them when receiving a push message without event_id
   as we always need to have a notification open after a push message
   and replacing them with a generic one like we did is worse than just
   leaving it open

 - after the second notification for a room, we just show "New messages"
   and you don't get binged again for new messages after that.

 - You will still have a notification for every room, and on Android
   you will just see the one for the last room as it only shows one
   notification at a time.
2021-03-25 10:08:38 +01:00
Bruno Windels
f98369c4d6 remove obsolete code from refactoring before 2021-03-25 10:07:42 +01:00
Bruno Windels
a70a38f481 focus can throw on Android, wrap it in a try/catch 2021-03-25 10:03:44 +01:00
Bruno Windels
bc763e2a19 fix typo 2021-03-25 10:01:25 +01:00
Bruno Windels
165532be30 add badge icon to notifs 2021-03-25 00:12:57 +01:00
Bruno Windels
0b3f2a7fa0 improve notification click handling
- also here don't use client.url to figure out if a session is open
   as that doesn't work in FF
 - use tag to make sure we're dealing with the right type of notif
 - use findClient function
2021-03-24 15:25:59 +01:00
Bruno Windels
f91abe4301 improve notifications shown
- use event.waitUntil to prevent default notification
 - replace notifications for same room
 - replace notifications when receiving unread=0 with "Read messages"
   to prevent default notification
 - don't rely on client.url to figure out if a room is open as FF
   does not update this field on hash changes.
2021-03-24 15:23:01 +01:00
Bruno Windels
2de61c5928 ask the new version to the new and not old service worker 2021-03-24 15:19:10 +01:00
Bruno Windels
178790d816 symlink service worker for local dev, so its scope captures whole app
also rename service worker (as it is not a template anymore)
2021-03-23 18:20:23 +01:00
Bruno Windels
a8ca82ca4d support running the service worker during local development 2021-03-23 18:20:23 +01:00
Bruno Windels
76fdbbb2fe shorten this 2021-03-23 18:20:23 +01:00
Bruno Windels
d5b12fa7f9 log endpoint hostname 2021-03-23 18:20:23 +01:00
Bruno Windels
3313d0623a thinko with push checks 2021-03-23 18:20:23 +01:00
Bruno Windels
dbddba3691 fix c/p errors when moving code over to notif service 2021-03-23 18:20:23 +01:00
Bruno Windels
725098f262 open client when clicking notification 2021-03-23 18:20:23 +01:00
Bruno Windels
8fcf7f8c7f show notification when receiving push message 2021-03-23 18:20:23 +01:00
Bruno Windels
7b9904e423 add UI in settings for push notifs status/enable/disable 2021-03-23 18:20:23 +01:00
Bruno Windels
630e61a674 support enabling/disabling push notifs on a session 2021-03-23 18:20:23 +01:00
Bruno Windels
f764323c80 fixup: notif service 2021-03-23 18:20:23 +01:00
Bruno Windels
d4fc08c06b put pusher bits in separate class to enable and disable on the HS 2021-03-23 18:20:23 +01:00
Bruno Windels
1b0f175b02 put web-specific parts of notifications (push and in-app) in platform 2021-03-23 18:20:23 +01:00
Bruno Windels
5db3b28e3a
Merge pull request #285 from MidhunSureshR/fix-269
Add previous name in name change announcement
2021-03-23 10:22:02 +00:00
Bruno Windels
95b1804a8d
Merge pull request #287 from Johennes/feature/lightbox
Set explicit height on lightbox container
2021-03-23 10:11:13 +00:00
Johannes Marbach
f496aff478 Set explicit height on lightbox container
Without an explicit height defined on the container, Safari
fails to expand the `.picture` content. On desktop this results
in the image showing too small and at the top of the screen.
On mobile the picture ends up with zero height and is completely
hidden.

This commit fixes the issue by defining a height of 100% on the
`.lightbox` border box.

Fixes: #278

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2021-03-22 14:12:02 +01:00
RMidhunSuresh
3d1ddccbd8 Add previous name in name change announcement
- Fixes issue 269 in which the announcement generated when a member
  changes their name would show as :
  <new_name> changed their name to <new_name>
  instead of:
  <old_name> changed their name to <new_name>

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-03-19 23:28:50 +05:30
RMidhunSuresh
c2df9df6d4 Fix overflowing account chooser label
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-03-19 21:09:03 +05:30
Bruno Windels
f691c0c0ef
Merge pull request #281 from vector-im/bwindels/fix-updates
Fix service worker updates stalling
2021-03-18 19:02:45 +00:00
Bruno Windels
ffdec16076 don't show the update dialog if we open the app for the first time
and don't have a service worker yet
2021-03-18 19:58:50 +01:00
Bruno Windels
017d3818eb always reply here 2021-03-18 19:50:53 +01:00
Bruno Windels
5d71b655ad halt any fetch request while waiting for new service worker to activate
this make updates apply instantly rather than sometimes being stalled
for seconds or minutes.
2021-03-18 19:50:53 +01:00
Bruno Windels
eba4d8a28b improve ergonomics for sub-templates in TemplateView
- renames if to ifView
 - adds map and if that immediately take a sub template render function
   rather than having to call createTemplate
2021-03-18 19:44:59 +01:00
Bruno Windels
1348611f9f also log error messages 2021-03-15 17:18:45 +01:00
Bruno Windels
5d55f6d78c log app version when opening session 2021-03-15 16:55:14 +01:00
Bruno Windels
d88720a18f don't start key backup operation if not enabled 2021-03-15 16:54:43 +01:00
Bruno Windels
2b24de838a actually log initial session backup enabling rather than using null log 2021-03-15 15:24:57 +01:00
Bruno Windels
325d237302 simpler optional log 2021-03-15 15:23:46 +01:00
Bruno Windels
8684d6b5e5 some fixes 2021-03-15 15:23:35 +01:00
Bruno Windels
fcc06b2754 WIP to add logging to decryption and fetching key backups 2021-03-15 14:39:42 +01:00
Bruno Windels
744ac6b885 implement latest api changes in null logger, and add ensureLogItem
to ensure log item either by taking an existing one or taking one
from the null logger
2021-03-15 14:37:46 +01:00
Bruno Windels
f2dc7728a5 notifyRoomKey was a better name 2021-03-15 14:36:38 +01:00
Bruno Windels
96f060c0a9 also retry decryption for backfilled entries
as their event ids won't be stored along the missing key (we only store
synced items so we don't fill up the missing event ids in the store
with undecryptable backfilled event ids)
2021-03-15 14:33:14 +01:00
Bruno Windels
4b62e0a2ce extract retry event ids for key before overwriting key on key backup 2021-03-15 13:38:27 +01:00
Bruno Windels
8100c70e88 fix image uploads being broken 2021-03-11 10:27:50 +01:00
Bruno Windels
9506bf1b81 clean up video upload error handling 2021-03-10 13:43:55 +01:00
Bruno Windels
a672b0c78a better error handling in video decoding 2021-03-10 13:40:11 +01:00
Bruno Windels
e8c8455f43 safari hack/fix 2021-03-10 13:39:58 +01:00
Bruno Windels
948249bb3d better error reporting for unsupported codecs when uploading 2021-03-10 13:39:34 +01:00
Bruno Windels
c8265b2358 also allow other video mime types, otherwise playback fails in e2ee room 2021-03-10 13:39:04 +01:00
Bruno Windels
9bc1d38d73 extract dom event => promise code 2021-03-10 13:38:28 +01:00
Bruno Windels
35e6dffd0b don't rely on mime-types to decide to use main url for thumbnail
so it does not break when clients forget to set the mimetype
2021-03-10 10:01:07 +01:00
Bruno Windels
c6ff56a942 send video messages 2021-03-09 19:35:25 +01:00
Bruno Windels
ee6f3e5457 render video messages 2021-03-09 19:35:10 +01:00
Bruno Windels
b955cac7ce extract base class from image view to inherit video view from 2021-03-09 19:34:22 +01:00
Bruno Windels
299fcfd4d1 extract base class from image tile to inherit from for video tile 2021-03-09 19:33:54 +01:00
Bruno Windels
b4f4594ead
Merge pull request #267 from vector-im/bwindels/fix-223
consider all server errors as connection errors
2021-03-09 11:54:21 +00:00
Bruno Windels
0bd0f788e3 consider all server errors as connection errors
even if they do have an errcode

fixes #223
2021-03-09 12:51:34 +01:00
Bruno Windels
8cd6a7988a on fill server OTKs up to max/2
so we don't remove keys for yet to be received
olm messages that claimed a key
2021-03-09 12:33:31 +01:00
Bruno Windels
0b211e8e1c simplify this code now that it is only doing one thing 2021-03-09 12:27:51 +01:00
Bruno Windels
2d4003379e Fix #97 2021-03-08 22:25:18 +01:00
Bruno Windels
30b056af1c let devices know we can't claim their OTKs 2021-03-08 16:19:46 +01:00
Bruno Windels
30525cf391 oops, missing await to store new olm sessions! 2021-03-08 16:19:28 +01:00
Bruno Windels
a3987a655e log if a connection error is a timeout 2021-03-08 15:35:34 +01:00
Bruno Windels
cfb521ef10 fix ll events being duplicated in the timeline preventing name changes 2021-03-05 20:10:57 +01:00
Bruno Windels
b37a586094 add clarification why this doesn't need to also check member changes 2021-03-05 17:04:18 +01:00
Bruno Windels
f4a7782298 add MemberWriter, and only return MemberChange's if something changed 2021-03-05 17:03:45 +01:00
Bruno Windels
e97ed9ae45 fix session test, just barely 2021-03-05 17:03:12 +01:00
Bruno Windels
49fc971d67 cleanup 2021-03-05 17:02:57 +01:00
Bruno Windels
f98f690b49 no need to "serialize" here every time, it just adds noise 2021-03-05 17:02:26 +01:00
Bruno Windels
4e0bd16a4e reuse LRU Cache for session cache 2021-03-05 17:01:38 +01:00
Bruno Windels
f0c0c3e084 add LRU Cache utility
we'll use it to cache members later on
2021-03-05 17:00:55 +01:00
Bruno Windels
c1c8f11bf7 fix TypeError when syncing a new e2ee room with keys at the same time 2021-03-05 11:50:54 +01:00
Bruno Windels
5682e715e6 prevent multiple checks if a new room key is better 2021-03-05 10:07:48 +01:00
Bruno Windels
d08c41c13a probably best to close this 2021-03-04 22:09:11 +01:00
Bruno Windels
e603e4b455 provide default mimetype so file uploads work on iOS
otherwise homeserverapi doesn't think this is a blob
2021-03-04 21:51:53 +01:00
Bruno Windels
6ad778d27b support file downloads on iOS through data: uris 2021-03-04 21:51:29 +01:00
Bruno Windels
932d26ed8c detect the webkit bug, and await a bogus request when opening a txn 2021-03-04 19:49:13 +01:00
Bruno Windels
e0d14207ac make opening a txn async again
as we'll need to await a bogus request first thing after opening the txn

funny enough, we originally made it sync to accommodate the same bug
in safari, but that didn't prevent any microtask being awaited
before scheduling a request in the calling code closing the txn.

We'll await a bogus request within the transaction class now so it
doesn't depend on the calling code
2021-03-04 19:47:02 +01:00
Bruno Windels
4445b1ee01 store key share operations before tracking the room 2021-03-03 18:56:16 +01:00
Bruno Windels
aa23672694 forgot await, this broke updating the timeline when fetching key backup 2021-03-03 17:50:38 +01:00
Bruno Windels
f5bba54fd4
Merge pull request #255 from vector-im/bwindels/send-local-echo-profile
Show correct profile for pending messages
2021-03-03 13:55:26 +00:00
Bruno Windels
b012b1dc99 Show correct profile for pending messages 2021-03-03 14:53:22 +01:00
Bruno Windels
961d0cb224
Merge pull request #249 from vector-im/bwindels/ui-sent-status
show message already as black when sent but no remote echo yet
2021-03-03 13:08:46 +00:00
Bruno Windels
6771303086 make a method to determine only the retry entries rather 2021-03-03 14:03:50 +01:00
Bruno Windels
404dbcd065 english 2021-03-03 14:03:50 +01:00
Bruno Windels
e7598b9c76 only request key backup for events that are UTD 2021-03-03 14:03:50 +01:00
Bruno Windels
30481a5a9e add logging to key sharing and discarding in reaction to member changes 2021-03-03 14:03:50 +01:00
Bruno Windels
f3c49e51f2 add, don't replace timeline retry entries
also, filter out any that have been decrypted already
2021-03-03 14:03:50 +01:00
Bruno Windels
43547e0901 don't add retried entries to the timeline if they are not already there 2021-03-03 14:03:50 +01:00
Bruno Windels
7f1cdf6841 also decrypt all matching timeline entries when new key 2021-03-03 14:03:50 +01:00
Bruno Windels
3671574547 comment about session backup 2021-03-03 14:03:50 +01:00
Bruno Windels
3bfe52b1dc filter encrypted events before deciding to decrypt or not 2021-03-03 14:03:50 +01:00
Bruno Windels
9702c4fd64 more logging in sync write 2021-03-03 14:03:50 +01:00
Bruno Windels
8d7cb2a39a remove unused imports 2021-03-03 14:03:50 +01:00
Bruno Windels
e85844f482 don't redeclare retryEntries, or they won't get passed to writeSync 2021-03-03 14:03:50 +01:00
Bruno Windels
56db210763 attempt at fixing https://github.com/vector-im/hydrogen-web/issues/245 2021-03-03 14:03:50 +01:00
Bruno Windels
e29bc6710a bring back missing import 2021-03-03 14:03:50 +01:00
Bruno Windels
c6db23bcfb WIP to store missing session event ids 2021-03-03 14:03:50 +01:00
Bruno Windels
3fa2d22015 remove isTimelineOpen flag and rather do the check to verify in Room
flags are ugly, let's avoid them where we can
2021-03-03 14:03:50 +01:00
Bruno Windels
265a9bd993 applyToEntries does not return anything 2021-03-02 19:39:04 +01:00
Bruno Windels
10003e7d3a also sync room not in the rooms section but with new room keys 2021-03-02 19:39:04 +01:00
Bruno Windels
8d080163b3 reattempt decryption for timeline items 2021-03-02 19:39:04 +01:00
Bruno Windels
061e7abd50 don't break on empty room sync response 2021-03-02 19:39:04 +01:00
Bruno Windels
8a39c16a38 fix name conflict with _sessionInfo in parent class 2021-03-02 19:39:04 +01:00
Bruno Windels
a536ea7742 comment to explain replay attack better 2021-03-02 19:39:04 +01:00
Bruno Windels
a33200d926 fix sender key lookup for room key coming from olm 2021-03-02 19:39:04 +01:00
Bruno Windels
fb446167f6 make new sync room keys available during decryption of same sync 2021-03-02 19:39:04 +01:00
Bruno Windels
37151dc06b always log ids, etc in console logger, even if falsy 2021-03-02 19:38:46 +01:00
Bruno Windels
8208464653 only log and clear when actually needed 2021-03-02 19:37:11 +01:00
Bruno Windels
e1821b1753 prevent linking fragment to itself when filling a gap
this seems to happen when at the beginning of the timeline and
make the timeline reader go into an infinite loop
2021-03-02 19:31:00 +01:00
Bruno Windels
6f6346d5c3 detect when hitting beginning of timeline when loading timeline 2021-03-02 19:29:55 +01:00
Bruno Windels
0eb2b4fe6b simplify with toFixed here 2021-03-01 15:07:24 +01:00
Bruno Windels
42654dbd4f console logger for local dev 2021-03-01 15:07:24 +01:00
Bruno Windels
856001160b show message already as black when sent but no remote echo yet 2021-02-26 10:40:08 +01:00
Bruno Windels
636208a321 show all event type counts in device msg logging 2021-02-24 20:56:20 +01:00
Bruno Windels
b43754da6a code is wrong and unused, so delete
it is wrong in the way that it does not always return a string
2021-02-24 15:06:01 +01:00
Bruno Windels
1e209b8613 Prevent pending events being skipped when remote echo comes
This fixes #241
2021-02-24 14:14:04 +01:00
Bruno Windels
139ffc9548 explain sent file names are logged
because they are in the url of the upload request, which we log
2021-02-24 11:30:32 +01:00
Bruno Windels
b63ad629a7 can remove console logging here now 2021-02-24 11:25:26 +01:00
Bruno Windels
48c361531d log clearing unread state of a room 2021-02-24 11:22:19 +01:00
Bruno Windels
376e59820c more info when logging gap fills 2021-02-24 11:22:07 +01:00
Bruno Windels
1093895133 log opening timeline
also load the timeline when opening it in the room, so logging
starts in the room (and we don't need to pass the logger to Timeline)
and also API-wise it makes more sense to
not return uninitialized objects
2021-02-24 11:21:04 +01:00
Bruno Windels
29df61eb8a remove superfluous console log 2021-02-24 10:57:29 +01:00
Bruno Windels
41ecf1db8e missing semicolon 2021-02-24 10:38:19 +01:00
Bruno Windels
ee8886f7c2 serialize child items with parent start offset subtracted
for compactness
2021-02-24 10:37:20 +01:00
Bruno Windels
23b8ba7e54 unused var 2021-02-24 10:14:26 +01:00
Bruno Windels
a372836a64 only create refids when used 2021-02-24 10:14:14 +01:00
Bruno Windels
86011b42e3 await the room log operations for login/load session
so the callee can await the operation
2021-02-24 09:58:50 +01:00
Bruno Windels
0cbf6008a2 log event id when sending and when receiving remote echo on sync 2021-02-23 19:58:01 +01:00
Bruno Windels
7b7907add0 some doc comments for logging api 2021-02-23 19:23:12 +01:00
Bruno Windels
dd38fc13d7 log sending messages 2021-02-23 19:22:59 +01:00
Bruno Windels
57bb75e864 log login & loading a session 2021-02-23 19:22:25 +01:00
Bruno Windels
ef1e867dee no need for keys in the iteration 2021-02-23 19:20:58 +01:00
Bruno Windels
67ddcaa468 fix lint errors in Sync 2021-02-23 19:20:36 +01:00
Bruno Windels
c6c96a611a fix iteration bug when disposing pending events at shutdown
discovered by logging
2021-02-23 19:04:25 +01:00
Bruno Windels
a8df30016b mark force-finished log items when app closes 2021-02-23 15:36:36 +01:00
Bruno Windels
17451b7bd6 fix typo 2021-02-23 15:36:17 +01:00
Bruno Windels
ed1b37d251 support referencing other log items that are detached (fire & forget)
for async tasks that are not awaited
2021-02-23 15:27:55 +01:00
Bruno Windels
b2621b3001
Merge pull request #234 from vector-im/bwindels/sync-logging
Better sync logging
2021-02-22 13:31:34 +00:00
Bruno Windels
0a4d72b011 remove extra newline 2021-02-22 11:23:24 +01:00
Bruno Windels
94cc8b99b0 don't need to check this actually, sync response should be there 2021-02-22 11:21:56 +01:00
Bruno Windels
f0d9d13f4e don't assume device lists are set in sync response 2021-02-22 11:20:51 +01:00
Bruno Windels
3a8badb3e7 also add log method to null logger 2021-02-22 10:48:46 +01:00
Bruno Windels
364295c7a9 don't throw when container is already disposed, just dispose immediately 2021-02-22 10:48:06 +01:00
Bruno Windels
417e920ea0 make log id autoinc 2021-02-22 10:46:40 +01:00
Bruno Windels
656637e5e2 typo 2021-02-19 11:57:50 +01:00
Bruno Windels
f4a3b64da0 log in sync writer (at detail level) and log room ids at info level 2021-02-19 11:57:17 +01:00
Bruno Windels
08622699f6 more logging for device messages 2021-02-18 19:56:47 +01:00
Bruno Windels
c5c0a181ff move check for devicelists up in Session.writeSync, and more logging 2021-02-18 19:56:10 +01:00
Bruno Windels
ad0c813833 don't take network time into account in sync log filter 2021-02-18 19:48:19 +01:00
Bruno Windels
f2f9162b85 log pagehide event 2021-02-18 19:47:16 +01:00
Bruno Windels
bd85dc2393 children is undefined here actually, so filter wasn't working properly 2021-02-18 15:38:32 +01:00
Bruno Windels
cd68bb7b3f log when devices get marked as outdated 2021-02-18 14:00:06 +01:00
Bruno Windels
8539b0c893 also log session in after sync completed as detail level 2021-02-18 13:07:52 +01:00
Bruno Windels
dea11845f5 log encrypted event count in session sync write 2021-02-18 13:07:32 +01:00
Bruno Windels
e590b573fb log remaining specific room entries as detailed 2021-02-18 12:44:19 +01:00
Bruno Windels
9f9de0988e don't log here yet as the logger isn't passed from createIdentity yet 2021-02-18 12:44:19 +01:00
Bruno Windels
7524a912c3 use (t)ype rather than kind 2021-02-18 12:44:19 +01:00
Bruno Windels
f321968ac3 add more sync logging 2021-02-18 12:44:19 +01:00
Bruno Windels
e14929bd4f inherit log level from parent rather than defaulting to info if not set 2021-02-18 12:44:19 +01:00
Bruno Windels
cc916b80de add app version to logs 2021-02-18 12:44:19 +01:00
Bruno Windels
d201d2c9de don't use depth based log filtering, also add Detail log level
it's hard to make it work with an override where you don't want
to filter by depth if a given loglevel is present in the children.
2021-02-18 12:44:19 +01:00
Bruno Windels
d39c3812b2
Merge pull request #231 from vector-im/bwindels/logs
Structured logging
2021-02-17 10:19:46 +00:00
Bruno Windels
5bec4d5a72 comment 2021-02-16 20:05:33 +01:00
Bruno Windels
630ac40f05 this is broken now, but we're not using it anyway, so remove 2021-02-16 20:00:08 +01:00
Bruno Windels
0ccf735148 console log when failing to restore queued items 2021-02-16 19:57:45 +01:00
Bruno Windels
b28eefb2db do emergency serialization without log filter 2021-02-16 19:53:37 +01:00
Bruno Windels
c3637def2e ensure any breakage does not disrupt logging 2021-02-16 18:36:41 +01:00
Bruno Windels
2dd8803efc better error handling if something goes wrong serializing log items 2021-02-16 18:30:23 +01:00
Bruno Windels
338f628627 remove option to anonymize 2021-02-16 18:30:06 +01:00
Bruno Windels
90cfcad5f1 add privacy notice in settings 2021-02-16 18:25:52 +01:00
Bruno Windels
59928432df better logs filename 2021-02-16 17:46:07 +01:00
Bruno Windels
1f91fa9a94 final flush interval 2021-02-16 17:45:47 +01:00
Bruno Windels
e629a93edd delete extra log items when over limit,to not have to delete every flush 2021-02-16 17:45:19 +01:00
Bruno Windels
ee4a382578 revert this back 2021-02-16 15:38:43 +01:00
Bruno Windels
5d67db0c5e Fix NullLogger 2021-02-16 15:35:30 +01:00
Bruno Windels
7dc3707871 add button to export logs 2021-02-16 15:27:24 +01:00
Bruno Windels
48569c28bc serialize logs as json 2021-02-16 15:08:08 +01:00
Bruno Windels
4defbe1322 simplify log filtering, while also adding depth based filtering 2021-02-16 15:07:17 +01:00
Bruno Windels
78805f0a65 implement dynamic log filtering
the logger does not have a base level any more, because there is
no sensible place to configure this.

instead, we allow to dynamically determine what should be logged
after an operation finished by setting the threshold and default
log level inspecting the finished log item.
2021-02-16 11:37:48 +01:00
Bruno Windels
510d5ab2cd add bool settings type 2021-02-12 19:08:13 +01:00
Bruno Windels
704708bd6c add some logging to sync 2021-02-12 18:56:26 +01:00
Bruno Windels
07f8500d29 don't read from settings for now, as it is async 2021-02-12 18:55:37 +01:00
Bruno Windels
1183305d71 wrapLog => run is a better name 2021-02-12 18:36:21 +01:00
Bruno Windels
42780df94f actually track log items, and correctly remove them 2021-02-12 18:36:04 +01:00
Bruno Windels
a53c25d2ae support logging in hsApi 2021-02-12 18:35:33 +01:00
Bruno Windels
e6c108c6e0 no need to copy it over in viewmodel 2021-02-12 18:06:14 +01:00
Bruno Windels
f65db338cf make it work 2021-02-12 18:05:39 +01:00
Bruno Windels
89139bba30 expose some meta data on a log export to show before submitting 2021-02-12 16:08:28 +01:00
Bruno Windels
c0a03858eb add option to anonymize logged values 2021-02-12 16:08:07 +01:00
Bruno Windels
bbab1e9ecc move base64/58 encoding into platform
fixes https://github.com/vector-im/hydrogen-web/issues/99
2021-02-12 16:01:54 +01:00
Bruno Windels
2bb7b3b598 add null logger 2021-02-12 14:06:09 +01:00
Bruno Windels
0763410aa1 filter output when serializing by loglevel 2021-02-12 14:05:51 +01:00
Bruno Windels
4c2abcf9c7 add logger to platform 2021-02-12 13:04:18 +01:00
Bruno Windels
91bd5f638c finish logging api 2021-02-12 13:04:05 +01:00
Bruno Windels
e515548037 add some comments while debugging a problem 2021-02-11 21:08:06 +01:00
Bruno Windels
89599e9f87 WIP 2021-02-11 21:07:18 +01:00
Bruno Windels
e49639fda2 move textencoder/decoder into platform 2021-02-11 17:29:48 +01:00
Bruno Windels
ac1bbb3937 ensure thumbnail dimensions are integer, fixes #203 2021-02-11 11:15:20 +01:00
Bruno Windels
a9a27133b9 fix #204 2020-11-26 09:49:25 +01:00
Bruno Windels
1c4818cf1d prevent a new iframe being created for every download 2020-11-23 10:28:20 +01:00
Bruno Windels
2f0f168c6e show 'sending' while waiting for remote echo for filetile instead of unknown status 2020-11-20 16:38:16 +01:00
Bruno Windels
b7aca076ba better wording 2020-11-20 16:32:33 +01:00
Bruno Windels
7bf02f42b7 don't use grid to put lightbox on top, as it broke again in IE11 2020-11-20 16:32:13 +01:00
Bruno Windels
83d54351b1 put spacer behind rather than before link to open lightbox 2020-11-20 16:14:32 +01:00
Bruno Windels
45dd539179 also update preference onchange for IE 2020-11-20 16:06:16 +01:00
Bruno Windels
3eec897630 better wording 2020-11-20 16:06:05 +01:00
Bruno Windels
9ab81eea02 add setting for image compression level 2020-11-20 15:51:16 +01:00
Bruno Windels
764cddcdec can be cached 2020-11-20 11:45:38 +01:00
Bruno Windels
f7a07a9e79 adjust fileview/tile to pendingevent changes 2020-11-20 11:45:14 +01:00
Bruno Windels
628a3b65c6 cancel > remove 2020-11-19 15:02:59 +01:00
Bruno Windels
8b8d06cf3e show error for attachments still need upload but missing after refresh 2020-11-19 14:42:29 +01:00
Bruno Windels
18407e17a8 toggle popup menu 2020-11-18 20:18:09 +01:00
Bruno Windels
59a92bdf97 vm changes for improved image view 2020-11-18 20:10:05 +01:00
Bruno Windels
0581066350 upload smallest attachments first
so you don't get a delay at the end of the upload
when starting a new request
2020-11-18 20:09:27 +01:00
Bruno Windels
a23075a326 make safe to call when no attachments present 2020-11-18 20:09:07 +01:00
Bruno Windels
fba5877b3b dispose attachment blobs when pending event is removed/closing session 2020-11-18 20:08:42 +01:00
Bruno Windels
f6dbb23f79 better error handling for file and picture upload 2020-11-18 20:07:31 +01:00
Bruno Windels
47147f2d46 progress bar for upload, add cancel button, no lightbox while uploading 2020-11-18 20:06:34 +01:00
Bruno Windels
6f94ca1a4a make toBlob work on IE11 2020-11-18 16:28:48 +01:00
Bruno Windels
a930dec8db adjust ImageTile to state machine changes 2020-11-18 13:05:10 +01:00
Bruno Windels
fd81111bfb merge state machine from AttachmentUpload into PendingEvent
to have less state machines, and we are mostly interested in the
aggregate status of all attachments of an event

this will also drive updates through the pending events collection
that already exists rather than an extra observablevalue, so less
housekeeping to update the UI.
2020-11-18 13:04:23 +01:00
Bruno Windels
91f7970d66 Merge branch 'master' into bwindels/upload-images 2020-11-16 19:31:04 +01:00
Bruno Windels
ca7c07a23c fix #200 2020-11-16 19:29:51 +01:00
Bruno Windels
d1a95c664d require space after /me 2020-11-16 19:29:29 +01:00
Bruno Windels
671e23a123 basic reporting of image upload progress in % 2020-11-16 15:10:44 +01:00
Bruno Windels
6bd777e7be make sure cors errors on setting headers don't fail sending the request 2020-11-16 15:10:25 +01:00
Bruno Windels
83cbe78cd6 report attachment upload progress 2020-11-16 10:45:46 +01:00
Bruno Windels
1dd46b875b this is fine actually, as it will get encrypted.
just don't pass it to the upload
2020-11-13 19:22:06 +01:00
Bruno Windels
41738ad660 local echo for image tiles 2020-11-13 19:15:21 +01:00
Bruno Windels
8b82c991e7 wire up image uploads 2020-11-13 19:15:03 +01:00
Bruno Windels
41fb3e742e fix file upload attachment api changes 2020-11-13 19:13:35 +01:00
Bruno Windels
0292725076 better formatting 2020-11-13 19:10:18 +01:00
Bruno Windels
262cc8936e don't leak mimetype for encrypted attachments 2020-11-13 19:10:04 +01:00
Bruno Windels
96e46d154c copyright header for legacy platform 2020-11-13 19:05:09 +01:00
Bruno Windels
791b3ae04f don't center align link buttons (while at it) 2020-11-13 19:04:46 +01:00
Bruno Windels
d2a4242e5b support multiple attachments per event 2020-11-13 17:19:19 +01:00
Bruno Windels
14b3c4b701 no need for a dedicated class just to hide it 2020-11-13 16:00:32 +01:00
Bruno Windels
9bb521986b first draft of generic popup and menu views 2020-11-13 15:58:40 +01:00
Bruno Windels
6fd10b63e5 add device pixel ratio scaling while at it 2020-11-12 13:50:32 +01:00
Bruno Windels
1ad8af34d1 add thumbnailing code 2020-11-12 13:50:06 +01:00
Bruno Windels
f23312b0d3 fix decrypt/encrypt wording in error message 2020-11-11 13:17:05 +01:00
Bruno Windels
8b16d8bc99 handle upload failures better 2020-11-11 13:06:03 +01:00
Bruno Windels
d477be2b41 put paperclip in send file button 2020-11-11 12:57:43 +01:00
Bruno Windels
6384702863 fix file selector for IE11 2020-11-11 12:47:26 +01:00
Bruno Windels
8db7499f5a support AES-CTR 256 JWK keys in legacy crypto for IE11 2020-11-11 12:44:59 +01:00
Bruno Windels
fd9eccec4d support local echo in FileTile while uploading 2020-11-11 11:52:06 +01:00
Bruno Windels
af4f3f902f wait for attachment to be uploaded in send queue
also expose attachment from PendingEvent(Entry)
2020-11-11 11:51:39 +01:00
Bruno Windels
48cd4ac95d track upload error 2020-11-11 11:51:11 +01:00
Bruno Windels
91f15074be /upload is on /media/r0, not /client/r0 2020-11-11 11:50:40 +01:00
Bruno Windels
366f3c0bba iv and digest are sent in unpadded base64 2020-11-11 11:50:20 +01:00
Bruno Windels
e9324ad678 support jwk keys to encrypt 2020-11-11 11:47:39 +01:00
Bruno Windels
e2dd9b9f77 fix typos/refactor errors 2020-11-11 11:47:13 +01:00
Bruno Windels
65d02072c8 hook up UI 2020-11-11 11:47:05 +01:00
Bruno Windels
7088b2cdc8 support attachment upload and sending from room api 2020-11-11 10:47:55 +01:00
Bruno Windels
0c70a67ebb pass platform to room
as we'll need it to access crypto and creating blobs
2020-11-11 10:47:19 +01:00
Bruno Windels
c289bcd097 return blob from encryptAttachment 2020-11-11 10:46:37 +01:00
Bruno Windels
32b7b1f064 draft of AttachmentUpload class 2020-11-11 10:46:20 +01:00
Bruno Windels
2890a6aff7 implement attachment uploading in hs api rather than media repo
as we need the access token
2020-11-11 10:45:44 +01:00
Bruno Windels
9f2c7c1e32 support uploading blobs in hs api 2020-11-11 10:45:23 +01:00
Bruno Windels
c278b0f4a3 rename blob.blob to blob.nativeBlob
also to make the name a bit more unique where we want to do duck typing
2020-11-11 10:44:44 +01:00
Bruno Windels
2cfffa015d WIP 2020-11-10 22:36:26 +01:00
Bruno Windels
a37d8c0223 implement AES encryption 2020-11-10 19:48:36 +01:00
Bruno Windels
c65e8bea11 clean up properly 2020-11-10 19:05:50 +01:00
Bruno Windels
d14f485292 Merge branch 'master' into bwindels/file-downloads 2020-11-10 18:55:27 +01:00
Bruno Windels
2ad34c2dd2 c/p error for passing arguments to create_outbound 2020-11-10 18:31:33 +01:00
Bruno Windels
f5480b7708 provide random value for IE11 2020-11-10 18:31:18 +01:00
Bruno Windels
ba323c65d6 fix typo in name 2020-11-10 18:30:48 +01:00
Bruno Windels
6fa9471292 remove trailing whitespace 2020-11-10 17:51:39 +01:00
Bruno Windels
2d8000d11d file tile view 2020-11-10 17:50:53 +01:00
Bruno Windels
a3ca0feda9 file tile view model 2020-11-10 17:50:38 +01:00
Bruno Windels
21a7ec0dff byte size formatting 2020-11-10 17:50:20 +01:00
Bruno Windels
373a42c7a8 allow downloading plaintext attachments also, with or without cache 2020-11-10 17:49:48 +01:00
Bruno Windels
4477073d6d add platform method to offer saving a buffer handle 2020-11-10 17:24:30 +01:00
Bruno Windels
de143fdafc update timestamp when creating a new megolm session 2020-11-10 16:17:56 +01:00
Bruno Windels
a4f610ad3f support emotes 2020-11-10 15:13:31 +01:00
Bruno Windels
1c978f060e
Merge pull request #182 from Newbytee/submit-for-login
Use submit event for login instead of click
2020-11-10 14:09:56 +00:00
Bruno Windels
e4fa4ded6c hide clear button in composer on IE 2020-11-10 14:02:37 +01:00
Bruno Windels
769feac73c cleanup 2020-11-10 14:02:27 +01:00
Bruno Windels
fd498b3d24 no need to keep track of promise, fn is internally rate-limited now 2020-11-10 14:02:07 +01:00
Bruno Windels
89c66699d7 some Lock refactoring that I didn't end up needing but still useful 2020-11-10 11:04:53 +01:00
Bruno Windels
f13f1cd593 prevent leaking resources in olm worker 2020-11-10 11:04:39 +01:00
Bruno Windels
5f6ad91ff2 offload creating an olm session to the olm worker
so IE11 doesn't lock up when you start typing
2020-11-10 11:04:09 +01:00
Bruno Windels
bd5771e449 remove obsolete comment 2020-11-09 17:22:37 +01:00
Bruno Windels
6572377832 move tracking the room to where we need the devices 2020-11-09 16:50:39 +01:00
Bruno Windels
9cfb3c8e95 only check to pre-share new megolm session every minute 2020-11-09 16:50:05 +01:00
Bruno Windels
44a2febce9 hook it up 2020-11-06 23:43:02 +01:00
Bruno Windels
c6ff4c2517 finish room encryption part 2020-11-06 18:56:32 +01:00
Bruno Windels
d0d1f68a9c WIP 2020-11-06 16:56:12 +01:00
Bruno Windels
5d12aef6db support pre-sharing room keys in room encryption 2020-11-06 10:32:37 +01:00
Bruno Windels
85ba1676e5 log non-network errors in service worker to diagnose #187 2020-11-05 22:51:21 +01:00
Bruno Windels
9708e394a0 don't assume the thumbnail was cached already 2020-11-05 22:45:20 +01:00
Bruno Windels
e0c8be3a9a try to call out when #187 happens 2020-11-05 22:41:33 +01:00
Bruno Windels
c696a75f88 fix #177 2020-11-05 22:37:39 +01:00
Bruno Windels
16542284f3 fix #48 2020-11-05 21:24:14 +01:00
Bruno Windels
b8370d53b6 always throw here so we never get to Ready status when stopped 2020-11-05 21:22:29 +01:00
Bruno Windels
134f018849 always have an error when stopping sync 2020-11-05 21:21:27 +01:00
Bruno Windels
9f453c0984 fix #152 2020-11-05 21:19:34 +01:00
Bruno Windels
b27f6a067f implement .size for all observable maps
as SortedMapList uses it, putting undefined in its list
initially when missing, creating a crash in
the TemplateView that renders it
2020-11-05 12:00:17 +01:00
Newbyte
e112e9c2d2 Use submit event for login trigger
Signed-off-by: Newbyte <newbie13xd@gmail.com>
2020-11-05 11:21:04 +01:00
Newbyte
3ab70861cc Add form to element list
Signed-off-by: Newbyte <newbie13xd@gmail.com>
2020-11-05 11:21:04 +01:00
Bruno Windels
0003ddebb5 also fix grid layout 2020-11-03 09:12:11 +01:00
Bruno Windels
9131cf00a3 load images when they becomes partly into view 2020-11-02 14:49:59 +01:00
Bruno Windels
72fdce4a86 fix broken layout after changing to grid 2020-11-02 14:15:24 +01:00
Bruno Windels
a3ec01385b
Merge pull request #178 from vector-im/bwindels/lightbox
Lightbox for picture messages
2020-11-02 11:23:10 +00:00
Bruno Windels
f1b557f995 add comment 2020-11-02 11:29:22 +01:00
Bruno Windels
fd28b39e23 fix spacing between spinner and loading text in lightbox 2020-11-02 11:29:09 +01:00
Bruno Windels
7e9e937742 IE11 doesn't calculate padding percentages based on parent width in grid
so do progressive fallback. This won't scale the height of the
image tile height, but it will still scale the thumbnail
on narrow viewports, leaving a blank space underneath the image.
2020-11-02 11:16:35 +01:00
Bruno Windels
fbbdaf7dfa expose IE11 flag in JS as well 2020-11-02 11:16:19 +01:00
Bruno Windels
57da68fb1e padding for lightbox 2020-10-31 00:25:51 +01:00
Bruno Windels
4d08e415bd fallback for IE11 2020-10-31 00:25:42 +01:00
Bruno Windels
8507a3eb16 prevent jumps when image loads by adding a spacer 2020-10-31 00:25:05 +01:00
Bruno Windels
5aa2c7dc5c dom changes for timeline image view 2020-10-30 22:52:54 +01:00
Bruno Windels
5a31bc5f2b basic focus trapping of lightbox 2020-10-30 22:52:32 +01:00
Bruno Windels
708893022a use justify/align-self rather than auto margins, works better in IE11 2020-10-30 22:52:08 +01:00
Bruno Windels
a21765757d don't use position: absolute for scaling images in the timeline
as it bleeds through the lightbox on IE11, and is a bad idea anyway
2020-10-30 22:51:57 +01:00
Bruno Windels
581dc95c53 allow adding custom event handlers to a template view
so you don't have to remove them yourself
2020-10-30 22:48:56 +01:00
Bruno Windels
c847cfb200 WIP: Esc key on lightbox 2020-10-30 19:59:42 +01:00
Bruno Windels
597a57eae3 too much whitespace 2020-10-30 19:59:21 +01:00
Bruno Windels
c9147e6b9a implement first draft of image lightbox 2020-10-30 15:20:11 +01:00
Bruno Windels
137264edcb implement subscribing to a single event 2020-10-30 15:19:51 +01:00
Bruno Windels
7d81306a49 return BufferHandles from the media repository
BufferHandles are platform specific handles to a buffer. On web,
they have a .blob and .url property.
2020-10-30 15:18:27 +01:00
Bruno Windels
0691f34650 detect abort error by name here too 2020-10-30 09:55:03 +01:00
Bruno Windels
3008367307 detect AbortError properly, name is a string 2020-10-30 09:54:38 +01:00
Bruno Windels
68a0dd30ca add lightbox navigation and basic view & view model 2020-10-29 11:12:32 +01:00
Bruno Windels
fe6e4464fd pass all viewmodel options to tile view models 2020-10-29 11:10:34 +01:00
Bruno Windels
d7ccdd3304 switch main layout from flexbox to grid so we can overlay a lightbox 2020-10-29 11:10:34 +01:00
Bruno Windels
862a0ba56b show image decryption error 2020-10-29 10:29:08 +01:00
Bruno Windels
d1e78a735a show error in label for now 2020-10-29 10:18:05 +01:00
Bruno Windels
0405af0116 disable click-to-zoom on image
so we can release before the lightbox ix ready
2020-10-29 10:17:19 +01:00
Bruno Windels
b69464b87d improve picture styling 2020-10-27 16:47:22 +01:00
Bruno Windels
d55f38a9e9 don't reimplement removing an item from the list 2020-10-27 16:26:45 +01:00
Bruno Windels
97c3a4b8f3 store error when loading encrypted images 2020-10-27 16:21:08 +01:00
Bruno Windels
e7ff6decbf remove unneeded quotes 2020-10-27 16:20:41 +01:00
Bruno Windels
c9efee77f2 if shape is update and item should be different view, recreate the tile 2020-10-27 16:20:04 +01:00
Bruno Windels
77dca5dd55 add update parameter when replacing tile 2020-10-27 16:19:36 +01:00
Bruno Windels
932542bea0 some more cleanup 2020-10-27 14:35:47 +01:00
Bruno Windels
fcc4c21ad2 filter mime types for blob urls 2020-10-27 14:35:33 +01:00
Bruno Windels
ade01f6cf7 space 2020-10-27 13:51:40 +01:00
Bruno Windels
2ebce8eb7b set responseType after calling open 2020-10-27 13:50:09 +01:00
Bruno Windels
a61d7fc68a jwk key support for aesjs 2020-10-27 13:21:12 +01:00
Bruno Windels
a3aa25449b make it work with xhr 2020-10-26 17:37:32 +01:00
Bruno Windels
ee1e62207c apply platform changes to decrypting images 2020-10-26 17:18:17 +01:00
Bruno Windels
3ed5ea8b0b Merge branch 'master' into bwindels/decrypt-images 2020-10-26 17:08:29 +01:00
Bruno Windels
98be9a8f4d fix legacy spinner 2020-10-26 16:44:12 +01:00
Bruno Windels
1a518cdd28 more refactor fixes 2020-10-26 16:31:30 +01:00
Bruno Windels
03351d2e1f extract platform class to put all platform specific code in 2020-10-26 15:44:11 +01:00
Bruno Windels
46fd769dda (re)move old (compile-time) platform code 2020-10-26 10:34:35 +01:00
Bruno Windels
06e4dea590 move ui and dom under platform/web 2020-10-26 10:28:11 +01:00
Bruno Windels
2e0d1363c7 fix 2020-10-26 10:16:23 +01:00
Bruno Windels
a6224135e3 extract blob url code to platform (WIP) 2020-10-26 10:14:46 +01:00
Bruno Windels
4fd71279cf don't disable cache for media repository downloads 2020-10-26 09:58:39 +01:00
Bruno Windels
cbd48aa528 only load main image when clicking thumbnail 2020-10-26 09:49:42 +01:00
Bruno Windels
6a468a0883 decrypt attachment code 2020-10-23 17:45:15 +02:00
Bruno Windels
3a6268f0c1 basic PoC of image decryption working
needs looooaaads of cleanup still
2020-10-23 17:25:11 +02:00
Bruno Windels
f214c53fa9 add @internal and other comments to Session 2020-10-23 12:59:40 +02:00
Bruno Windels
62c8d6574c fix index.html not being restored from cache when offline on #hash url 2020-10-23 12:58:45 +02:00
Bruno Windels
df8eed14aa expose whether we already have a 4s key,to show the 4s setup in settings
it's a tri-state of null/false/true with null meaning we need to
go online first to know as only then we try to setup session backup
2020-10-23 12:57:47 +02:00
Bruno Windels
df72e829bf setup session backup as part of start method, so we know we're online
also don't upload OTKs in case of existing account until
catchup sync has happened
2020-10-23 12:22:52 +02:00
Bruno Windels
f1aef6c034 render should return nodes otherwise the mapView binding doesn't work
this broke e2ee messages appearing when decrypted
2020-10-21 12:10:42 +02:00
Bruno Windels
7459985e00 show storage usage in settings 2020-10-20 17:50:43 +02:00
Bruno Windels
545a2e481a prevent cached thumbnails from being opaque responses
fixes https://github.com/vector-im/hydrogen-web/issues/169
2020-10-20 17:28:42 +02:00
Bruno Windels
a7a922680d request persisted storage when logging in/restoring a session 2020-10-20 17:02:34 +02:00
Bruno Windels
2b93d50396 dont crash when value is undefined 2020-10-20 16:51:51 +02:00
Bruno Windels
4dd303e558 remove unused code 2020-10-20 15:29:36 +02:00
Bruno Windels
1e1b254678 adjust prop names 2020-10-20 15:26:22 +02:00
Bruno Windels
601bdbb25d make session backup banner dismissable 2020-10-20 14:42:17 +02:00
Bruno Windels
446d30469b improve wording and cleanup 2020-10-20 12:12:07 +02:00
Bruno Windels
98d7ffe87c add button to set up field 2020-10-20 12:11:58 +02:00
Bruno Windels
16e0f515dc make text not sprawl across screen on large monitors 2020-10-20 12:10:56 +02:00
Bruno Windels
6f09bd97b6 move setting view models in own dir / file 2020-10-20 12:10:41 +02:00
Bruno Windels
6f82d81f39 better session backup ui 2020-10-19 18:29:13 +02:00
Bruno Windels
d3b7d176b8 extract SettingsView into own file
also fix some copyright attributions
2020-10-19 14:55:01 +02:00
Bruno Windels
1fe3f646dc further style settings page 2020-10-19 14:53:05 +02:00
Bruno Windels
d8f8342a10 make middle panel responsive styling + hide back b. + header css generic 2020-10-19 14:52:18 +02:00
Bruno Windels
1e599be142 Merge branch 'master' into bwindels/settings-screen 2020-10-19 13:45:17 +02:00
Bruno Windels
6bf8e976cb don't assign timelineVM before loaded, so prop doesn't return it
... if the binding happens to be evaluating (which it was during mount)

follow-up from bwindels/fix-crash-switch-rooms-too-fast
2020-10-19 13:39:19 +02:00
Bruno Windels
f07b4a6554
Merge pull request #167 from vector-im/bwindels/fix-redirects
Fix back button not working when changing rooms
2020-10-19 11:01:07 +00:00
Bruno Windels
cdcdc07c06 fix a crash when switching rooms before the messages have loaded
as we were not disposing the timeline view model
(but still not leaking though)
2020-10-19 12:57:21 +02:00
Bruno Windels
8357260133 fix an applying an url also pushing a copy of the url back on history
it should replace instead, as it is a redirect
2020-10-19 12:55:42 +02:00
Bruno Windels
fb273782bf use handleEvent in History so we don't have to bind 2020-10-19 12:55:10 +02:00
Bruno Windels
3e34ccb7e1 rename, I think, last occurrence of brawl to hydrogen 👋 2020-10-19 12:52:57 +02:00
Bruno Windels
db102e63d2 Merge branch 'master' into bwindels/settings-screen 2020-10-19 10:13:41 +02:00
Bruno Windels
90910dae15 render multiline messages with br's 2020-10-19 10:00:32 +02:00
Bruno Windels
4828e141c9 add br tag to html template 2020-10-19 10:00:18 +02:00
Bruno Windels
efe6956a79 support render method and value in StaticView 2020-10-19 09:59:56 +02:00
Bruno Windels
974f77a71d WIP 2020-10-16 18:06:20 +02:00
Bruno Windels
90435a8fb7 semicolons, add them 2020-10-16 15:48:49 +02:00
Bruno Windels
e599d8b6fa also clear 2020-10-16 15:47:13 +02:00
Bruno Windels
74e6d018f4 ensure url creation does not race on the current path of the navigation 2020-10-16 15:46:06 +02:00
Bruno Windels
0ca926d427 claim clients immediately from service worker 2020-10-16 14:52:34 +02:00
Bruno Windels
743cdd0bea safari is tooo fast and skips it when it shouldn't
also, I've never had the registration fail, seems very unlikely
2020-10-16 13:26:19 +02:00
Bruno Windels
c125335ef0 undo debug squibels 2020-10-16 13:03:16 +02:00
Bruno Windels
5a30855227 rename urlRouter option in view models to urlCreator 2020-10-16 13:02:21 +02:00
Bruno Windels
0d622164df close session db in other tabs when opening 2020-10-16 12:50:37 +02:00
Bruno Windels
fc61729cb3 support closing session in other clients in service worker 2020-10-16 12:50:19 +02:00
Bruno Windels
101c7015f2 move service worker code in bundle, and support closing sessions 2020-10-16 12:49:42 +02:00
Bruno Windels
788bce7904 reduce navigation boilerplate
this makes the url router adjust the url when the navigation path is
changed, instead of doing urlRouter.applyUrl() and
urlRouter.history.pushUrl().

This history field and applyUrl method on URLRouter are now private,
as the URLRouter should only be used to generate urls you want to
put in an <a href="..."></a>, anything else should use navigator.push()
2020-10-16 12:46:14 +02:00
Bruno Windels
ddf7d01760 WIP working 2020-10-15 21:35:10 +02:00
Bruno Windels
3aa1992a3f WIP of messaging to sw 2020-10-15 19:12:16 +02:00
Bruno Windels
6b15e7e3ba remove extra newline 2020-10-15 15:58:59 +02:00
Bruno Windels
5fcf8022a1 store the url on every change, as PWAs don't trigger beforeunload ...
... when (force) closed
2020-10-14 15:30:40 +02:00
Bruno Windels
3d8dfc9635 also show grid layout in mobile layout, just in case of restoring url 2020-10-14 15:29:51 +02:00
Bruno Windels
7c2fc516bb restore last url if not providing a specific one on startup 2020-10-14 15:10:32 +02:00
Bruno Windels
19e774ce01 don't assume grid button is a button, just in case 2020-10-14 14:54:56 +02:00
Bruno Windels
4f46854362 add close session button 2020-10-14 14:54:46 +02:00
Bruno Windels
d96f8adcc7 fix back button in room header not working 2020-10-14 14:53:52 +02:00
Bruno Windels
cf99f55f3d fix typo making the room list not shown on the mobile layout 2020-10-14 14:20:53 +02:00
Bruno Windels
fd1df595c8 remove leftover logging 2020-10-14 14:06:11 +02:00
Bruno Windels
8122d76e73 Merge branch 'master' into bwindels/url-routing 2020-10-14 12:45:49 +02:00
Bruno Windels
b00db1af3e only keep 20 outbound olm sessions in memory at once to prevent OOM 2020-10-14 12:44:27 +02:00
Bruno Windels
07701117cd reduce megolm sync cache size to 1 session
as this is kept around for every e2ee room, and we only have
limited olm memory
2020-10-14 12:43:35 +02:00
Bruno Windels
6ad7be8726 fix leaking left panel view model after closing session 2020-10-14 11:34:34 +02:00
Bruno Windels
de83d7740b replace custom error view with staticview 2020-10-14 11:26:39 +02:00
Bruno Windels
fa8bec0b56 fix room view model being leaked when closing session 2020-10-14 11:26:10 +02:00
Bruno Windels
b29b776e9f fix olm session cache being leaked when closing session 2020-10-14 11:25:49 +02:00
Bruno Windels
789a41c671 fix styling for session info entries 2020-10-14 10:34:25 +02:00
Bruno Windels
692fa808e4 make utility buttons also useable for links 2020-10-14 10:34:11 +02:00
Bruno Windels
7e477b3c8d rename button.styled to .button-action so it can also be used for links 2020-10-14 10:33:48 +02:00
Bruno Windels
5fe479e8a9 fix styling for room list items 2020-10-14 10:20:20 +02:00
Bruno Windels
3d327b0875 also open the initial room in the room list 2020-10-14 10:20:00 +02:00
Bruno Windels
2333a959a2 actually apply the /session/<id> url after login! 2020-10-13 17:10:28 +02:00
Bruno Windels
ab354e9f38 update prop type 2020-10-13 15:19:54 +02:00
Bruno Windels
afbfb0c82c anticipate non-found rooms 2020-10-13 15:18:13 +02:00
Bruno Windels
081820d8fb also update view when going to an not-found room 2020-10-13 15:14:07 +02:00
Bruno Windels
a14795e3f8 unused 2020-10-13 15:05:11 +02:00
Bruno Windels
d1d675ed7a make navigation observables already return new value before they emit 2020-10-13 14:54:57 +02:00
Bruno Windels
7f3e0f237b also do redirect after initial navigation 2020-10-13 14:43:45 +02:00
Bruno Windels
1780f334ea more tests 2020-10-13 13:13:47 +02:00
Bruno Windels
d9c8a6339e support empty strings for rooms segment 2020-10-13 13:13:35 +02:00
Bruno Windels
7b13e45e19 fix creating the rooms segment 2020-10-13 13:13:15 +02:00
Bruno Windels
a360d0a2b9 also unset room vm if moving away from room 2020-10-13 13:12:49 +02:00
Bruno Windels
379d65edf1 also create new vm when coming for grid if transfering vm fails 2020-10-13 13:12:30 +02:00
Bruno Windels
77a58041eb clean-up room grid initialization with vm transfering
also handle duplicate rooms, and add unit tests for grid vm
2020-10-13 13:11:19 +02:00
Bruno Windels
c8dd7b42e7 encountered this very unlikely race while testing, so prevent it 2020-10-13 13:10:35 +02:00
Bruno Windels
db5c98a706 support reassigning to null from untrack 2020-10-13 13:10:27 +02:00
Bruno Windels
4e8e9eae26 first round of fixes 2020-10-12 18:31:55 +02:00
Bruno Windels
14d2dcbc60 remove dead code 2020-10-12 17:49:41 +02:00
Bruno Windels
b2d6b7014b first draft of url navigation for grid 2020-10-12 17:49:06 +02:00
Bruno Windels
6c2c29a7da WIP 2020-10-09 19:43:11 +02:00
Bruno Windels
83ac3eccc5 apply url changes to view gallery 2020-10-09 17:04:25 +02:00
Bruno Windels
56e51fc2aa idea comment 2020-10-09 17:04:17 +02:00
Bruno Windels
927e8134d3 use url navigation in root view model
also track all view models as it is
important everything is properly disposed now
2020-10-09 17:03:38 +02:00
Bruno Windels
33627edcb3 use url to go back in login view 2020-10-09 17:03:24 +02:00
Bruno Windels
35e85c55e0 use urls instead of callbacks to navigate in session picker 2020-10-09 17:03:13 +02:00
Bruno Windels
7b86b483ed confirm before clearing 2020-10-09 17:02:19 +02:00
Bruno Windels
3ab68ef438 throw when something tracked is not disposable, fail early 2020-10-09 17:01:54 +02:00
Bruno Windels
1289f065d6 implement root view as template view 2020-10-09 17:01:39 +02:00
Bruno Windels
0f8f558889 dispose session container from view model 2020-10-09 17:01:22 +02:00
Bruno Windels
d48bbd122a make applyUrl and history public
so we don't need to bother with silent flags in replaceUrl
2020-10-09 17:00:19 +02:00
Bruno Windels
35b83b7976 make SessionLoadViewModel transfer ownership of container with callback
also, deleting the session when navigating away is now done by
LoginViewModel
2020-10-09 16:59:34 +02:00
Bruno Windels
4ae622bdd3 make pushUrl silent again 2020-10-09 16:58:53 +02:00
Bruno Windels
41c1c9a6c3 rename Brawl -> Root
one of the last occurrences of brawl
2020-10-09 09:59:59 +02:00
Bruno Windels
c9bb18b87e make loading screen a bit prettier
by wrapping it in a view with common pre-session chrome

this renames the existing SessionLoadView to SessionLoadStatusView
so we can call the wrapper the former.
2020-10-09 09:58:00 +02:00
Bruno Windels
696e7856f8 some cleanup 2020-10-09 09:56:01 +02:00
Bruno Windels
da9798979c Merge branch 'master' into bwindels/url-routing 2020-10-09 09:30:38 +02:00
Bruno Windels
24690f8035 fix placeholder not being hidden in mobile layout 2020-10-09 09:30:06 +02:00
Bruno Windels
0d54f88670 early draft of showing load progress of a session loaded through url 2020-10-08 18:23:53 +02:00
Bruno Windels
00bd4364f0 early draft of loading session via url scheme 2020-10-08 18:23:37 +02:00
Bruno Windels
087aff4ef4 set to true if undefined passed in as well 2020-10-08 18:23:08 +02:00
Bruno Windels
4fe971775c more url router work, differentiate between path and url
rename hashobservable to history
2020-10-08 18:22:36 +02:00
Bruno Windels
547241f577 Merge branch 'master' into bwindels/url-routing 2020-10-08 16:42:14 +02:00
Bruno Windels
ca0f8fd142 leave some space between room list tile and edge 2020-10-08 16:37:24 +02:00
Bruno Windels
5c2425796c Merge branch 'master' into bwindels/url-routing 2020-10-08 16:33:19 +02:00
Bruno Windels
cb0ef1a1ae this makes the caret huge on gnome web 2020-10-08 16:29:38 +02:00
Bruno Windels
35832e387a Swap grid tile description based on focus
swap RoomPlaceholderView for generic StaticView
2020-10-08 16:14:59 +02:00
Bruno Windels
93e301e4fa fix spinner margins 2020-10-08 15:53:12 +02:00
Bruno Windels
4783e03871 fix room header margin issue with hidden back button 2020-10-08 15:21:16 +02:00
Bruno Windels
868b1a1045 style composer 2020-10-08 15:20:52 +02:00
Bruno Windels
59802d1812 style room header 2020-10-08 15:00:20 +02:00
Bruno Windels
2cbe349a4d don't read private parts 2020-10-08 14:21:34 +02:00
Bruno Windels
5c299c1db9 remove prefixes now we auto prefix 2020-10-08 14:18:48 +02:00
Bruno Windels
47a43869e6 fix grid layout in IE 11
this brings back index addressing rather than x y in the grid vm,
as we need to have a css class for every position for IE 11,
as we can't use css variables and autoprefixer can
translate grid-areas
2020-10-08 14:17:43 +02:00
Bruno Windels
c4cfb6f6d1 align left panel to 4px grid better, and simply margins 2020-10-08 10:29:30 +02:00
Bruno Windels
fd4b3d238f increase click area of clear filter button, add search icon 2020-10-08 10:13:05 +02:00
Bruno Windels
c2eebb9af2 prevent filter field and composer breaking narrow layouts 2020-10-08 10:11:12 +02:00
Bruno Windels
e80f37603b prevent breaking narrow layouts with inputs 2020-10-08 10:10:39 +02:00
Bruno Windels
26112fe3de update grid icons 2020-10-08 10:10:03 +02:00
Bruno Windels
dafa995429 placeholder does not count as room shown 2020-10-07 18:00:07 +02:00
Bruno Windels
b79b41adcd keep focused class 2020-10-07 17:59:58 +02:00
Bruno Windels
c80c369c42 prevent grid item from growing to max content height 2020-10-07 17:59:40 +02:00
Bruno Windels
bd959bc147 style grid button 2020-10-07 17:59:28 +02:00
Bruno Windels
ddda03d82c style filter field and grid button 2020-10-07 17:59:14 +02:00
Bruno Windels
61b5369f2f also show status view a bit lower for grid 2020-10-07 14:53:41 +02:00
Bruno Windels
f6d9ffa7bb friends don't read each others private properties 2020-10-07 14:36:08 +02:00
Bruno Windels
46b24c3f24 fix room not changing when not in grid view 2020-10-07 14:32:57 +02:00
Bruno Windels
537972b97b clarify comment 2020-10-07 14:25:32 +02:00
Bruno Windels
de14d6b54b fix filter field taking up too much width 2020-10-07 14:22:14 +02:00
Bruno Windels
152a83f75f css for the grid view 2020-10-07 14:22:00 +02:00
Bruno Windels
99ff387dec index the room by x,y instead of index from the view
so it is easier to implement a focus-ring as a separate dom node
2020-10-07 14:18:35 +02:00
Bruno Windels
b9d2da736a when opening room, focus in grid if already open 2020-10-07 13:18:19 +02:00
Bruno Windels
1ff6d36ec3 add grid toggle button to left panel 2020-10-07 12:31:52 +02:00
Bruno Windels
7955462dda render grid view in session view 2020-10-07 12:31:24 +02:00
Bruno Windels
dc1357bb31 support clearing unread when focusing a room 2020-10-07 12:30:46 +02:00
Bruno Windels
614ec08238 integrate grid vm with session vm, allowing to switch 2020-10-07 12:25:40 +02:00
Bruno Windels
9cc7833d7a implement room grid view 2020-10-07 12:24:44 +02:00
Bruno Windels
5a1d255d2a implement room grid view model 2020-10-07 12:23:02 +02:00
Bruno Windels
01ff806b86 WIP 2020-10-07 09:40:51 +02:00
Bruno Windels
404de53c75 basic url router and navigation bootstrapping 2020-10-06 18:06:11 +02:00
Bruno Windels
b373a177ec create room url in room tile 2020-10-06 18:05:52 +02:00
Bruno Windels
221b94adbf room tile should be passed child options 2020-10-06 18:05:38 +02:00
Bruno Windels
5ab947e7de pass urlRouter and navigation as view model options 2020-10-06 18:05:02 +02:00
Bruno Windels
514095da7a move waitFor and get to BaseObservableValue 2020-10-06 18:04:34 +02:00
Bruno Windels
b8dcb249ff implement url router 2020-10-06 18:03:12 +02:00
Bruno Windels
ef428809b5 implement navigation stack 2020-10-06 18:01:56 +02:00
Bruno Windels
1de645a990 give filter field a bit more space 2020-10-06 13:32:27 +02:00
Bruno Windels
e878b5786e fix room view not showing anymore on narrow viewports 2020-10-06 13:31:23 +02:00
Bruno Windels
a7db44eabf
Merge pull request #138 from vector-im/bwindels/filter-room-list
Room list filtering
2020-10-06 11:08:39 +00:00
Bruno Windels
b1cb797919 fix refactor error in xhr, breaking it 2020-10-06 13:02:35 +02:00
Bruno Windels
0d6fe32f30 clear filter on esc 2020-10-06 12:43:31 +02:00
Bruno Windels
ddbe3305c8 fix filter field height 2020-10-06 12:34:13 +02:00
Bruno Windels
2fe6f4b769 clean up SessionView by making it a TemplateView 2020-10-06 12:23:17 +02:00
Bruno Windels
cac3daca72 add LeftPanelView(Model) with room filtering 2020-10-06 12:23:11 +02:00
Bruno Windels
c8125595a7 render hidden flag 2020-10-06 12:21:42 +02:00
Bruno Windels
c532cb5aea add hidden flag to room tile vm
also move to leftpanel dir
2020-10-06 12:21:11 +02:00
Bruno Windels
e3fdd3a4fd ApplyMap, your observable map collection for applying side-effects 2020-10-06 12:20:28 +02:00
Bruno Windels
9a3734e5ba this is a NOP, but in the future might not be 2020-10-06 12:20:03 +02:00
Bruno Windels
7def542e21 fix test 2020-10-06 12:19:47 +02:00
Bruno Windels
84425fad5c more work on FilteredMap (not done yet though)
I ended up not using this, but at some point we'll need it,
so commit this work
2020-10-06 12:19:08 +02:00
Bruno Windels
943467cf67 actually implemented filtered map 2020-10-05 18:18:44 +02:00
Bruno Windels
5ae1be9a9c ignore invalid json on error pages 2020-10-05 17:18:05 +02:00
Bruno Windels
c8e4dbc1b3 this should be a map 2020-10-05 17:06:29 +02:00
Bruno Windels
b2e6310775 re-focus composer when clicking send button 2020-10-05 17:03:46 +02:00
Bruno Windels
a04a6a83be fix composer not being visible on mobile 2020-10-05 17:03:32 +02:00
Bruno Windels
8f5d678698 cache small media repo thumbnails in service worker 2020-10-05 15:58:29 +02:00
Bruno Windels
6a8c0b52e0 indenting 2020-10-05 15:10:06 +02:00
Bruno Windels
8dc2816d6e keep hashed files in cache as long as they don't change 2020-10-02 19:54:24 +02:00
Bruno Windels
e93b091566 dont use no-cache in fetch, as it doesn't play well with CORS on Safari 2020-10-02 14:02:59 +02:00
Bruno Windels
07eee8fac1 only create fragments when we will really write events to the timeline store 2020-10-01 17:01:33 +02:00
Bruno Windels
bebdaad7d4 log when we can't abort 2020-10-01 16:23:15 +02:00
Bruno Windels
c1df371a14 add some documentation for our idb investigations 2020-10-01 16:14:58 +02:00
Bruno Windels
9a4d47820d change this back as well 2020-10-01 14:46:30 +02:00
Bruno Windels
cb7da2ba4a dont need this anymore 2020-10-01 14:45:09 +02:00
Bruno Windels
f402e8c6c4 typo/thinko in docs 2020-10-01 14:39:23 +02:00
Bruno Windels
300529b7c5 write sync token first
in case we get a TransactionInactiveError,
we have at least written the sync token
and won't repeat the same sync request
2020-10-01 14:38:54 +02:00
Bruno Windels
1117c77d05 note for future optimisation 2020-10-01 14:36:00 +02:00
Bruno Windels
d5a6a4d350 todo comment 2020-10-01 14:35:46 +02:00
Bruno Windels
3c7125bb88 add (optional) logging for idb requests 2020-10-01 14:35:33 +02:00
Bruno Windels
93a7f9959e Safari doesn't like the prepare txn still open when opening the sync txn
Waiting for it to close magically solves the TransactionInactiveError
we were seeing on some incremental sync request when
reading from roomMembers.

Still unsure what this is about, and if we should wait for all read txns
to close or not.
2020-10-01 14:31:38 +02:00
Bruno Windels
ddb14f48bf we actually don't need to track write requests
as errors will bubble up to the txn
2020-10-01 14:31:08 +02:00
Bruno Windels
d5a52c32d6 these don't return a promise anymore 2020-09-29 11:51:14 +02:00
Bruno Windels
37690cffe3 track storage write requests internally, as we never await their promise 2020-09-29 11:50:37 +02:00
Bruno Windels
482b5f4d22 allow passing message to IDBRequestError 2020-09-29 11:50:10 +02:00
Bruno Windels
43d430fc98 remove unused storage modification functions 2020-09-29 11:47:49 +02:00
Bruno Windels
f993048a2b Merge branch 'master' into bwindels/idb-promises-txn 2020-09-29 11:33:58 +02:00
Bruno Windels
e5b1cbbcd3 prevent endless loop when restoring messages that were already sent 2020-09-29 11:32:49 +02:00
Bruno Windels
7627a2bda2 add comment 2020-09-29 10:53:02 +02:00
Bruno Windels
163ca12854 ignore abort error 2020-09-29 10:52:52 +02:00
Bruno Windels
919357b474 more broken imports after refactor 2020-09-29 09:57:48 +02:00
Bruno Windels
c529df179b also import this 2020-09-29 09:56:46 +02:00
Bruno Windels
c1ecaffbae fix refactor typo 2020-09-29 09:54:51 +02:00
Bruno Windels
07fcf7e75b also do this in try catch 2020-09-29 09:43:25 +02:00
Bruno Windels
4d23529b68 set promise polyfill before others
just in case
2020-09-29 09:42:43 +02:00
Bruno Windels
b1f9cfd972 cleanup storage errors a bit 2020-09-29 09:17:03 +02:00
Bruno Windels
ee4c132fb4 add todo 2020-09-28 16:06:41 +02:00
Bruno Windels
76381fbca1 open storage transactions synchronously
this (almost) makes it work in some browsers that otherwise
have throw a TransactionInactiveError on the first operation
you try to do on a store.
2020-09-28 16:06:41 +02:00
Bruno Windels
d759e1429f set error before changing state to stopped 2020-09-28 16:06:19 +02:00
Bruno Windels
3440823981
Merge pull request #117 from vector-im/bwindels/idb-promises
Prevent transaction from closing on IE11/Win7
2020-09-28 13:37:34 +00:00
Bruno Windels
47dbc87e95 load promise first 2020-09-28 15:34:10 +02:00
Bruno Windels
bb58fa9b6c dont need this anymore 2020-09-28 15:32:40 +02:00
Bruno Windels
18cc34c082 remove extra newlines 2020-09-28 15:31:04 +02:00
Bruno Windels
dd30f51ffe add copyright 2020-09-28 15:28:51 +02:00
Bruno Windels
9cf24d910a properly install polyfill and remove logging 2020-09-28 15:28:38 +02:00
Bruno Windels
6d003f9565 don't include corejs promise polyfill anymore 2020-09-28 15:28:22 +02:00
Bruno Windels
e3581c8260 use our fork of es6-promise with flush exposed as the promise polyfill 2020-09-28 15:27:38 +02:00
Bruno Windels
8366b44d8c dont assume global is window 2020-09-28 14:52:12 +02:00
Bruno Windels
98a6d82820 detect when sync promise hack is needed 2020-09-28 14:51:41 +02:00
Bruno Windels
706ec97296 change method name 2020-09-28 13:25:44 +02:00
Bruno Windels
64290d5ae6 flush promises manually in idb event handler 2020-09-25 16:53:19 +02:00
Bruno Windels
becdf656a4 nicer error messages when decrypting with a worker 2020-09-25 16:52:26 +02:00
Bruno Windels
27a8ef4604 add comment how timeouts interact with the reconnector 2020-09-25 10:45:41 +02:00
Bruno Windels
e175e9ac8b cleanup 2020-09-25 10:45:34 +02:00
Bruno Windels
134b04c782 make flushing room key shares reentrant
as it can be called from Room.start while still running.
2020-09-25 10:45:00 +02:00
Bruno Windels
bcca23bac9 retry sync on timeout, even for incremental sync 2020-09-25 10:44:36 +02:00
Bruno Windels
7f0d36cf79 remove double negation 2020-09-25 10:44:19 +02:00
Bruno Windels
86df4993e1 prevent room summary from being updated every time it is in /sync resp 2020-09-24 16:45:28 +02:00
Bruno Windels
46abafdccc ensure cloned is always set to false for this._data
by making all assignments of this._data go through applyChanges
2020-09-24 16:40:51 +02:00
Bruno Windels
4a0173e90f only run decryptPending if needed 2020-09-24 10:53:51 +02:00
Bruno Windels
4d616ce281 add todo for future optimisation 2020-09-24 10:35:09 +02:00
Bruno Windels
ece4840653 don't mark rooms as unread after retrying decryption for now
this will not mark e2ee rooms as unread if their room key is delayed
though. We should really only do this for back-filled events but that
is hard to do right now, as we don't know the original source here.
2020-09-23 19:11:11 +02:00
Bruno Windels
eb4237f6f4 tell caller if an update was done from summery.writeAndApplyData
so room actually emits an update
2020-09-23 19:10:25 +02:00
Bruno Windels
17f84ab314 fix "this" still being used in readRawTimelineEntries ... 2020-09-23 19:09:44 +02:00
Bruno Windels
086bdafe9a no need for async 2020-09-23 18:28:21 +02:00
Bruno Windels
7cad3b2bdb some tabs in here 2020-09-23 18:22:51 +02:00
Bruno Windels
64f657e5a2 fix test 2020-09-23 18:20:29 +02:00
Bruno Windels
6e77ebb160 undo obsolete changes 2020-09-23 18:06:16 +02:00
Bruno Windels
d53b5eefb3 fill in the blanks 2020-09-23 17:59:42 +02:00
Bruno Windels
9d41e122a0 draft of falling back to reading entries since last decrypted event key
this change notifyRoomKey(s) to only take one room key at a time
to simplify things
2020-09-23 17:34:25 +02:00