One-click backups for AT Protocol

feat: auto-close window after auth completion

Turtlepaw 07585801 c049cbf6

Changed files
+9 -1
docs
app
auth
complete
+9 -1
docs/app/auth/complete/page.tsx
··· 23 23 currentUrl.search || "?" + currentUrl.hash.slice(1) 24 24 }`; 25 25 26 - // Open the URL in the system's default handler 26 + // Open the URL in the system's default handler and close the window after a short delay 27 27 window.location.href = redirectUrl; 28 + 29 + // Close the window after a short delay to ensure the protocol handler is triggered 30 + setTimeout(() => { 31 + window.close(); 32 + // Fallback message if window.close() fails (some browsers prevent it) 33 + document.body.innerHTML = 34 + '<div class="min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-50"><div class="max-w-md w-full p-8 text-center"><p class="text-lg text-gray-600">Authentication complete! You can close this window.</p></div></div>'; 35 + }, 1500); 28 36 }, []); 29 37 30 38 return (