forked from jsnbuchanan/crowd-funder-for-time-pwa
- 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
52 lines
1.2 KiB
TypeScript
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");
|
|
}
|
|
}
|