2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2024-06-18 11:52:19 +00:00

Support macOS 10.4+ Dark Mode, default to Electron 5.x (#796)

Introduces a `--darwin-dark-mode-support` flag. 
(I kept the same flag used by Electron Packager.)
This required bumping Electron and Electron Packager.

Addresses:

- https://github.com/jiahaog/nativefier/issues/733
- https://github.com/jiahaog/nativefier/issues/727
This commit is contained in:
Nate Woolls 2019-08-22 15:05:39 -04:00 committed by Ronan Jouchet
parent b959956a38
commit 5433569921
7 changed files with 17 additions and 2 deletions

View File

@ -64,6 +64,7 @@
- [[file-download-options]](#file-download-options)
- [[always-on-top]](#always-on-top)
- [[global-shortcuts]](#global-shortcuts)
- [[darwin-dark-mode-support]](#darwin-dark-mode-support)
- [Programmatic API](#programmatic-api)
- [Addition packaging options for Windows](#addition-packaging-options-for-windows)
- [[version-string]](#version-string)
@ -694,6 +695,13 @@ Example `shortcuts.json` for `https://deezer.com` & `https://soundcloud.com` to
]
```
#### [darwin-dark-mode-support]
```
--darwin-dark-mode-support
```
Enables Dark Mode support on macOS 10.4+.
## Programmatic API

View File

@ -47,7 +47,7 @@
"babel-polyfill": "^6.26.0",
"cheerio": "^1.0.0-rc.2",
"commander": "^2.14.0",
"electron-packager": "^12.0.1",
"electron-packager": "^12.2.0",
"gitcloud": "^0.1.0",
"hasbin": "^1.2.3",
"lodash": "^4.17.5",

View File

@ -58,6 +58,7 @@ function selectAppArgs(options) {
alwaysOnTop: options.alwaysOnTop,
titleBarStyle: options.titleBarStyle,
globalShortcuts: options.globalShortcuts,
darwinDarkModeSupport: options.darwinDarkModeSupport,
};
}

View File

@ -238,6 +238,10 @@ if (require.main === module) {
'--global-shortcuts <value>',
'JSON file with global shortcut configuration. See https://github.com/jiahaog/nativefier/blob/master/docs/api.md#global-shortcuts',
)
.option(
'--darwin-dark-mode-support',
'(macOS only) enable Dark Mode support on macOS 10.14+',
)
.parse(sanitizedArgs);
if (!process.argv.slice(2).length) {

View File

@ -1,5 +1,5 @@
import path from 'path';
export const DEFAULT_APP_NAME = 'APP';
export const ELECTRON_VERSION = '3.1.7';
export const ELECTRON_VERSION = '5.0.10';
export const PLACEHOLDER_APP_DIR = path.join(__dirname, './../', 'app');

View File

@ -6,6 +6,7 @@ class PackagerConsole {
this.logs = [];
}
// eslint-disable-next-line no-underscore-dangle
_log(...messages) {
this.logs.push(...messages);
}

View File

@ -77,6 +77,7 @@ export default function(inpOptions) {
alwaysOnTop: inpOptions.alwaysOnTop || false,
titleBarStyle: inpOptions.titleBarStyle || null,
globalShortcuts: inpOptions.globalShortcuts || null,
darwinDarkModeSupport: inpOptions.darwinDarkModeSupport || false,
};
if (options.verbose) {