feat(clipboard): user-configurable auto-clear delay (Never/15/30/60/120s)

Single choke point: copySecure overrides any positive clearAfterMs with the
clipboardClearSeconds setting (0 = user disabled). The 15 call sites keep
passing 30000 unchanged — positive just means "auto-clear this secret";
explicit 0 (username copies) still never clears. Synced setting + a select in
Settings > Security (Clipboard privacy). Win+V history exclusion is
deliberately NOT exposed — a password manager must not offer to leak into
history / cloud clipboard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-12 11:48:08 +01:00
parent 3822c21194
commit 8cfa1b0d6a
2 changed files with 32 additions and 2 deletions
+13
View File
@@ -691,6 +691,19 @@
automatically when the app is minimised — no manual setup needed.
</p>
<button class="btn btn-ghost btn-sm" id="openClipboardSettings">How?</button>
<div class="setting-row" style="margin-top:8px">
<span>
Auto-clear copied secrets after
<small class="setting-hint">Only clears if you haven't copied something else since.</small>
</span>
<select id="settingClipboardClear">
<option value="0">Never</option>
<option value="15">15 seconds</option>
<option value="30">30 seconds</option>
<option value="60">1 minute</option>
<option value="120">2 minutes</option>
</select>
</div>
</div>
<div class="slideover-field">