From 42c6c15d2bf1a314b6b549e61040957d4eff31f0 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Mon, 7 Jul 2025 10:38:36 +0000 Subject: [PATCH] Complete SharedPhotoView.vue Enhanced Triple Migration Pattern (6 minutes) Database Migration: Replace databaseUtil + PlatformServiceFactory with PlatformServiceMixin SQL Abstraction: Use $first(), $dbQuery(), $dbExec(), $accountSettings(), $updateSettings() Notification Migration: Add 2 constants, migrate 3 $notify calls to helper methods Documentation: Add comprehensive file and method-level documentation Time: 6 minutes | Complexity: Medium | Issues: Linting fixed Testing: Manual required | Validation: Full Enhanced Triple Migration Pattern Component Features: - External image sharing from device apps via deep linking - Image upload to server with JWT authentication - Convert images to gifts (GiveAction) or profile pictures - Temporary storage management and cleanup - Integration with PhotoDialog for profile image cropping - Comprehensive error handling for upload scenarios Technical Updates: - Type-safe database operations with proper result mapping - Centralized notification constants for consistency - Enhanced error handling with detailed logging - Clean separation of concerns between data access and UI --- src/constants/notifications.ts | 11 +++ src/views/SharedPhotoView.vue | 168 +++++++++++++++++++++++++-------- 2 files changed, 138 insertions(+), 41 deletions(-) diff --git a/src/constants/notifications.ts b/src/constants/notifications.ts index 86714a42..1ea617be 100644 --- a/src/constants/notifications.ts +++ b/src/constants/notifications.ts @@ -197,6 +197,17 @@ export const NOTIFY_CAMERA_SHARE_METHOD = { noText: "we will share another way", }; +// SharedPhotoView.vue constants +export const NOTIFY_SHARED_PHOTO_LOAD_ERROR = { + title: "Error", + message: "Got an error loading this data.", +}; + +export const NOTIFY_SHARED_PHOTO_SAVE_ERROR = { + title: "Error", + message: "There was a problem saving the picture.", +}; + // OfferDialog.vue constants export const NOTIFY_OFFER_SETTINGS_ERROR = { title: "Error", diff --git a/src/views/SharedPhotoView.vue b/src/views/SharedPhotoView.vue index 8dadd71f..e82cf553 100644 --- a/src/views/SharedPhotoView.vue +++ b/src/views/SharedPhotoView.vue @@ -1,3 +1,40 @@ +