Commit graph

34 commits

Author SHA1 Message Date
Danila Fedorin
9252f3bede Migrate StorageFactory to TypeScript 2021-08-27 09:30:16 -07:00
Bruno Windels
e105bc4237 fix lint warnings 2021-08-24 15:31:18 +02:00
RMidhunSuresh
987a83b4cf Add method to redirect to a specific URL
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-08-18 22:04:33 +05:30
Danila Fedorin
c835dc324e Merge branch 'master' of github.com:vector-im/hydrogen-web into formatted-messages 2021-07-16 14:05:43 -07:00
Danila Fedorin
4022c6121b Switch to DOMPurify in platform layer for sanitization. 2021-07-12 15:00:16 -07:00
Danila Fedorin
005580f385 Move HTML parsing into platform. 2021-07-02 15:05:50 -07:00
RMidhunSuresh
b8c01272f4 remove listener on dispose
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-07-01 15:42:07 +05:30
RMidhunSuresh
b469c4299f implement new approach
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
2021-06-30 23:30:44 +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
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
f764323c80 fixup: notif service 2021-03-23 18:20:23 +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
5d55f6d78c log app version when opening session 2021-03-15 16:55:14 +01:00
Bruno Windels
c6ff56a942 send video messages 2021-03-09 19:35:25 +01:00
Bruno Windels
6ad778d27b support file downloads on iOS through data: uris 2021-03-04 21:51:29 +01:00
Bruno Windels
42654dbd4f console logger for local dev 2021-03-01 15:07:24 +01:00
Bruno Windels
f65db338cf make it work 2021-02-12 18:05:39 +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
4c2abcf9c7 add logger to platform 2021-02-12 13:04:18 +01:00
Bruno Windels
e49639fda2 move textencoder/decoder into platform 2021-02-11 17:29:48 +01:00
Bruno Windels
9ab81eea02 add setting for image compression level 2020-11-20 15:51:16 +01:00
Bruno Windels
f6dbb23f79 better error handling for file and picture upload 2020-11-18 20:07:31 +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
6384702863 fix file selector for IE11 2020-11-11 12:47:26 +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
6fa9471292 remove trailing whitespace 2020-11-10 17:51:39 +01:00
Bruno Windels
4477073d6d add platform method to offer saving a buffer handle 2020-11-10 17:24:30 +01:00
Bruno Windels
fbbdaf7dfa expose IE11 flag in JS as well 2020-11-02 11:16:19 +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
ee1e62207c apply platform changes to decrypting images 2020-10-26 17:18:17 +01:00
Bruno Windels
03351d2e1f extract platform class to put all platform specific code in 2020-10-26 15:44:11 +01:00