Commit graph

54 commits

Author SHA1 Message Date
RMidhunSuresh
daeeaa2869 Set and get strings
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
RMidhunSuresh
bed0185186 Support loginToken query in History
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
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
2341748023 add some tests to timeout code 2021-04-09 14:09: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
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
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
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
dbddba3691 fix c/p errors when moving code over to notif service 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
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
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
8100c70e88 fix image uploads being broken 2021-03-11 10:27:50 +01:00
Bruno Windels
e8c8455f43 safari hack/fix 2021-03-10 13:39:58 +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
c6ff56a942 send video messages 2021-03-09 19:35:25 +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
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
510d5ab2cd add bool settings type 2021-02-12 19:08:13 +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
e49639fda2 move textencoder/decoder into platform 2021-02-11 17:29:48 +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
9ab81eea02 add setting for image compression level 2020-11-20 15:51:16 +01:00
Bruno Windels
6f94ca1a4a make toBlob work on IE11 2020-11-18 16:28:48 +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
8b82c991e7 wire up image uploads 2020-11-13 19:15:03 +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
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
8db7499f5a support AES-CTR 256 JWK keys in legacy crypto for IE11 2020-11-11 12:44:59 +01:00
Bruno Windels
e9324ad678 support jwk keys to encrypt 2020-11-11 11:47:39 +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
4477073d6d add platform method to offer saving a buffer handle 2020-11-10 17:24:30 +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
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
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