export function RecoveryWarning() {
return (
⚠️ Important
Ces 4 mots-clés sont votre seule façon de récupérer votre compte.
Ils ne seront jamais affichés à nouveau.
Ces mots-clés (dictionnaire BIP39) sont utilisés avec PBKDF2 pour chiffrer une clé de chiffrement (KEK) stockée dans l'API Credentials du navigateur. Cette KEK chiffre ensuite votre clé privée stockée dans IndexedDB (système à deux niveaux).
Notez-les dans un endroit sûr. Sans ces mots-clés, vous perdrez définitivement l'accès à votre compte.
)
}
export function RecoveryPhraseDisplay({
recoveryPhrase,
copied,
onCopy,
}: {
recoveryPhrase: string[]
copied: boolean
onCopy: () => void
}) {
return (
{recoveryPhrase.map((word, index) => (
{index + 1}.
{word}
))}
{
void onCopy()
}}
className="w-full py-2 px-4 bg-gray-200 hover:bg-gray-300 rounded-lg text-sm font-medium transition-colors"
>
{copied ? '✓ Copié!' : 'Copier les mots-clés'}
)
}
export function PublicKeyDisplay({ npub }: { npub: string }) {
return (
Votre clé publique (npub)
{npub}
)
}
export function ImportKeyForm({
importKey,
setImportKey,
error,
}: {
importKey: string
setImportKey: (key: string) => void
error: string | null
}) {
return (
<>
{error && {error}
}
>
)
}
export function ImportStepButtons({ loading, onImport, onBack }: { loading: boolean; onImport: () => void; onBack: () => void }) {
return (
Retour
{
void onImport()
}}
disabled={loading}
className="flex-1 py-2 px-4 bg-neon-cyan/20 hover:bg-neon-cyan/30 text-neon-cyan rounded-lg font-medium transition-all border border-neon-cyan/50 hover:shadow-glow-cyan disabled:opacity-50"
>
{loading ? 'Importation...' : 'Importer'}
)
}
export function ChooseStepButtons({
loading,
onGenerate,
onImport,
onClose,
}: {
loading: boolean
onGenerate: () => void
onImport: () => void
onClose: () => void
}) {
return (
{
void onGenerate()
}}
disabled={loading}
className="w-full py-3 px-6 bg-neon-cyan/20 hover:bg-neon-cyan/30 text-neon-cyan rounded-lg font-medium transition-all border border-neon-cyan/50 hover:shadow-glow-cyan disabled:opacity-50"
>
{loading ? 'Génération...' : 'Générer un nouveau compte'}
Importer une clé existante
Annuler
)
}