From d62178bca5ddb833ac6aad82753121611bdf638d Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Fri, 15 Aug 2025 09:07:28 +0000 Subject: [PATCH] refactor(notification): extract business logic to NotificationSettingsService - Created NotificationSettingsService class for settings and permission logic - Separates business logic from UI presentation in NotificationSection - Maintains component lifecycle boundary while improving testability - Service handles settings hydration, persistence, and permission management - Component now focuses purely on UI with computed properties for template access - Added src/composables/useNotificationSettings.ts - Updated src/components/NotificationSection.vue to use service - Resolved TypeScript type issues with PlatformServiceMixin integration --- src/components/NotificationSection.vue | 150 ++++++------- src/composables/useNotificationSettings.ts | 233 +++++++++++++++++++++ src/views/AccountViewView.vue | 42 +--- 3 files changed, 305 insertions(+), 120 deletions(-) create mode 100644 src/composables/useNotificationSettings.ts diff --git a/src/components/NotificationSection.vue b/src/components/NotificationSection.vue index 32c67bac..08beb72a 100644 --- a/src/components/NotificationSection.vue +++ b/src/components/NotificationSection.vue @@ -14,10 +14,7 @@ aria-label="Learn more about reminder notifications" @click.stop="showReminderNotificationInfo" > -