7 Commits

Author SHA1 Message Date
cdd923e981 lint fix wip 2026-01-06 20:59:59 +01:00
cc49c9d7c1 Add language preference selector in settings
**Motivations:**
- Allow users to set their preferred language (fr/en) in the settings page
- Load language preference from localStorage at startup to configure the application locale

**Root causes:**
- Language preference was only available in the header via LanguageSelector component
- Language preference was stored in IndexedDB instead of localStorage
- No centralized language settings management in the settings page

**Correctifs:**
- Created LanguageSettingsManager component for settings page
- Migrated language storage from IndexedDB to localStorage for consistency
- Updated _app.tsx to load locale from localStorage synchronously at startup
- Updated useI18n hook to use localStorage instead of IndexedDB
- Updated LanguageSelector component to use localStorage instead of IndexedDB

**Evolutions:**
- Added language preference section in settings page (displayed first)
- Language preference is now loaded at application startup from localStorage
- Added translations for language settings (settings.language.*)

**Pages affectées:**
- components/LanguageSettingsManager.tsx (new)
- pages/settings.tsx
- pages/_app.tsx
- hooks/useI18n.ts
- components/LanguageSelector.tsx
- locales/fr.txt
- locales/en.txt
2026-01-06 14:57:38 +01:00
13e0e0d801 lint fix wip 2026-01-06 14:17:55 +01:00
412989e6af lint fix wip 2026-01-06 11:30:23 +01:00
32b33d56a1 Add translations for settings page (fr/en)
**Motivations:**
- Translate settings page and all its components to French and English
- Provide consistent multilingual experience

**Root causes:**
- Settings page and components were hardcoded in English
- No translation support for key management and NIP-95 configuration

**Correctifs:**
- None (new feature)

**Evolutions:**
- Added translations for settings page title
- Added translations for KeyManagementManager component:
  - Public keys display (npub and hex)
  - Import form and validation messages
  - Recovery phrase display
  - All buttons and warnings
- Added translations for Nip95ConfigManager component:
  - Endpoint list and management
  - Add/edit/remove actions
  - Error messages
- Updated both fr.txt and en.txt translation files
- All text now uses t() function for i18n support

**Pages affectées:**
- pages/settings.tsx
- components/KeyManagementManager.tsx
- components/Nip95ConfigManager.tsx
- public/locales/fr.txt
- public/locales/en.txt
- locales/fr.txt
- locales/en.txt
2026-01-05 22:43:11 +01:00
7791370b37 Add key management configuration page
**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)
2026-01-05 22:13:40 +01:00
a90b77cec3 Fix: NIP-95 upload 500 error 2026-01-05 21:22:49 +01:00