diff options
author | Sebastian <sebasjm@gmail.com> | 2023-06-02 14:25:33 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-06-02 14:25:33 -0300 |
commit | 9853f54201cc4c563b7f3b51564eeab54862a223 (patch) | |
tree | 3e60a6a2e7a618a24266a1259d9d1cbdf01b5b65 | |
parent | e3ec395b35b8fcff9a6423bb118f14c9649ddcd8 (diff) |
from spa to pwa
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/index.html (renamed from packages/taler-wallet-webextension/src/spa/index.html) | 23 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/manifest.json | 31 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/popup.html (renamed from packages/taler-wallet-webextension/src/spa/popup.html) | 0 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/static/font/import.css (renamed from packages/taler-wallet-webextension/src/spa/static/font/import.css) | 0 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/static/font/roboto-italic-400.ttf (renamed from packages/taler-wallet-webextension/src/spa/static/font/roboto-italic-400.ttf) | bin | 130872 -> 130872 bytes | |||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-300.tff (renamed from packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-300.tff) | bin | 128256 -> 128256 bytes | |||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-400.ttf (renamed from packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-400.ttf) | bin | 129584 -> 129584 bytes | |||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-500.ttf (renamed from packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-500.ttf) | bin | 129768 -> 129768 bytes | |||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-700.ttf (renamed from packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-700.ttf) | bin | 128676 -> 128676 bytes | |||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-128.png (renamed from packages/taler-wallet-webextension/src/spa/static/img/taler-logo-128.png) | bin | 8941 -> 8941 bytes | |||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-2022.svg (renamed from packages/taler-wallet-webextension/src/spa/static/img/taler-logo-2022.svg) | 0 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-48.png (renamed from packages/taler-wallet-webextension/src/spa/static/img/taler-logo-48.png) | bin | 2790 -> 2790 bytes | |||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-512.png | bin | 0 -> 39994 bytes | |||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/stories.html (renamed from packages/taler-wallet-webextension/src/spa/stories.html) | 0 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/sw.js | 6 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/tests.html (renamed from packages/taler-wallet-webextension/src/spa/tests.html) | 0 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/pwa/wallet.html (renamed from packages/taler-wallet-webextension/src/spa/wallet.html) | 0 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/spa/manifest.json | 78 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/spa/service_worker.js | 11 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/spa/static/img/taler-alert-128.png | bin | 8944 -> 0 bytes | |||
-rw-r--r-- | packages/taler-wallet-webextension/src/spa/static/img/taler-alert-48.png | bin | 2811 -> 0 bytes |
21 files changed, 58 insertions, 91 deletions
diff --git a/packages/taler-wallet-webextension/src/spa/index.html b/packages/taler-wallet-webextension/src/pwa/index.html index 0d2cf0e0b..abc6f97ba 100644 --- a/packages/taler-wallet-webextension/src/spa/index.html +++ b/packages/taler-wallet-webextension/src/pwa/index.html @@ -85,6 +85,25 @@ justify-content: center; <iframe src="tests.html" name="wallet" width="800" height="100%"> </iframe> --> <!-- <hr /> <iframe src="stories.html" name="wallet" width="800" height="100%"> --> - <script type="module" src="background.dev.js"></script> - </body> + <script type="module" src="background.dev.js"></script> + <script type="module"> + if ("serviceWorker" in navigator) { + try { + const registration = await navigator.serviceWorker.register("sw.js", { + scope: "/app/", + }); + if (registration.installing) { + console.log("Service worker installing"); + } else if (registration.waiting) { + console.log("Service worker installed"); + } else if (registration.active) { + console.log("Service worker active"); + } + } catch (error) { + console.error(`Registration failed with ${error}`); + } + } + + </script> + </body> </html> diff --git a/packages/taler-wallet-webextension/src/pwa/manifest.json b/packages/taler-wallet-webextension/src/pwa/manifest.json new file mode 100644 index 000000000..6823483bf --- /dev/null +++ b/packages/taler-wallet-webextension/src/pwa/manifest.json @@ -0,0 +1,31 @@ +{ + "name": "GNU Taler Wallet", + "description": "Privacy preserving and transparent payments", + "author": "GNU Taler Developers", + "version": "0.9.3.13", + "id": "gnu-taler-wallet-web-spa-development", + "version_name": "0.9.3-dev.13", + "display": "minimal-ui", + "start_url": "./", + "manifest_version": 3, + "minimum_chrome_version": "88", + "icons": [{ + "src": "./static/img/taler-logo-48.png", + "type": "image/png", + "sizes": "48x48" + },{ + "src": "./static/img/taler-logo-128.png", + "type": "image/png", + "sizes": "128x128" + },{ + "src": "./static/img/taler-logo-512.png", + "type": "image/png", + "sizes": "512x512" + }], + "protocol_handlers": [ + { + "protocol": "web+taler", + "url": "./wallet.html?type=%s" + } + ] +} diff --git a/packages/taler-wallet-webextension/src/spa/popup.html b/packages/taler-wallet-webextension/src/pwa/popup.html index 34d1d019c..34d1d019c 100644 --- a/packages/taler-wallet-webextension/src/spa/popup.html +++ b/packages/taler-wallet-webextension/src/pwa/popup.html diff --git a/packages/taler-wallet-webextension/src/spa/static/font/import.css b/packages/taler-wallet-webextension/src/pwa/static/font/import.css index 05edddb51..05edddb51 100644 --- a/packages/taler-wallet-webextension/src/spa/static/font/import.css +++ b/packages/taler-wallet-webextension/src/pwa/static/font/import.css diff --git a/packages/taler-wallet-webextension/src/spa/static/font/roboto-italic-400.ttf b/packages/taler-wallet-webextension/src/pwa/static/font/roboto-italic-400.ttf Binary files differindex 1e746d17f..1e746d17f 100644 --- a/packages/taler-wallet-webextension/src/spa/static/font/roboto-italic-400.ttf +++ b/packages/taler-wallet-webextension/src/pwa/static/font/roboto-italic-400.ttf diff --git a/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-300.tff b/packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-300.tff Binary files differindex ec821b577..ec821b577 100644 --- a/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-300.tff +++ b/packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-300.tff diff --git a/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-400.ttf b/packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-400.ttf Binary files differindex 9d4b32b47..9d4b32b47 100644 --- a/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-400.ttf +++ b/packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-400.ttf diff --git a/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-500.ttf b/packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-500.ttf Binary files differindex 4b4e1c656..4b4e1c656 100644 --- a/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-500.ttf +++ b/packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-500.ttf diff --git a/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-700.ttf b/packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-700.ttf Binary files differindex 58d877c58..58d877c58 100644 --- a/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-700.ttf +++ b/packages/taler-wallet-webextension/src/pwa/static/font/roboto-normal-700.ttf diff --git a/packages/taler-wallet-webextension/src/spa/static/img/taler-logo-128.png b/packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-128.png Binary files differindex a2f0c22eb..a2f0c22eb 100644 --- a/packages/taler-wallet-webextension/src/spa/static/img/taler-logo-128.png +++ b/packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-128.png diff --git a/packages/taler-wallet-webextension/src/spa/static/img/taler-logo-2022.svg b/packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-2022.svg index 2ac2785b8..2ac2785b8 100644 --- a/packages/taler-wallet-webextension/src/spa/static/img/taler-logo-2022.svg +++ b/packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-2022.svg diff --git a/packages/taler-wallet-webextension/src/spa/static/img/taler-logo-48.png b/packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-48.png Binary files differindex f13a23c85..f13a23c85 100644 --- a/packages/taler-wallet-webextension/src/spa/static/img/taler-logo-48.png +++ b/packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-48.png diff --git a/packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-512.png b/packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-512.png Binary files differnew file mode 100644 index 000000000..be312ef55 --- /dev/null +++ b/packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-512.png diff --git a/packages/taler-wallet-webextension/src/spa/stories.html b/packages/taler-wallet-webextension/src/pwa/stories.html index f18307669..f18307669 100644 --- a/packages/taler-wallet-webextension/src/spa/stories.html +++ b/packages/taler-wallet-webextension/src/pwa/stories.html diff --git a/packages/taler-wallet-webextension/src/pwa/sw.js b/packages/taler-wallet-webextension/src/pwa/sw.js new file mode 100644 index 000000000..2b2219578 --- /dev/null +++ b/packages/taler-wallet-webextension/src/pwa/sw.js @@ -0,0 +1,6 @@ +console.log("sw: Service worker installed"); + +self.addEventListener("fetch", (event) => { + // console.log("fetch event", event); + // event.respondWith(/* custom content goes here */); +}); diff --git a/packages/taler-wallet-webextension/src/spa/tests.html b/packages/taler-wallet-webextension/src/pwa/tests.html index 383f13d03..383f13d03 100644 --- a/packages/taler-wallet-webextension/src/spa/tests.html +++ b/packages/taler-wallet-webextension/src/pwa/tests.html diff --git a/packages/taler-wallet-webextension/src/spa/wallet.html b/packages/taler-wallet-webextension/src/pwa/wallet.html index 366615dff..366615dff 100644 --- a/packages/taler-wallet-webextension/src/spa/wallet.html +++ b/packages/taler-wallet-webextension/src/pwa/wallet.html diff --git a/packages/taler-wallet-webextension/src/spa/manifest.json b/packages/taler-wallet-webextension/src/spa/manifest.json deleted file mode 100644 index 49b7f05e2..000000000 --- a/packages/taler-wallet-webextension/src/spa/manifest.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "name": "GNU Taler Wallet", - "description": "Privacy preserving and transparent payments", - "author": "GNU Taler Developers", - "version": "0.9.3.13", - "id": "gnu-taler-wallet-web-spa-development", - "version_name": "0.9.3-dev.13", - "icons": [{ - "src": "static/img/taler-logo-48.png", - "sizes": "48x48" - },{ - "src": "static/img/taler-logo-128.png", - "sizes": "128x128" - }], - "display": "minimal-ui", - "start_url": "http://localhost:8080/app/index.html", - "manifest_version": 3, - "minimum_chrome_version": "88", - "permissions": [ - "unlimitedStorage", - "storage", - "activeTab", - "scripting", - "declarativeContent", - "alarms" - ], - "commands": { - "_execute_action": { - "suggested_key": { - "default": "Alt+W" - } - } - }, - "content_scripts": [ - { - "id": "taler-wallet-interaction", - "matches": [ - "file://*/*", - "http://*/*", - "https://*/*" - ], - "js": [ - "dist/taler-wallet-interaction-loader.js" - ] - } - ], - "web_accessible_resources": [ - { - "resources": [ - "static/wallet.html", - "dist/taler-wallet-interaction-loader.js.map", - "dist/taler-wallet-interaction-loader.js", - "dist/taler-wallet-interaction-support.js.map", - "dist/taler-wallet-interaction-support.js" - ], - "matches": [ - "https://*/*", - "http://*/*", - "file://*/*" - ] - } - ], - "action": { - "default_icon": { - "16": "static/img/taler-logo-16.png", - "19": "static/img/taler-logo-19.png", - "32": "static/img/taler-logo-32.png", - "38": "static/img/taler-logo-38.png", - "48": "static/img/taler-logo-48.png", - "64": "static/img/taler-logo-64.png", - "128": "static/img/taler-logo-128.png", - "256": "static/img/taler-logo-256.png", - "512": "static/img/taler-logo-512.png" - }, - "default_title": "GNU Taler Wallet", - "default_popup": "static/popup.html" - } -} diff --git a/packages/taler-wallet-webextension/src/spa/service_worker.js b/packages/taler-wallet-webextension/src/spa/service_worker.js deleted file mode 100644 index 38064e245..000000000 --- a/packages/taler-wallet-webextension/src/spa/service_worker.js +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable no-undef */ -/** - * Wrapper to catch any initialization error and show it in the logs - */ -try { - importScripts("dist/background.js"); - self.skipWaiting(); - console.log("SERVICE WORKER init: ok"); -} catch (e) { - console.error("SERVICE WORKER failed:", e); -} diff --git a/packages/taler-wallet-webextension/src/spa/static/img/taler-alert-128.png b/packages/taler-wallet-webextension/src/spa/static/img/taler-alert-128.png Binary files differdeleted file mode 100644 index b49347936..000000000 --- a/packages/taler-wallet-webextension/src/spa/static/img/taler-alert-128.png +++ /dev/null diff --git a/packages/taler-wallet-webextension/src/spa/static/img/taler-alert-48.png b/packages/taler-wallet-webextension/src/spa/static/img/taler-alert-48.png Binary files differdeleted file mode 100644 index 67516b582..000000000 --- a/packages/taler-wallet-webextension/src/spa/static/img/taler-alert-48.png +++ /dev/null |