Commit graph

65 commits

Author SHA1 Message Date
Bruno Windels
21a41e192b Merge branch 'master' into ts-conversion-matrix-net 2021-12-09 18:49:54 +01:00
Bruno Windels
62827b92b7 implement placeholder replacement so it still works with minification 2021-12-09 16:37:31 +01:00
Bruno Windels
f934262e35 also use global hash var here 2021-12-09 12:22:17 +01:00
RMidhunSuresh
f120ce50e6 Convert Reconnector.js to ts 2021-12-03 11:40:26 +05:30
Bruno Windels
7e1818b285 Merge branch 'master' into bwindels/vite-mvp 2021-12-01 12:30:33 +01:00
RMidhunSuresh
afecac3e3c Convert timeout.js to ts 2021-11-17 20:28:44 +05:30
RMidhunSuresh
4ce7634201 Convert error.js to ts 2021-11-17 20:28:44 +05:30
Bruno Windels
923a1a2057 use vite define option to inject version number everywhere 2021-11-08 11:10:34 +01:00
Bruno Windels
b6fda8865f make all dependencies use vite and remove post-install script / lib dir 2021-11-08 11:10:34 +01:00
RMidhunSuresh
96a2dd7c72 Add event handler before executing open
Signed-off-by: RMidhunSuresh <hi@midhun.dev>
2021-11-04 00:02:50 +05:30
Danila Fedorin
a7360f409e Rename ObservableValue to TypeScript 2021-09-29 17:42:57 -07:00
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