forked from trent_larson/crowd-funder-for-time-pwa
feat: Improve database export with native sharing on mobile
- Enhance CapacitorPlatformService to use native share sheet via Web Share API - Add fallback to Capacitor Share API with temporary file storage - Implement WebPlatformService export with direct download for desktop - Clean up temporary files and URLs after sharing/download The changes provide a more platform-appropriate experience: - Mobile: Uses system share sheet for flexible saving/sharing options - Desktop: Direct download to user's download folder
This commit is contained in:
@@ -46,6 +46,15 @@ export interface PlatformService {
|
||||
*/
|
||||
listFiles(directory: string): Promise<string[]>;
|
||||
|
||||
/**
|
||||
* Exports a database blob to a file, handling platform-specific save operations.
|
||||
* @param blob - The database blob to export
|
||||
* @param fileName - The name of the file to save
|
||||
* @returns Promise that resolves when the export is complete
|
||||
* @throws Error if export fails
|
||||
*/
|
||||
exportDatabase(blob: Blob, fileName: string): Promise<void>;
|
||||
|
||||
// Camera operations
|
||||
/**
|
||||
* Activates the device camera to take a picture.
|
||||
|
||||
Reference in New Issue
Block a user