Skip to content
Snippets Groups Projects
Unverified Commit 4d8efccc authored by Matiss Janis Aboltins's avatar Matiss Janis Aboltins Committed by GitHub
Browse files

:wrench: (electron) improved OS detection (#1658)

* :wrench: (electron) improved OS detection

* Release notes
parent 0e539d91
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@
},
"scripts": {
"start": "yarn start:browser",
"start:desktop": "npm-run-all --parallel 'start:desktop-*'",
"start:desktop": "yarn rebuild-electron && npm-run-all --parallel 'start:desktop-*'",
"start:desktop-node": "yarn workspace loot-core watch:node",
"start:desktop-client": "yarn workspace @actual-app/web watch",
"start:desktop-electron": "yarn workspace desktop-electron watch",
......
const isWindows =
navigator.platform && navigator.platform.toLowerCase() === 'win32';
const os = require('os');
const isMac =
navigator.platform && navigator.platform.toUpperCase().indexOf('MAC') >= 0;
const isWindows = os.platform() === 'win32';
const isMac = os.platform() === 'darwin';
const isLinux = os.platform() === 'linux';
export const isPlaywright = navigator.userAgent === 'playwright';
export const isPlaywright = false;
export const OS: 'windows' | 'mac' | 'linux' | 'unknown' = isWindows
? 'windows'
: isMac
? 'mac'
: 'linux';
: isLinux
? 'linux'
: 'unknown';
export const env: 'web' | 'mobile' | 'unknown' = 'unknown';
export const isBrowser = false;
---
category: Maintenance
authors: [MatissJanis]
---
Electron: improving operating system detection
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment