diff --git a/client/src/components/video-modal.tsx b/client/src/components/video-modal.tsx index 9b2e4f6..f0eb639 100644 --- a/client/src/components/video-modal.tsx +++ b/client/src/components/video-modal.tsx @@ -225,9 +225,26 @@ export default function VideoModal({ video, isOpen, onClose }: VideoModalProps) const copyToClipboard = async () => { try { await navigator.clipboard.writeText(getShareUrl()); - alert('Link copied to clipboard!'); + // Simple notification instead of alert + const notification = document.createElement('div'); + notification.textContent = 'Link copied!'; + notification.className = 'fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded-lg z-50 transition-opacity duration-300'; + document.body.appendChild(notification); + setTimeout(() => { + notification.style.opacity = '0'; + setTimeout(() => document.body.removeChild(notification), 300); + }, 2000); + setShowShareMenu(false); } catch (error) { console.error('Failed to copy link:', error); + // Fallback for older browsers + const textArea = document.createElement('textarea'); + textArea.value = getShareUrl(); + document.body.appendChild(textArea); + textArea.select(); + document.execCommand('copy'); + document.body.removeChild(textArea); + setShowShareMenu(false); } }; @@ -288,41 +305,50 @@ export default function VideoModal({ video, isOpen, onClose }: VideoModalProps) {/* Share Menu */} {showShareMenu && (