fix: only show copy button on secure context

This commit is contained in:
peaklabs-dev
2024-12-13 20:57:58 +01:00
parent 94bc604fbe
commit 260e44d3db
2 changed files with 3 additions and 0 deletions

View File

@@ -59,6 +59,7 @@
class="font-mono pr-10"
/>
<button
x-show="window.isSecureContext"
@click="navigator.clipboard.writeText(secretKey); copiedSecretKey = true; setTimeout(() => copiedSecretKey = false, 2000)"
class="absolute right-2 bottom-1 p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700"
>
@@ -78,6 +79,7 @@
class="font-mono pr-10"
/>
<button
x-show="window.isSecureContext"
@click="navigator.clipboard.writeText(otpUrl); copiedOtpUrl = true; setTimeout(() => copiedOtpUrl = false, 2000)"
class="absolute right-2 bottom-1 p-1 rounded hover:bg-gray-200 dark:hover:bg-gray-700"
>