mirror of
https://github.com/Llewellynvdm/nativefier.git
synced 2025-01-03 14:17:29 +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:
parent
b959956a38
commit
5433569921
@ -64,6 +64,7 @@
|
|||||||
- [[file-download-options]](#file-download-options)
|
- [[file-download-options]](#file-download-options)
|
||||||
- [[always-on-top]](#always-on-top)
|
- [[always-on-top]](#always-on-top)
|
||||||
- [[global-shortcuts]](#global-shortcuts)
|
- [[global-shortcuts]](#global-shortcuts)
|
||||||
|
- [[darwin-dark-mode-support]](#darwin-dark-mode-support)
|
||||||
- [Programmatic API](#programmatic-api)
|
- [Programmatic API](#programmatic-api)
|
||||||
- [Addition packaging options for Windows](#addition-packaging-options-for-windows)
|
- [Addition packaging options for Windows](#addition-packaging-options-for-windows)
|
||||||
- [[version-string]](#version-string)
|
- [[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
|
## Programmatic API
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
"babel-polyfill": "^6.26.0",
|
"babel-polyfill": "^6.26.0",
|
||||||
"cheerio": "^1.0.0-rc.2",
|
"cheerio": "^1.0.0-rc.2",
|
||||||
"commander": "^2.14.0",
|
"commander": "^2.14.0",
|
||||||
"electron-packager": "^12.0.1",
|
"electron-packager": "^12.2.0",
|
||||||
"gitcloud": "^0.1.0",
|
"gitcloud": "^0.1.0",
|
||||||
"hasbin": "^1.2.3",
|
"hasbin": "^1.2.3",
|
||||||
"lodash": "^4.17.5",
|
"lodash": "^4.17.5",
|
||||||
|
@ -58,6 +58,7 @@ function selectAppArgs(options) {
|
|||||||
alwaysOnTop: options.alwaysOnTop,
|
alwaysOnTop: options.alwaysOnTop,
|
||||||
titleBarStyle: options.titleBarStyle,
|
titleBarStyle: options.titleBarStyle,
|
||||||
globalShortcuts: options.globalShortcuts,
|
globalShortcuts: options.globalShortcuts,
|
||||||
|
darwinDarkModeSupport: options.darwinDarkModeSupport,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,6 +238,10 @@ if (require.main === module) {
|
|||||||
'--global-shortcuts <value>',
|
'--global-shortcuts <value>',
|
||||||
'JSON file with global shortcut configuration. See https://github.com/jiahaog/nativefier/blob/master/docs/api.md#global-shortcuts',
|
'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);
|
.parse(sanitizedArgs);
|
||||||
|
|
||||||
if (!process.argv.slice(2).length) {
|
if (!process.argv.slice(2).length) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
|
|
||||||
export const DEFAULT_APP_NAME = 'APP';
|
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');
|
export const PLACEHOLDER_APP_DIR = path.join(__dirname, './../', 'app');
|
||||||
|
@ -6,6 +6,7 @@ class PackagerConsole {
|
|||||||
this.logs = [];
|
this.logs = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-underscore-dangle
|
||||||
_log(...messages) {
|
_log(...messages) {
|
||||||
this.logs.push(...messages);
|
this.logs.push(...messages);
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,7 @@ export default function(inpOptions) {
|
|||||||
alwaysOnTop: inpOptions.alwaysOnTop || false,
|
alwaysOnTop: inpOptions.alwaysOnTop || false,
|
||||||
titleBarStyle: inpOptions.titleBarStyle || null,
|
titleBarStyle: inpOptions.titleBarStyle || null,
|
||||||
globalShortcuts: inpOptions.globalShortcuts || null,
|
globalShortcuts: inpOptions.globalShortcuts || null,
|
||||||
|
darwinDarkModeSupport: inpOptions.darwinDarkModeSupport || false,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options.verbose) {
|
if (options.verbose) {
|
||||||
|
Loading…
Reference in New Issue
Block a user