qr-secure-send 1.6.0 → 1.6.2

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.
Files changed (2) hide show
  1. package/index.html +16 -19
  2. package/package.json +1 -1
package/index.html CHANGED
@@ -156,7 +156,7 @@
156
156
  <header>
157
157
  <h1>QR Secure Send</h1>
158
158
  <p>Encrypt and transfer secrets via QR code</p>
159
- <p style="font-size:0.7rem;color:#484f58;margin-top:0.2rem">v1.6.0</p>
159
+ <p style="font-size:0.7rem;color:#484f58;margin-top:0.2rem">v1.6.2</p>
160
160
  </header>
161
161
 
162
162
  <div class="tabs">
@@ -175,7 +175,7 @@
175
175
 
176
176
  <label for="send-passphrase">Encryption Passphrase</label>
177
177
  <div class="input-wrap">
178
- <input type="password" id="send-passphrase" placeholder="Shared passphrase..." autocomplete="off">
178
+ <input type="password" id="send-passphrase" placeholder="Optional passphrase..." autocomplete="off">
179
179
  <button class="toggle-vis" data-target="send-passphrase">show</button>
180
180
  </div>
181
181
  <div id="send-passphrase-strength" class="passphrase-strength"></div>
@@ -210,11 +210,9 @@
210
210
  <div class="card">
211
211
  <label for="recv-passphrase">Decryption Passphrase</label>
212
212
  <div class="input-wrap">
213
- <input type="password" id="recv-passphrase" placeholder="Same passphrase used to encrypt..." autocomplete="off">
213
+ <input type="password" id="recv-passphrase" placeholder="Passphrase (leave empty if none was set)..." autocomplete="off">
214
214
  <button class="toggle-vis" data-target="recv-passphrase">show</button>
215
215
  </div>
216
- <div id="recv-passphrase-strength" class="passphrase-strength"></div>
217
-
218
216
  <div id="recv-wallet-section" class="wallet-section" style="display:none">
219
217
  <p style="font-size:0.82rem;color:#d29922;margin-bottom:0.5rem;">
220
218
  This secret requires wallet authentication. Connect the designated wallet to decrypt.
@@ -1056,13 +1054,11 @@
1056
1054
  });
1057
1055
 
1058
1056
  // Passphrase strength listeners
1059
- ['send-passphrase', 'recv-passphrase'].forEach(id => {
1060
- document.getElementById(id).addEventListener('input', () => {
1061
- const result = evaluatePassphraseStrength(document.getElementById(id).value);
1062
- const el = document.getElementById(id + '-strength');
1063
- el.className = 'passphrase-strength' + (result.level !== 'none' ? ' ' + result.level : '');
1064
- el.textContent = result.message;
1065
- });
1057
+ document.getElementById('send-passphrase').addEventListener('input', () => {
1058
+ const result = evaluatePassphraseStrength(document.getElementById('send-passphrase').value);
1059
+ const el = document.getElementById('send-passphrase-strength');
1060
+ el.className = 'passphrase-strength' + (result.level !== 'none' ? ' ' + result.level : '');
1061
+ el.textContent = result.message;
1066
1062
  });
1067
1063
 
1068
1064
  // Send wallet toggle
@@ -1085,12 +1081,15 @@
1085
1081
  info.style.display = "none";
1086
1082
 
1087
1083
  if (!secret) { errEl.textContent = "Please enter a secret."; return; }
1088
- if (!passphrase) { errEl.textContent = "Please enter a passphrase."; return; }
1089
1084
 
1090
- const strength = evaluatePassphraseStrength(passphrase);
1091
- if (strength.level === 'weak') {
1092
- if (!confirm('Your passphrase is weak (~' + strength.bits + '-bit entropy). ' +
1093
- 'An attacker who captures this QR code could crack it offline. Continue anyway?')) return;
1085
+ if (!passphrase && !useWallet) {
1086
+ if (!confirm('No passphrase or wallet set. Anyone who scans this QR code can read the secret. Continue?')) return;
1087
+ } else if (passphrase) {
1088
+ const strength = evaluatePassphraseStrength(passphrase);
1089
+ if (strength.level === 'weak') {
1090
+ if (!confirm('Your passphrase is weak (~' + strength.bits + '-bit entropy). ' +
1091
+ 'An attacker who captures this QR code could crack it offline. Continue anyway?')) return;
1092
+ }
1094
1093
  }
1095
1094
 
1096
1095
  if (useWallet) {
@@ -1175,7 +1174,6 @@
1175
1174
  errEl.textContent = "";
1176
1175
  resultBox.style.display = "none";
1177
1176
 
1178
- if (!passphrase) { errEl.textContent = "Enter the decryption passphrase first."; return; }
1179
1177
 
1180
1178
  document.getElementById("scan-btn").style.display = "none";
1181
1179
  document.getElementById("stop-btn").style.display = "block";
@@ -1241,7 +1239,6 @@
1241
1239
  errEl.textContent = "";
1242
1240
  resultBox.style.display = "none";
1243
1241
 
1244
- if (!passphrase) { errEl.textContent = "Enter the decryption passphrase first."; return; }
1245
1242
 
1246
1243
  const payload = extractPayload(location.hash.slice(1));
1247
1244
  if (!payload) { errEl.textContent = "No encrypted data found in URL."; return; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qr-secure-send",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "description": "Encrypt and transfer secrets via QR code",
5
5
  "keywords": ["qr", "qrcode", "encryption", "password", "secure", "transfer"],
6
6
  "author": "",