Files
crowd-funder-from-jason/src/services/platforms/PyWebViewPlatformService.ts
Matthew Raymer 660f2170de fix: improve error handling in photo upload
- Add proper unknown type for error handling in PhotoDialog
- Remove any type in favor of unknown for better type safety
- Fix error message access with type guards
2025-04-07 07:29:52 +00:00

52 lines
1.2 KiB
TypeScript

import { ImageResult, PlatformService } from "../PlatformService";
import { logger } from "../../utils/logger";
export class PyWebViewPlatformService implements PlatformService {
async readFile(_path: string): Promise<string> {
throw new Error("Not implemented");
}
async writeFile(_path: string, _content: string): Promise<void> {
throw new Error("Not implemented");
}
async deleteFile(_path: string): Promise<void> {
throw new Error("Not implemented");
}
async listFiles(_directory: string): Promise<string[]> {
throw new Error("Not implemented");
}
async takePicture(): Promise<ImageResult> {
logger.error("takePicture not implemented in PyWebView platform");
throw new Error("Not implemented");
}
async pickImage(): Promise<ImageResult> {
logger.error("pickImage not implemented in PyWebView platform");
throw new Error("Not implemented");
}
isCapacitor(): boolean {
return false;
}
isElectron(): boolean {
return false;
}
isPyWebView(): boolean {
return true;
}
isWeb(): boolean {
return false;
}
async handleDeepLink(_url: string): Promise<void> {
logger.error("handleDeepLink not implemented in PyWebView platform");
throw new Error("Not implemented");
}
}