Skip to content

Commit e6a8413

Browse files
committed
update
1 parent 77a119a commit e6a8413

136 files changed

Lines changed: 687 additions & 10165 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/mobile/capacitor.config.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ const config: CapacitorConfig = {
1010
appId: 'com.cleanshare.pro',
1111
appName: 'CleanShare Pro',
1212
webDir: 'web',
13-
bundledWebRuntime: false,
14-
plugins: {
15-
ShareIn: {},
16-
Vision: {},
17-
PdfTools: {}
18-
}
13+
bundledWebRuntime: false
1914
};
2015

2116
export default config;

‎apps/mobile/package.json‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,9 @@
77
"build": "echo 'Please run the UI build and copy it into apps/mobile/web before packaging'"
88
},
99
"dependencies": {
10-
"@capacitor/core": "^5.0.5",
11-
"@capacitor/android": "^5.0.5",
12-
"@capacitor/ios": "^5.0.5",
13-
"@cleanshare/ui": "workspace:*",
14-
"@cleanshare/native-bridge": "workspace:*",
15-
"@cleanshare/core-detect": "workspace:*",
16-
"@cleanshare/wasm": "workspace:*"
10+
"@capacitor/android": "^7.4.3",
11+
"@capacitor/core": "^7.4.3",
12+
"@capacitor/ios": "^7.4.3",
13+
"@cleanshare/ui": "workspace:*"
1714
}
1815
}

‎apps/mobile/web/main.js‎

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Main application entry point for CleanShare Pro mobile app
22

3-
// Import necessary modules when available
3+
// Import necessary modules when available (100% WebView architecture)
44
let coreDetect = null;
5-
let nativeBridge = null;
65
let wasmWorkers = null;
76

87
// Real detection logic from core-detect package
@@ -450,25 +449,8 @@ This file is safe to share.`;
450449
console.warn('✗ Core detection module not available:', error.message);
451450
}
452451

453-
try {
454-
// Native bridge simulation
455-
console.log('✓ Native bridge functionality available');
456-
nativeBridge = {
457-
ShareIn: {
458-
getSharedFiles: async () => ({ files: [] })
459-
},
460-
Vision: {
461-
recognizeText: async (options) => ({ words: [] }),
462-
detectFaces: async (options) => ({ faces: [] }),
463-
detectBarcodes: async (options) => ({ barcodes: [] })
464-
},
465-
PdfTools: {
466-
sanitizePdf: async (options) => ({ uri: options.uri })
467-
}
468-
};
469-
} catch (error) {
470-
console.warn('✗ Native bridge module not available:', error.message);
471-
}
452+
// Native bridge removed - using 100% WebView architecture
453+
console.log('✓ Using 100% WebView architecture');
472454

473455
try {
474456
// WASM workers simulation
@@ -542,19 +524,12 @@ async function applyRedactions(originalFile, actions, options) {
542524
}
543525
}
544526

545-
// Check for shared files on app startup (mobile only)
527+
// Check for shared files on app startup (100% WebView - no custom plugins)
546528
async function checkSharedFiles() {
547-
if (!nativeBridge || !window.Capacitor?.isNativePlatform()) {
548-
return [];
549-
}
550-
551-
try {
552-
const result = await nativeBridge.ShareIn.getSharedFiles();
553-
return result.files || [];
554-
} catch (error) {
555-
console.warn('Failed to check shared files:', error);
556-
return [];
557-
}
529+
// Note: In 100% WebView architecture, file sharing is handled through
530+
// built-in Capacitor plugins or standard web file picker
531+
console.log('WebView: No custom file sharing plugins - using standard web APIs');
532+
return [];
558533
}
559534

560535
// Enhanced file selection for web environments
@@ -599,19 +574,18 @@ window.CleanSharePro = {
599574
selectFiles,
600575
downloadFile,
601576

602-
// Module references (will be null if not loaded)
577+
// Module references (100% WebView architecture)
603578
get coreDetect() { return coreDetect; },
604-
get nativeBridge() { return nativeBridge; },
605579
get wasmWorkers() { return wasmWorkers; }
606580
};
607581

608582
// Auto-initialize when script loads
609583
initializeModules().then(() => {
610-
console.log('CleanShare Pro mobile app modules initialized');
584+
console.log('CleanShare Pro mobile app modules initialized (100% WebView architecture)');
611585

612586
// Dispatch ready event
613587
window.dispatchEvent(new CustomEvent('cleanshare-ready', {
614-
detail: { modules: { coreDetect, nativeBridge, wasmWorkers } }
588+
detail: { modules: { coreDetect, wasmWorkers } }
615589
}));
616590
}).catch(error => {
617591
console.error('Failed to initialize CleanShare Pro modules:', error);
File renamed without changes.

packages/native-bridge/plugins/pdf-tools/README.md renamed to packages-disabled/native-bridge/plugins/pdf-tools/README.md

File renamed without changes.

packages/native-bridge/plugins/pdf-tools/android/src/main/java/com/cleanshare/pdftools/PdfToolsPlugin.java renamed to packages-disabled/native-bridge/plugins/pdf-tools/android/src/main/java/com/cleanshare/pdftools/PdfToolsPlugin.java

File renamed without changes.

packages/native-bridge/plugins/pdf-tools/ios/Sources/PdfToolsPlugin.swift renamed to packages-disabled/native-bridge/plugins/pdf-tools/ios/Sources/PdfToolsPlugin.swift

File renamed without changes.

packages/native-bridge/plugins/share-in/README.md renamed to packages-disabled/native-bridge/plugins/share-in/README.md

File renamed without changes.

packages/native-bridge/plugins/share-in/android/src/main/java/com/cleanshare/sharein/ShareInPlugin.java renamed to packages-disabled/native-bridge/plugins/share-in/android/src/main/java/com/cleanshare/sharein/ShareInPlugin.java

File renamed without changes.

0 commit comments

Comments
 (0)