gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] 05/07: move folder to catch up the reload on save


From: gnunet
Subject: [taler-wallet-core] 05/07: move folder to catch up the reload on save
Date: Thu, 01 Jun 2023 17:24:49 +0200

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository wallet-core.

commit 67fe4e8c20dd810aa6bf124c457bf8161ce56589
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Jun 1 12:22:04 2023 -0300

    move folder to catch up the reload on save
---
 .../taler-wallet-webextension/dev-html/.gitignore  |   4 -
 .../taler-wallet-webextension/dev-html/index.html  |  68 ---------------
 .../taler-wallet-webextension/src/spa/index.html   |  93 +++++++++++++++++++++
 .../src/spa/manifest.json                          |  82 ++++++++++++++++++
 .../{dev-html => src/spa}/popup.html               |   4 +-
 .../src/spa/service_worker.js                      |  11 +++
 .../{dev-html => src/spa}/static/font/import.css   |   0
 .../spa}/static/font/roboto-italic-400.ttf         | Bin
 .../spa}/static/font/roboto-normal-300.tff         | Bin
 .../spa}/static/font/roboto-normal-400.ttf         | Bin
 .../spa}/static/font/roboto-normal-500.ttf         | Bin
 .../spa}/static/font/roboto-normal-700.ttf         | Bin
 .../{dev-html => src/spa}/stories.html             |   4 +-
 .../{dev-html => src/spa}/tests.html               |   4 +-
 .../{dev-html => src/spa}/wallet.html              |   4 +-
 15 files changed, 194 insertions(+), 80 deletions(-)

