From d03fa5500161ae0700557a3e63b849ba4de0a2c9 Mon Sep 17 00:00:00 2001 From: Matthew Raymer Date: Tue, 8 Apr 2025 11:29:39 +0000 Subject: [PATCH] refactor(platform): replace platform checks with capability-based system - Add PlatformCapabilities interface to define available features - Remove isWeb(), isCapacitor(), isElectron(), isPyWebView() methods - Update platform services to implement getCapabilities() - Refactor DataExportSection to use capability checks instead of platform checks - Improve platform abstraction and separation of concerns - Make platform-specific logic more maintainable and extensible This change decouples components from specific platform implementations, making the codebase more maintainable and easier to extend with new platforms. --- .../buildOutputCleanup.lock | Bin 17 -> 17 bytes android/.gradle/file-system.probe | Bin 8 -> 8 bytes android/app/src/main/assets/public/index.html | 2 +- src/components/DataExportSection.vue | 38 +++++------- src/services/PlatformService.ts | 55 +++++++++--------- .../platforms/CapacitorPlatformService.ts | 49 +++++----------- .../platforms/ElectronPlatformService.ts | 49 +++++----------- .../platforms/PyWebViewPlatformService.ts | 49 +++++----------- src/services/platforms/WebPlatformService.ts | 17 +++++- 9 files changed, 106 insertions(+), 153 deletions(-) diff --git a/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock index af452334b0ea08f2ce4a4670c56381b07edd37e9..16c60848e71561ea28ebba0b2e207f330bbf78bc 100644 GIT binary patch literal 17 VcmZQ>duy#wxduy#wx TimeSafari - +