mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
react-devtools: set icon on macos (#21908)
This commit is contained in:
Vendored
+6
@@ -9,6 +9,7 @@
|
||||
|
||||
const {app, BrowserWindow} = require('electron'); // Module to create native browser window.
|
||||
const {join} = require('path');
|
||||
const os = require('os');
|
||||
|
||||
const argv = require('minimist')(process.argv.slice(2));
|
||||
const projectRoots = argv._;
|
||||
@@ -32,6 +33,11 @@ app.on('ready', function() {
|
||||
},
|
||||
});
|
||||
|
||||
// set dock icon for macos
|
||||
if (os.platform() === 'darwin') {
|
||||
app.dock.setIcon(join(__dirname, 'icons/icon128.png'));
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/questions/32402327/
|
||||
mainWindow.webContents.on('new-window', function(event, url) {
|
||||
event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user