fix(clipboard): copy toasts reflect the configured clear delay
The "clears in 30s" suffix was hardcoded in ~14 toasts. Single helper
clipClearSuffix() reads clipboardClearSeconds (''=Never); prefixes concatenated
to it. Cheatsheet text made generic "(auto-clears)".
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -733,10 +733,10 @@ async function doGenerateRecoveryKey() {
|
||||
// running embedded, navigator.clipboard with manual scrub
|
||||
// otherwise.
|
||||
if (Bridge.copySecure(code, 30000)) {
|
||||
toast('Recovery code copied · clears in 30s');
|
||||
toast('Recovery code copied' + clipClearSuffix());
|
||||
} else {
|
||||
navigator.clipboard.writeText(code).then(() => {
|
||||
toast('Recovery code copied · clears in 30s');
|
||||
toast('Recovery code copied' + clipClearSuffix());
|
||||
setTimeout(() => navigator.clipboard.writeText('').catch(()=>{}), 30000);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user