diff --git a/packages/taler-wallet-webextension/dev-html/.gitignore 
b/packages/taler-wallet-webextension/dev-html/.gitignore
deleted file mode 100644
index c4f051f4f..000000000
--- a/packages/taler-wallet-webextension/dev-html/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/mocha.css
-/mocha.js
-/mocha.js.map
-/manifest.json
diff --git a/packages/taler-wallet-webextension/dev-html/index.html 
b/packages/taler-wallet-webextension/dev-html/index.html
deleted file mode 100644
index 4b7fe34e8..000000000
--- a/packages/taler-wallet-webextension/dev-html/index.html
+++ /dev/null
@@ -1,68 +0,0 @@
-<html>
-  <head>
-    <meta charset="utf-8" />
-    <link rel="manifest" href="./manifest.json" />
-  </head>
-  <body>
-    <script>
-      function openPopup() {
-        window.frames["popup"].location = "/popup.html";
-      }
-      function openWallet() {
-        window.frames["wallet"].location = "/wallet.html";
-      }
-      function closeWallet() {
-        window.frames["wallet"].location = "about:blank";
-      }
-      function openPage() {
-        window.frames["other"].location =
-          document.getElementById("page-url").value;
-      }
-    </script>
-    <input id="page-url" type="text" />
-    <button onclick="openPage()">open</button>
-    <a
-      href='javascript:void(window.frames["other"].location = 
"http://bank.taler:5882";)'
-      >open local bank</a
-    >
-    <hr />
-    <iframe
-      id="other-window"
-      name="other"
-      src="http://bank.taler:5882";
-      width="100%"
-      height="325"
-    >
-    </iframe>
-    <hr />
-    <button value="asd" onclick="openPopup()">open popup</button><br />
-    <iframe
-      id="popup-window"
-      name="popup"
-      src="about:blank"
-      width="500"
-      height="325"
-    >
-    </iframe>
-    <hr />
-    <button value="asd" onclick="closeWallet();openWallet()">
-      reload wallet page
-    </button>
-    <br />
-    <iframe
-      id="wallet-window"
-      name="wallet"
-      src="/wallet.html"
-      width="800"
-      height="100%"
-    >
-    </iframe>
-    <hr />
-    <iframe src="/tests.html" name="wallet" width="800" height="100%"> 
</iframe>
-    <hr />
-    <iframe src="/stories.html" name="wallet" width="800" height="100%">
-    </iframe>
-    <hr />
-    <script src="/dist/background.dev.js"></script>
-  </body>
-</html>
diff --git a/packages/taler-wallet-webextension/src/spa/index.html 
b/packages/taler-wallet-webextension/src/spa/index.html
new file mode 100644
index 000000000..f352c7bf4
--- /dev/null
+++ b/packages/taler-wallet-webextension/src/spa/index.html
@@ -0,0 +1,93 @@
+<html>
+  <head>
+    <meta charset="utf-8" />
+    <link rel="manifest" href="manifest.json" />
+    <style>
+      .overlay {
+        position: absolute;
+        top: 0px;
+        display: none;
+width: 100%;
+height: 100%;
+background-color: rgba(0,0,0,0.5);
+color:white;
+justify-content: center;
+      }
+      .overlay > iframe {
+        margin: auto;
+      }
+    </style>
+  </head>
+  <body>
+    <script>
+      function openPopup() {
+        document.getElementById("popup-overlay").style.display = "flex"
+        window.frames["popup"].location = "popup.html";
+        window.frames["popup"]
+      }
+      function closePopup() {
+        document.getElementById("popup-overlay").style.display = "none"
+      }
+      function redirectWallet(url) {
+        window.frames["wallet"].location = url
+      }
+      function openWallet() {
+        redirectWallet("wallet.html")
+      }
+      function closeWallet() {
+        redirectWallet("about:blank")
+      }
+      function openPage() {
+        window.frames["other"].location =
+          document.getElementById("page-url").value;
+      }
+    </script>
+    <button value="asd" onclick="openPopup()">open popup</button>
+    <button value="asd" onclick="closeWallet();openWallet()">
+      reload wallet page
+    </button>
+<br />
+    <iframe
+      id="wallet-window"
+      name="wallet"
+      src="wallet.html"
+      width="1000"
+      height="100%"
+    >
+    <input id="page-url" type="text" />
+    <button onclick="openPage()">open</button>
+    <!-- <a
+      href='javascript:void(window.frames["other"].location = 
"http://bank.taler:5882";)'
+      >open local bank</a
+    >
+    <hr />
+    <iframe
+      id="other-window"
+      name="other"
+      src="http://bank.taler:5882";
+      width="100%"
+      height="325"
+    >
+    </iframe> -->
+    <hr />
+    <div class="overlay" id="popup-overlay">
+      <iframe
+      id="popup-window"
+      name="popup"
+      src="about:blank"
+      width="500"
+      height="325"
+    >
+  </iframe>
+    </div>
+    <hr />
+    </iframe>
+    <!-- <hr />
+    <iframe src="tests.html" name="wallet" width="800" height="100%"> 
</iframe> -->
+    <!-- <hr />
+    <iframe src="stories.html" name="wallet" width="800" height="100%"> -->
+    </iframe>
+    <hr />
+    <script type="module" src="background.dev.js"></script>
+  </body>
+</html>
diff --git a/packages/taler-wallet-webextension/src/spa/manifest.json 
b/packages/taler-wallet-webextension/src/spa/manifest.json
new file mode 100644
index 000000000..d871bf7e8
--- /dev/null
+++ b/packages/taler-wallet-webextension/src/spa/manifest.json
@@ -0,0 +1,82 @@
+{
+  "name": "GNU Taler Wallet",
+  "description": "Privacy preserving and transparent payments",
+  "author": "GNU Taler Developers",
+  "version": "0.9.3.13",
+  "version_name": "0.9.3-dev.13",
+  "icons": {
+    "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"
+  },
+  "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"
+  },
+  "background": {
+    "service_worker": "service_worker.js"
+  }
+}
diff --git a/packages/taler-wallet-webextension/dev-html/popup.html 
b/packages/taler-wallet-webextension/src/spa/popup.html
similarity index 81%
rename from packages/taler-wallet-webextension/dev-html/popup.html
rename to packages/taler-wallet-webextension/src/spa/popup.html
index 93a886d54..34d1d019c 100644
--- a/packages/taler-wallet-webextension/dev-html/popup.html
+++ b/packages/taler-wallet-webextension/src/spa/popup.html
@@ -29,8 +29,8 @@
       }
     </style>
 
-    <link rel="stylesheet" type="text/css" href="/dist/popupEntryPoint.css" />
-    <script src="/dist/popupEntryPoint.dev.js"></script>
+    <link rel="stylesheet" type="text/css" href="popupEntryPoint.dev.css" />
+    <script type="module" src="popupEntryPoint.dev.js"></script>
   </head>
 
   <body>
