-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Add update mechanism via electron-updater
-Add environment constants -Don't pop open dev tools in about window if we're in prod build
- Loading branch information
1 parent
9148ccd
commit 625bf6d
Showing
3 changed files
with
24 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,26 @@ | ||
import env from 'env'; | ||
|
||
const osMap = { | ||
win32: "Windows", | ||
darwin: "macOS", | ||
linux: "Linux" | ||
win32: 'Windows', | ||
darwin: 'macOS', | ||
linux: 'Linux' | ||
}; | ||
|
||
// Operating system | ||
const osName = process.platform; | ||
const osNameFriendly = osMap[osName]; | ||
const IS_WINDOWS = osName === 'win32'; | ||
const IS_MAC = osName === 'darwin'; | ||
const IS_LINUX = osName === 'linux'; | ||
const IS_WINDOWS = (osName === 'win32'); | ||
const IS_MAC = (osName === 'darwin'); | ||
const IS_LINUX = (osName === 'linux'); | ||
|
||
// Environment | ||
const IS_DEV = (env.name === 'development'); | ||
|
||
export { osName, osNameFriendly, IS_WINDOWS, IS_MAC, IS_LINUX }; | ||
export { | ||
osName, | ||
osNameFriendly, | ||
IS_WINDOWS, | ||
IS_MAC, | ||
IS_LINUX, | ||
IS_DEV | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import appIcon from '../../../resources/icons/512x512.png'; | ||
import { IS_DEV } from '../../constants'; | ||
import openAboutWindow from 'about-window'; | ||
|
||
export const aboutMenu = () => { | ||
openAboutWindow({ | ||
icon_path: appIcon, | ||
copyright: 'Copyright © 2018 Chris Knepper, All rights reserved.', | ||
product_name: 'Android Messages Desktop', | ||
open_devtools: true | ||
open_devtools: IS_DEV | ||
}); | ||
}; |