Simpl-Resultat/src/components/settings
le king fu 0132e6e164
All checks were successful
PR Check / rust (push) Successful in 21m45s
PR Check / frontend (push) Successful in 2m17s
PR Check / rust (pull_request) Successful in 21m1s
PR Check / frontend (pull_request) Successful in 2m13s
feat(categories): add restore backup banner and permanent restore action (#122)
Surfaces the pre-migration SREF backup to the user so they can roll back a
category migration without digging into the filesystem:

- 90-day dismissable banner at the top of Settings > Categories pointing to
  the automatic backup (hidden once reverted, once dismissed, or past 90d).
- Permanent "Restore a backup" entry in Settings > Categories, available as
  long as a migration journal exists (even past the 90-day window).
- Confirmation modal with two-step consent, red Restore button, fallback
  file picker when the recorded path is missing, PIN prompt for encrypted
  SREF files, full-page reload on success.

Internals:
- New `categoryRestoreService` wrapping `read_import_file` +
  `importTransactionsWithCategories` with stable error codes
  (file_missing, read_failed, parse_failed, wrong_envelope_type,
  needs_password, wrong_password, import_failed).
- New `file_exists` Tauri command for the pre-flight presence check.
- On success: `categories_schema_version=v2` + merge `reverted_at` into
  `last_categories_migration`.
- Pure `shouldShowBanner` / `isWithinBannerWindow` helpers with tests.
- FR/EN i18n keys under `settings.categoriesCard.restore*`.
- CHANGELOG entries in both locales.

Closes #122
2026-04-20 21:47:43 -04:00
..
AccountCard.tsx fix: tighten CSP img-src, show initials instead of external avatar 2026-04-10 15:24:52 -04:00
CategoriesCard.tsx feat(categories): add restore backup banner and permanent restore action (#122) 2026-04-20 21:47:43 -04:00
CategoriesMigrationBackupBanner.tsx feat(categories): add restore backup banner and permanent restore action (#122) 2026-04-20 21:47:43 -04:00
CategoriesMigrationRestoreModal.tsx feat(categories): add restore backup banner and permanent restore action (#122) 2026-04-20 21:47:43 -04:00
DataManagementCard.tsx feat: add data export/import with optional AES-256-GCM encryption (#3) 2026-02-15 11:40:28 +00:00
FeedbackConsentDialog.tsx feat: feedback hub widget in Settings Logs card (#67) 2026-04-17 14:36:26 +00:00
FeedbackDialog.tsx feat: feedback hub widget in Settings Logs card (#67) 2026-04-17 14:36:26 +00:00
ImportConfirmModal.tsx feat: add data export/import with optional AES-256-GCM encryption (#3) 2026-02-15 11:40:28 +00:00
LicenseCard.tsx feat: Maximus Account OAuth2 PKCE + machine activation + subscription check (#51, #53) 2026-04-10 14:18:51 -04:00
LogViewerCard.tsx feat: feedback hub widget in Settings Logs card (#67) 2026-04-17 14:36:26 +00:00
TokenStoreFallbackBanner.tsx feat: dismissable banner with session-storage memory (#81) 2026-04-14 08:20:20 -04:00