fallback prompt for copy button in insecure contexts

This commit is contained in:
Henry Dollman
2024-07-24 15:32:20 -04:00
parent 345dbeb757
commit ee57e84cb8

View File

@@ -20,12 +20,13 @@ export async function copyToClipboard(content: string) {
description: 'Copied to clipboard', description: 'Copied to clipboard',
}) })
} catch (e: any) { } catch (e: any) {
toast({ prompt(
duration, 'Automatic copy requires a secure context (https, localhost, or *.localhost). Please copy manually:',
description: 'Failed to copy', content
}) )
} }
} }
const verifyAuth = () => { const verifyAuth = () => {
pb.collection('users') pb.collection('users')
.authRefresh() .authRefresh()