diff --git a/packages/taler-wallet-webextension/src/spa/service_worker.js 
b/packages/taler-wallet-webextension/src/spa/service_worker.js
new file mode 100644
index 000000000..38064e245
--- /dev/null
+++ b/packages/taler-wallet-webextension/src/spa/service_worker.js
@@ -0,0 +1,11 @@
+/* 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/dev-html/static/font/import.css 
b/packages/taler-wallet-webextension/src/spa/static/font/import.css
similarity index 100%
rename from packages/taler-wallet-webextension/dev-html/static/font/import.css
rename to packages/taler-wallet-webextension/src/spa/static/font/import.css
diff --git 
a/packages/taler-wallet-webextension/dev-html/static/font/roboto-italic-400.ttf 
b/packages/taler-wallet-webextension/src/spa/static/font/roboto-italic-400.ttf
similarity index 100%
rename from 
packages/taler-wallet-webextension/dev-html/static/font/roboto-italic-400.ttf
rename to 
packages/taler-wallet-webextension/src/spa/static/font/roboto-italic-400.ttf
diff --git 
a/packages/taler-wallet-webextension/dev-html/static/font/roboto-normal-300.tff 
b/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-300.tff
similarity index 100%
rename from 
packages/taler-wallet-webextension/dev-html/static/font/roboto-normal-300.tff
rename to 
packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-300.tff
diff --git 
a/packages/taler-wallet-webextension/dev-html/static/font/roboto-normal-400.ttf 
b/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-400.ttf
similarity index 100%
rename from 
packages/taler-wallet-webextension/dev-html/static/font/roboto-normal-400.ttf
rename to 
packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-400.ttf
diff --git 
a/packages/taler-wallet-webextension/dev-html/static/font/roboto-normal-500.ttf 
b/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-500.ttf
similarity index 100%
rename from 
packages/taler-wallet-webextension/dev-html/static/font/roboto-normal-500.ttf
rename to 
packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-500.ttf
diff --git 
a/packages/taler-wallet-webextension/dev-html/static/font/roboto-normal-700.ttf 
b/packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-700.ttf
similarity index 100%
rename from 
packages/taler-wallet-webextension/dev-html/static/font/roboto-normal-700.ttf
rename to 
packages/taler-wallet-webextension/src/spa/static/font/roboto-normal-700.ttf
diff --git a/packages/taler-wallet-webextension/dev-html/stories.html 
b/packages/taler-wallet-webextension/src/spa/stories.html
similarity index 65%
rename from packages/taler-wallet-webextension/dev-html/stories.html
rename to packages/taler-wallet-webextension/src/spa/stories.html
index b07c4bd1c..f18307669 100644
--- a/packages/taler-wallet-webextension/dev-html/stories.html
+++ b/packages/taler-wallet-webextension/src/spa/stories.html
@@ -2,9 +2,9 @@
 <html>
   <head>
     <title>Stories</title>
-    <link rel="stylesheet" type="text/css" href="/dist/stories.css" />
+    <link rel="stylesheet" type="text/css" href="stories.css" />
     <link rel="stylesheet" type="text/css" href="/static/font/import.css" />
-    <script src="/dist/stories.js"></script>
+    <script src="stories.js"></script>
   </head>
   <body>
     <taler-stories id="container"></taler-stories>
diff --git a/packages/taler-wallet-webextension/dev-html/tests.html 
b/packages/taler-wallet-webextension/src/spa/tests.html
similarity index 77%
rename from packages/taler-wallet-webextension/dev-html/tests.html
rename to packages/taler-wallet-webextension/src/spa/tests.html
index 4b3ec93b5..383f13d03 100644
--- a/packages/taler-wallet-webextension/dev-html/tests.html
+++ b/packages/taler-wallet-webextension/src/spa/tests.html
@@ -12,8 +12,8 @@
     </script>
 
     <!-- load code you want to test here -->
-    <script src="/dist/stories.test.js"></script>
-    <script src="/dist/hooks/useTalerActionURL.test.js"></script>
+    <script src="stories.test.js"></script>
+    <script src="hooks/useTalerActionURL.test.js"></script>
     <!-- load your test files here -->
 
     <script>
diff --git a/packages/taler-wallet-webextension/dev-html/wallet.html 
b/packages/taler-wallet-webextension/src/spa/wallet.html
similarity index 77%
rename from packages/taler-wallet-webextension/dev-html/wallet.html
rename to packages/taler-wallet-webextension/src/spa/wallet.html
index ff8616847..366615dff 100644
--- a/packages/taler-wallet-webextension/dev-html/wallet.html
+++ b/packages/taler-wallet-webextension/src/spa/wallet.html
@@ -1,7 +1,7 @@
 <html>
   <head>
     <meta charset="utf-8" />
-    <link rel="stylesheet" type="text/css" href="/dist/walletEntryPoint.css" />
+    <link rel="stylesheet" type="text/css" href="walletEntryPoint.dev.css" />
     <style>
       html {
         font-family: sans-serif; /* 1 */
@@ -20,7 +20,7 @@
         font-family: Arial, Helvetica, sans-serif;
       }
     </style>
-    <script src="/dist/walletEntryPoint.dev.js"></script>
+    <script type="module" src="walletEntryPoint.dev.js"></script>
   </head>
 
   <body>

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]