[Docs] API Auth panel UI overhaul (#1080)

<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->


Updates the API Docs auth panel for a new look.

<img width="404" height="346" alt="image"
src="https://github.com/user-attachments/assets/5791a6ea-ac28-4e35-9d8c-c88a64f86386"
/>

<img width="394" height="622" alt="image"
src="https://github.com/user-attachments/assets/ca7ba243-52f0-49e4-ad21-a4acd652bfe1"
/>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

## Release Notes

* **New Features**
  * Added project dropdown selector with automatic authentication setup
  * Introduced manual mode for direct header configuration
  * Added authentication status indicators

* **Bug Fixes**
  * Unified error handling across desktop and mobile views

* **Style**
* Improved mobile interface with better spacing and safe-area
accommodations
  * Refined panel layout and transition animations

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Madison 2026-01-20 13:05:09 -06:00 committed by GitHub
parent 0c3be92195
commit fa1bb2eea3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -149,6 +149,15 @@ export function AuthPanel() {
// Handle project selection
const handleProjectSelect = (projectId: string) => {
// Handle deselection (empty string)
if (projectId === '') {
setSelectedProjectId('');
// Clear all headers when deselecting
updateSharedHeaders(defaultHeaders);
return;
}
// Validate project exists
if (!projects.some((projectItem) => projectItem.id === projectId)) {
return;
}