mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix: resolve android plugin registration and electron upload runtime detection regressions
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import { Capacitor } from '@capacitor/core';
|
||||
import type { UploadMode } from './types';
|
||||
|
||||
function isElectronRuntime(): boolean {
|
||||
return window.electronApi?.isElectron === true || window.isElectron === true;
|
||||
}
|
||||
|
||||
/** Web runtime = web browser, not Electron */
|
||||
export function isWebRuntime(): boolean {
|
||||
return Capacitor.getPlatform() === 'web' && !window.electronApi?.isElectron;
|
||||
return Capacitor.getPlatform() === 'web' && !isElectronRuntime();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user