fix: PasswordGen TS error — navigator not available in Vue template scope
All checks were successful
Build & Sign Wraith / Build Windows + Sign (push) Successful in 3m3s

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Vantz Stockwell 2026-03-25 00:23:51 -04:00
parent 15055aeb01
commit ef377e8fe8

View File

@ -25,7 +25,7 @@
<h3 class="text-xs text-[#8b949e] mb-2">History</h3> <h3 class="text-xs text-[#8b949e] mb-2">History</h3>
<div v-for="(pw, i) in history" :key="i" class="flex items-center gap-2 py-1 border-b border-[#21262d]"> <div v-for="(pw, i) in history" :key="i" class="flex items-center gap-2 py-1 border-b border-[#21262d]">
<span class="flex-1 font-mono text-xs text-[#8b949e] truncate">{{ pw }}</span> <span class="flex-1 font-mono text-xs text-[#8b949e] truncate">{{ pw }}</span>
<button class="text-[10px] text-[#58a6ff] hover:underline cursor-pointer" @click="navigator.clipboard.writeText(pw)">copy</button> <button class="text-[10px] text-[#58a6ff] hover:underline cursor-pointer" @click="copyText(pw)">copy</button>
</div> </div>
</div> </div>
</div> </div>
@ -60,4 +60,8 @@ async function generate(): Promise<void> {
function copy(): void { function copy(): void {
navigator.clipboard.writeText(password.value).catch(() => {}); navigator.clipboard.writeText(password.value).catch(() => {});
} }
function copyText(text: string): void {
navigator.clipboard.writeText(text).catch(() => {});
}
</script> </script>