**Motivations:** - Provide a dedicated interface for managing Nostr keys - Allow users to view public keys (npub and hex) - Enable importing private keys via URL or text format - Respect the existing two-level encryption system **Root causes:** - No dedicated interface for key management - Users need to view their public keys easily - Users need to import keys in various formats (nsec URL, nsec text, hex) **Correctifs:** - None (new feature) **Evolutions:** - Created KeyManagementManager component for key management - Added public key display (npub and hex formats) - Implemented private key import with support for: - nostr:// URLs with nsec - nsec text format (nsec1...) - hex format (64 characters) - Automatic key extraction from URLs - Account replacement warning and confirmation - Recovery phrase display after import - Individual copy buttons for each key format - Integration in settings page **Pages affectées:** - components/KeyManagementManager.tsx (new) - pages/settings.tsx (modified) - features/key-management-configuration.md (new)
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import Head from 'next/head'
|
|
import { PageHeader } from '@/components/PageHeader'
|
|
import { Footer } from '@/components/Footer'
|
|
import { Nip95ConfigManager } from '@/components/Nip95ConfigManager'
|
|
import { KeyManagementManager } from '@/components/KeyManagementManager'
|
|
|
|
export default function SettingsPage() {
|
|
return (
|
|
<>
|
|
<Head>
|
|
<title>Settings - zapwall.fr</title>
|
|
<meta name="description" content="Application settings and configuration" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
</Head>
|
|
<main className="min-h-screen bg-cyber-darker">
|
|
<PageHeader />
|
|
<div className="max-w-4xl mx-auto px-4 py-8">
|
|
<h1 className="text-3xl font-bold text-neon-cyan mb-8">Settings</h1>
|
|
<div className="space-y-8">
|
|
<KeyManagementManager />
|
|
<Nip95ConfigManager />
|
|
</div>
|
|
</div>
|
|
<Footer />
|
|
</main>
|
|
</>
|
|
)
|
|
}
|