Don't auto hide View menu on windows and Linux

pull/11/head
Dave Conway-Jones 2019-11-16 23:44:59 +00:00
rodzic ef04bf5e87
commit 1ec358a110
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 302A6725C594817F
4 zmienionych plików z 12 dodań i 14 usunięć

13
.gitignore vendored
Wyświetl plik

@ -1,18 +1,15 @@
dist/*
lib/*
package-lock.json
node_modules
logs
.config.json
.flows.json.backup
.electronflow*
.sessions.json
*darwin-x64*
*linux-x64*
*win32-x64*
*.back
.config.json.backup
.electronflow*
*.backup
logs
*.back*
*.log
yarn.lock
*lock*
*error*

Wyświetl plik

@ -1 +1 @@
docker run --rm -ti --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine && yarn && yarn dist
docker run --rm -ti --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') --env ELECTRON_CACHE="/root/.cache/electron" --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" -v ${PWD}:/project -v ${PWD##*/}-node-modules:/project/node_modules -v ~/.cache/electron:/root/.cache/electron -v ~/.cache/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine

File diff suppressed because one or more lines are too long

Wyświetl plik

@ -5,7 +5,7 @@ let options;
if (pkg.hasOwnProperty("NRelectron")) { options = pkg["NRelectron"] }
// Some settings you can edit if you don't set them in package.json
console.log(options)
//console.log(options)
const editable = options.editable || true; // set this to false to create a run only application - no editor/no console
const allowLoadSave = options.allowLoadSave || false; // set to true to allow import and export of flow file
const showMap = options.showMap || false; // set to true to add Worldmap to the menu
@ -157,7 +157,7 @@ red_app.use(settings.httpNodeRoot,RED.httpNode);
// Create the Application's main menu
var template = [{
label: 'Node-RED',
label: "View",
submenu: [
{ label: 'Import Flow',
accelerator: "Shift+CmdOrCtrl+O",
@ -320,17 +320,18 @@ function createWindow() {
height: 768,
icon: path.join(__dirname, nrIcon),
fullscreenable: true,
autoHideMenuBar: false,
kiosk: kioskMode,
autoHideMenuBar: true,
webPreferences: {
nodeIntegration: false
}
});
const menu = Menu.buildFromTemplate(template);
Menu.setApplicationMenu(menu);
if (process.platform !== 'darwin') { mainWindow.autoHideMenuBar(true); }
mainWindow.loadURL(`file://${__dirname}/load.html`);
//if (process.platform !== 'darwin') { mainWindow.setAutoHideMenuBar(true); }
mainWindow.webContents.on('did-get-response-details', function(event, status, newURL, originalURL, httpResponseCode) {
if ((httpResponseCode == 404) && (newURL == ("http://localhost:"+listenPort+urlStart))) {