diff --git a/packages/taler-wallet-webextension/src/spa/index.html b/packages/taler-wallet-webextension/src/pwa/index.html similarity index 74% rename from packages/taler-wallet-webextension/src/spa/index.html rename to 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; --> - - + + + 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/popup.html rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/static/font/import.css rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/static/font/roboto-italic-400.ttf rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-300.tff rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-400.ttf rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-500.ttf rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-700.ttf rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/static/img/taler-logo-128.png rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/static/img/taler-logo-2022.svg rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/static/img/taler-logo-48.png rename to 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 new file mode 100644 index 000000000..be312ef55 Binary files /dev/null and b/packages/taler-wallet-webextension/src/pwa/static/img/taler-logo-512.png differ diff --git a/packages/taler-wallet-webextension/src/spa/stories.html b/packages/taler-wallet-webextension/src/pwa/stories.html similarity index 100% rename from packages/taler-wallet-webextension/src/spa/stories.html rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/tests.html rename to 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 similarity index 100% rename from packages/taler-wallet-webextension/src/spa/wallet.html rename to 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 deleted file mode 100644 index b49347936..000000000 Binary files a/packages/taler-wallet-webextension/src/spa/static/img/taler-alert-128.png and /dev/null differ 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 deleted file mode 100644 index 67516b582..000000000 Binary files a/packages/taler-wallet-webextension/src/spa/static/img/taler-alert-48.png and /dev/null differ