Fix the mechanical style rules. [skip build]

This commit is contained in:
2026-11-01 09:01:32 +11:00
parent 831ce01150
commit 9591d8d01b
42 changed files with 762 additions and 756 deletions
+18 -18
View File
@@ -1,3 +1,21 @@
/**
* Check if we're running inside Electron (not Tauri)
*/
export const isElectron = (): boolean => typeof window !== 'undefined' && 'electron' in window;
/**
* Check if we're running inside a Capacitor native app
*/
export const isCapacitorNative = (): boolean => {
if (typeof window === 'undefined') return false;
const cap = (window as any).Capacitor;
return Boolean(
cap?.isNativePlatform?.() ||
cap?.getPlatform?.() === 'android' ||
cap?.getPlatform?.() === 'ios',
);
};
/**
* Open an external URL using Electron's shell.openExternal, or window.open in browser
* @param url The URL to open
@@ -174,24 +192,6 @@ export const setupNotificationTapListener = async (
*/
export const isTauri = (): boolean => '__TAURI__' in window || '__TAURI_INTERNALS__' in window;
/**
* Check if we're running inside Electron (not Tauri)
*/
export const isElectron = (): boolean => typeof window !== 'undefined' && 'electron' in window;
/**
* Check if we're running inside a Capacitor native app
*/
export const isCapacitorNative = (): boolean => {
if (typeof window === 'undefined') return false;
const cap = (window as any).Capacitor;
return Boolean(
cap?.isNativePlatform?.() ||
cap?.getPlatform?.() === 'android' ||
cap?.getPlatform?.() === 'ios',
);
};
/**
* Check if we're running on a mobile platform (Android/iOS)
*/