qr-secure-send 1.6.5 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.html +24 -6
- package/package.json +1 -1
package/index.html
CHANGED
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
<header>
|
|
160
160
|
<h1>QR Secure Send</h1>
|
|
161
161
|
<p>Encrypt and transfer secrets via QR code</p>
|
|
162
|
-
<p style="font-size:0.7rem;color:#484f58;margin-top:0.2rem">v1.6.
|
|
162
|
+
<p style="font-size:0.7rem;color:#484f58;margin-top:0.2rem">v1.6.6</p>
|
|
163
163
|
</header>
|
|
164
164
|
|
|
165
165
|
<div class="tabs">
|
|
@@ -203,9 +203,14 @@
|
|
|
203
203
|
</div>
|
|
204
204
|
|
|
205
205
|
<div id="qr-output"></div>
|
|
206
|
-
<
|
|
207
|
-
Show this QR code to the receiving device's camera
|
|
208
|
-
|
|
206
|
+
<div id="qr-info" style="display:none">
|
|
207
|
+
<p class="info">Show this QR code to the receiving device's camera, or share the link below.</p>
|
|
208
|
+
<div class="result-box" style="display:block;margin-top:0.8rem">
|
|
209
|
+
<div class="label">Shareable Link</div>
|
|
210
|
+
<div class="value" id="qr-url" style="font-size:0.8rem;word-break:break-all;user-select:all"></div>
|
|
211
|
+
<button class="copy-btn" id="copy-url-btn">Copy link</button>
|
|
212
|
+
</div>
|
|
213
|
+
</div>
|
|
209
214
|
</div>
|
|
210
215
|
|
|
211
216
|
<!-- RECEIVE PANEL -->
|
|
@@ -1011,7 +1016,7 @@
|
|
|
1011
1016
|
// PAYLOAD HELPERS
|
|
1012
1017
|
// =========================================================================
|
|
1013
1018
|
|
|
1014
|
-
const APP_VERSION = "1.6.
|
|
1019
|
+
const APP_VERSION = "1.6.6";
|
|
1015
1020
|
const GH_PAGES_URL = "https://degenddy.github.io/qr-secure-send/?v=" + APP_VERSION;
|
|
1016
1021
|
const METAMASK_DEEP_URL = "https://link.metamask.io/dapp/degenddy.github.io/qr-secure-send/?v=" + APP_VERSION;
|
|
1017
1022
|
|
|
@@ -1117,6 +1122,7 @@
|
|
|
1117
1122
|
}
|
|
1118
1123
|
|
|
1119
1124
|
QRGen.toCanvas(output, payload, { width: 500, margin: 2 });
|
|
1125
|
+
document.getElementById("qr-url").textContent = payload;
|
|
1120
1126
|
info.style.display = "block";
|
|
1121
1127
|
} catch (e) {
|
|
1122
1128
|
errEl.textContent = "Failed to generate QR code: " + e.message;
|
|
@@ -1284,7 +1290,19 @@
|
|
|
1284
1290
|
}
|
|
1285
1291
|
}
|
|
1286
1292
|
|
|
1287
|
-
// Copy to clipboard
|
|
1293
|
+
// Copy link to clipboard
|
|
1294
|
+
document.getElementById("copy-url-btn").addEventListener("click", async () => {
|
|
1295
|
+
const value = document.getElementById("qr-url").textContent;
|
|
1296
|
+
try { await navigator.clipboard.writeText(value); } catch (_) {
|
|
1297
|
+
const ta = document.createElement("textarea"); ta.value = value;
|
|
1298
|
+
document.body.appendChild(ta); ta.select(); document.execCommand("copy");
|
|
1299
|
+
document.body.removeChild(ta);
|
|
1300
|
+
}
|
|
1301
|
+
document.getElementById("copy-url-btn").textContent = "Copied!";
|
|
1302
|
+
setTimeout(() => { document.getElementById("copy-url-btn").textContent = "Copy link"; }, 2000);
|
|
1303
|
+
});
|
|
1304
|
+
|
|
1305
|
+
// Copy decrypted secret to clipboard
|
|
1288
1306
|
document.getElementById("copy-btn").addEventListener("click", async () => {
|
|
1289
1307
|
const value = document.getElementById("recv-value").textContent;
|
|
1290
1308
|
try {
|