diff --git a/src/components/OnboardingDialog.tsx b/src/components/OnboardingDialog.tsx index a83175d5..4385eeb4 100644 --- a/src/components/OnboardingDialog.tsx +++ b/src/components/OnboardingDialog.tsx @@ -1,7 +1,7 @@ import { useState, useEffect, useRef } from 'react'; import { generateSecretKey } from 'nostr-tools'; import { nip19 } from 'nostr-tools'; -import { Bot, Check, Sparkles, ArrowRight, ArrowLeft, ExternalLink, Search, Coins } from 'lucide-react'; +import { Bot, Check, Sparkles, ArrowRight, ArrowLeft, Search, Coins } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import { Dialog, DialogContent, DialogHeader, DialogTitle } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; @@ -9,7 +9,7 @@ import { Card, CardHeader, CardTitle } from '@/components/ui/card'; import { Skeleton } from '@/components/ui/skeleton'; import { Checkbox } from '@/components/ui/checkbox'; import { Input } from '@/components/ui/input'; -import { PasswordInput } from '@/components/ui/password-input'; +import { ExternalInput } from '@/components/ui/external-input'; import { useAISettings } from '@/hooks/useAISettings'; import { useCurrentUser } from '@/hooks/useCurrentUser'; import { useLoginActions } from '@/hooks/useLoginActions'; @@ -465,37 +465,28 @@ export function OnboardingDialog({ open, onOpenChange }: OnboardingDialogProps) {/* API Key Input Section */} {selectedProvider && selectedProvider.apiKeysURL && !selectedProvider.nostr && (
-
-

+

+ } + /> + {selectedProvider.id === 'routstr' ? t('enterCashuToken') : t('enterApiKey')} -

-

- {selectedProvider.id === 'routstr' ? ( - t('requiresCashuToken', { providerName: selectedProvider.name }) - ) : ( - <> - {selectedProvider.name} {t('requiresAnApiKey')}{' '} - {selectedProvider.apiKeysURL ? ( - - {t('apiKey')} - - - ) : ( - t('apiKey') - )} - - )} -

-
- + + setProviderApiKey(e.target.value)} onKeyDown={(e) => { - if (e.key === 'Enter' && providerApiKey.trim()) { + if (e.key === 'Enter' && providerApiKey.trim() && agreedToProviderTerms) { handleContinueFromProviderSelection(); } }} + url={selectedProvider.apiKeysURL} + urlTitle="Get Key" />
)}