Commit Graph

26 Commits

Author SHA1 Message Date
WofWca da5309124e style: add dark theme for webxdc wrapper
It affects the "loading" stage

Related: https://github.com/deltachat/deltachat-desktop/pull/3411
2023-09-26 13:16:09 +02:00
B. Petersen 42143519d7 remove ts fragments from webxdc.js
main reason is, that these annotations cover the code,
making it hard to follow what is going on.

maybe opionionated, however,
in general, .ts is not needed in small projects,
and an additional burden for devs.
2023-09-26 11:29:06 +02:00
adbenitez aaca1ea264 update res/raw/webxdc.js 2023-06-04 16:38:49 +02:00
adbenitez 0bb8e0a016 add webxdc.importFiles() API 2023-06-04 00:16:19 +02:00
bjoern c99ba34a4d unify and shorten sendToChat() errors (#2578)
* unify and shorten sendToChat() errors

* style: java script uses camelCase, not snake_case (these kind of issues tend to pile up and manifest then in the api somewhere, cmp max_serial - therefore better be strict :)
2023-06-03 10:16:32 +02:00
Simon Laux 1ee59ac662 webxdc update "send to chat" api 2023-06-01 20:46:20 +02:00
adbenitez 0c5cf151db update res/raw/webxdc.js 2023-06-01 11:12:18 +02:00
Asiel Díaz Benítez 7c6b0e5b50 Update res/raw/webxdc.js
Co-authored-by: bjoern <r10s@b44t.com>
2023-05-31 09:49:16 -04:00
adbenitez d51fef5318 add extra checks on the Java side and improve check in the JavaScript side 2023-05-30 23:43:54 +02:00
Simon Laux 39f85c55f1 Update res/raw/webxdc.js 2023-05-30 22:30:55 +02:00
adbenitez d100397530 update to recent changes in sendToChat API specs 2023-05-30 21:22:32 +02:00
adbenitez 3588c074f1 add webxdc.sendToChat() API 2023-05-29 17:03:44 +02:00
bjoern 2b75ec5515 remove unused lines; the iframe should include webxdc.js as needed (#2474) 2023-02-23 13:10:51 +01:00
bjoern 563c0296fa Combined webxdc patches (#2465)
* re-applying patch from @Hocuri from #2458

* apply sandbox isolation patch from @WofWca

* wait for gc as suggested by @WofWca, @Simon-Laux and others

* Update res/raw/sandboxed_iframe_rtcpeerconnection_check.html

Co-authored-by: WofWca <wofwca@protonmail.com>

* Update res/raw/sandboxed_iframe_rtcpeerconnection_check.html

Co-authored-by: WofWca <wofwca@protonmail.com>

* improve progress bar, inspired by @Simon-Laux and @WofWca

* comment about the gist of setNetworkAvailable()

* unify url-loading; this cleans up things and makes adding CSP more straight-forward

---------

Co-authored-by: WofWca <wofwca@protonmail.com>
2023-02-05 14:45:45 +01:00
B. Petersen 4ba6daae21 Revert "Webxdc fixes"
This reverts commit 6afddd84fff659fa6d8f727f2bf388d0c504058d.
2023-02-03 13:18:05 +01:00
Hocuri 8281bf9489 Webxdc fixes (#2458)
This now fixes all the checks in the `test webxdc`, see the
Delta Chat group
2023-01-31 18:30:53 +01:00
Simon Laux 188bb37763 webxdc: make setUpdateListener return a promise
see https://github.com/deltachat/deltachat-core-rust/issues/3203
2022-04-19 15:39:36 +02:00
Simon Laux c3315a2b65 fix setting update_listener
and show the deprecation notice of `getAllUpdates` to the user with console.error
2022-03-29 21:35:41 +02:00
bjoern adf02b50e5 adapt js to new webxdc-update-api (#2223)
* adapt js to new webxdc-update-api

* the stub implementation of getAllUpdates() must still return a Promise

* reword parameters of getStatusUpdates()
2022-03-04 20:23:56 +01:00
B. Petersen 1ccbb11bf6 adapt to new webxdc api 2022-01-28 21:11:50 +01:00
bjoern 9e70aa7cad webxdc (#2174)
* add new w30 APIs

* create the webview,
disable internet access,
inject deltachat.js

* connect deltachat to the webview

* promisify api

* use msgActionButton to start the w30 apps

* cleanup

- create observers in onCreate() to avoid memory leak,
- derive from WebViewActivity to easier deal with particularities
  and to saves >100 loc
- reorder some methods to reflect lifetimes

* make it more clear, which uri-part is 'domain' and which one is 'path'

* unify logging

* it is 'statusUpdate' not 'stateUpdate'; not sure if promise is needed at the end, we can readd that as needed, simple code for now

* use core implementation for status updates

* disable debugging enabled by default, streamline code

* use same name for InternalJSApi for both, js and java

* getStatusUpdates() always return an array

* call JSON.stringify() on payload

* fix typo, fix equal operator

* use shorter function names in js land

* adapt to new zipped w30 format

* load any file from w30 archives

* add fallback if getMimeTypeFromExtension() fails

* rename w30 to webxdc

* add selfName()

* return selfAddr() if selfName() is empty

* rename deltachat.js to webxdc.js

* observer correct event

* rename getBlobFromArchive() to getWebxdcBlob()

* show webxdc app name in title bar

* swap payload and descr in sendUpdate() (adapt to new core api)

* allow user-defined-texts for webxdc apps, make room for icon+name

* show webxdc icon and name in chats

* render webxdc drafts accordingly

* allow configuring drafts

* do not destroy webxdc-message to be sent out by removing it via setDraft(null)

* fix crash when replying to webxdc messages

* add webxdc messages to profile's document tab

* hide 'search menu' for webxdc apps

* show app summary beside app icon

* remove outdated comment

* add precautious WebView restrictions

* Update src/org/thoughtcrime/securesms/ConversationItem.java

Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu>

* Update src/org/thoughtcrime/securesms/ConversationItem.java

Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu>

* Update src/org/thoughtcrime/securesms/ConversationActivity.java

Co-authored-by: Hocuri <hocuri@gmx.de>

* Webxdc requires at least Android 5 Lollipop

see https://github.com/deltachat/deltachat-android/pull/2174#discussion_r785436874

* recognize .xdc files on android10

based on @Hocuri's findings in #2188

Co-authored-by: Simon Laux <mobile.info@simonlaux.de>
Co-authored-by: adbenitez <asieldbenitez@gmail.com>
Co-authored-by: Asiel Díaz Benítez <adbenitez@nauta.cu>
Co-authored-by: Hocuri <hocuri@gmx.de>
2022-01-18 10:52:09 +01:00
B. Petersen 17153fe4e2 add missing soundfiles 2019-05-20 18:10:01 +02:00
B. Petersen 33747e7a41 remove unused resources detected by lint 2018-12-11 14:49:32 +01:00
B. Petersen 99b1703097 remove unused resources detected by lint 2018-12-11 14:22:22 +01:00
B. Petersen 46a7159c5a remove dead code and layouts, remove webrtc 2018-12-10 01:04:25 +01:00
B. Petersen b1a00a03d2 Initial commit 🌱 2018-08-14 17:20:46 +02:00