From 3d8e40e92ba5555c9cc41e77df5ecc2c01a1a372 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Sat, 7 Jun 2025 05:02:33 +0000 Subject: [PATCH] feat(export): Replace CSV export with standardized JSON format - Add contactsToExportJson utility function for standardized data export - Replace CSV export with JSON format in DataExportSection - Update file extension and MIME type to application/json - Remove Dexie-specific export logic in favor of unified SQLite/Dexie approach - Update success notifications to reflect JSON format - Add TypeScript interfaces for export data structure This change improves data portability and standardization by: - Using a consistent JSON format for data export/import - Supporting both SQLite and Dexie databases - Including all contact fields in export - Properly handling contactMethods as stringified JSON - Maintaining backward compatibility with existing import tools Security: No sensitive data exposure, maintains existing access controls --- src/components/DataExportSection.vue | 51 ++++---- src/db/databaseUtil.ts | 36 +++--- src/libs/util.ts | 109 ++++++++++++++--- src/services/migrationService.ts | 20 +-- .../platforms/CapacitorPlatformService.ts | 12 +- src/views/AccountViewView.vue | 3 - src/views/HomeView.vue | 114 ++++++++++++------ src/views/IdentitySwitcherView.vue | 4 - src/views/ProjectViewView.vue | 7 +- 9 files changed, 230 insertions(+), 126 deletions(-) diff --git a/src/components/DataExportSection.vue b/src/components/DataExportSection.vue index 27f36418..c44cab7b 100644 --- a/src/components/DataExportSection.vue +++ b/src/components/DataExportSection.vue @@ -63,13 +63,18 @@ backup and database export, with platform-specific download instructions. * *