Skip to content

Commit b47411b

Browse files
vijaythecoderclaude
andcommitted
Fix OpenAI link to open in default browser instead of mini window
- Convert OpenAI API key link from anchor to button - Add openOpenAI function using /api/open-external endpoint - Ensure consistent behavior for both GitHub and OpenAI links - Both external links now open in system default browser 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 3fd958f commit b47411b

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

resources/js/pages/Onboarding.vue

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@
7777
<div class="rounded-lg bg-gray-50 p-3 dark:bg-gray-900/50">
7878
<p class="text-sm text-gray-600 dark:text-gray-400">
7979
Need an API key?
80-
<a href="https://platform.openai.com/api-keys" target="_blank" class="font-medium text-gray-900 underline hover:text-gray-700 dark:text-gray-100 dark:hover:text-gray-300">
80+
<button @click="openOpenAI" class="font-medium text-gray-900 underline hover:text-gray-700 dark:text-gray-100 dark:hover:text-gray-300">
8181
Get one from OpenAI
82-
</a>
82+
</button>
8383
</p>
8484
</div>
8585
</div>
@@ -238,6 +238,19 @@ const openGitHub = async () => {
238238
}
239239
}
240240
241+
const openOpenAI = async () => {
242+
try {
243+
// Use NativePHP API endpoint to open in default browser
244+
await axios.post('/api/open-external', {
245+
url: 'https://platform.openai.com/api-keys'
246+
})
247+
} catch (error) {
248+
console.error('Failed to open OpenAI:', error)
249+
// Fallback for web browser
250+
window.open('https://platform.openai.com/api-keys', '_blank')
251+
}
252+
}
253+
241254
const completeOnboarding = () => {
242255
// Navigate to realtime agent
243256
router.visit('/realtime-agent')

0 commit comments

Comments
 (0)