kopia lustrzana https://github.com/OpenBuilds/OpenBuilds-CONTROL
Update
rodzic
2bc7a0b5dc
commit
ad3357d16a
|
@ -1,3 +1,4 @@
|
|||
v1.0.169: MacOS: Top Menu and Copy/Paste fixes
|
||||
v1.0.169: Added Estimated Time to Serial Log on GCODE Load.
|
||||
v1.0.168: Improved Grbl Flashing Tool and Moved to "Wizards and Tools", Improved Inch Mode 3D viewer, fix bug in Continious Jog
|
||||
v1.0.167: Improved Memory management for 3D Viewer, Added Inch Mode (Issue#59), Moved Steps/mm Calibration Tools to "Wizards and Tools" menu,
|
||||
|
|
56
index.js
56
index.js
|
@ -55,6 +55,8 @@ var lastsentuploadprogress = 0;
|
|||
// Electron app
|
||||
const electron = require('electron');
|
||||
const electronApp = electron.app;
|
||||
|
||||
|
||||
if (isElectron()) {
|
||||
console.log("Local User Data: " + electronApp.getPath('userData'))
|
||||
electronApp.commandLine.appendSwitch('ignore-gpu-blacklist', 'true')
|
||||
|
@ -62,7 +64,7 @@ if (isElectron()) {
|
|||
electronApp.commandLine.appendSwitch('enable-zero-copy', 'true')
|
||||
electronApp.commandLine.appendSwitch('disable-software-rasterizer', 'true')
|
||||
electronApp.commandLine.appendSwitch('enable-native-gpu-memory-buffers', 'true')
|
||||
// Removing max-old-space-size switch (Introduced in 1.0.168 and removed in 1.0.169) due it causing High CPU load on some PCs.
|
||||
// Removing max-old-space-size switch (Introduced in 1.0.168 and removed in 1.0.169) due it causing High CPU load on some PCs.
|
||||
//electronApp.commandLine.appendSwitch('js-flags', '--max-old-space-size=8192')
|
||||
console.log('Command Line Arguments for Electron: Set OK')
|
||||
}
|
||||
|
@ -492,10 +494,12 @@ app.get('/workspace', (req, res) => {
|
|||
app.post('/upload', function(req, res) {
|
||||
res.header("Access-Control-Allow-Origin", "*");
|
||||
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
|
||||
// console.log(req)
|
||||
//console.log(req)
|
||||
uploadprogress = 0
|
||||
var form = new formidable.IncomingForm();
|
||||
form.parse(req, function(err, fields, files) {});
|
||||
form.parse(req, function(err, fields, files) {
|
||||
// console.log(files);
|
||||
});
|
||||
|
||||
form.on('fileBegin', function(name, file) {
|
||||
console.log('Uploading ' + file.name);
|
||||
|
@ -2174,6 +2178,10 @@ if (isElectron()) {
|
|||
|
||||
function createApp() {
|
||||
createTrayIcon();
|
||||
if (process.platform == 'darwin') {
|
||||
console.log("Creating MacOS Menu")
|
||||
createMenu()
|
||||
}
|
||||
if (process.platform == 'win32' && process.argv.length >= 2) {
|
||||
var openFilePath = process.argv[1];
|
||||
if (openFilePath !== "") {
|
||||
|
@ -2199,6 +2207,48 @@ if (isElectron()) {
|
|||
|
||||
}
|
||||
|
||||
function createMenu() {
|
||||
|
||||
var template = [{
|
||||
label: "Application",
|
||||
submenu: [{
|
||||
label: "Quit",
|
||||
accelerator: "Command+Q",
|
||||
click: function() {
|
||||
if (appIcon) {
|
||||
appIcon.destroy();
|
||||
}
|
||||
electronApp.exit(0);
|
||||
}
|
||||
}]
|
||||
}, {
|
||||
label: "Edit",
|
||||
submenu: [{
|
||||
label: "Cut",
|
||||
accelerator: "CmdOrCtrl+X",
|
||||
selector: "cut:"
|
||||
},
|
||||
{
|
||||
label: "Copy",
|
||||
accelerator: "CmdOrCtrl+C",
|
||||
selector: "copy:"
|
||||
},
|
||||
{
|
||||
label: "Paste",
|
||||
accelerator: "CmdOrCtrl+V",
|
||||
selector: "paste:"
|
||||
},
|
||||
{
|
||||
label: "Select All",
|
||||
accelerator: "CmdOrCtrl+A",
|
||||
selector: "selectAll:"
|
||||
}
|
||||
]
|
||||
}];
|
||||
|
||||
Menu.setApplicationMenu(Menu.buildFromTemplate(template));
|
||||
}
|
||||
|
||||
function createTrayIcon() {
|
||||
if (process.platform !== 'darwin') {
|
||||
appIcon = new Tray(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "OpenBuildsCONTROL",
|
||||
"version": "1.0.169",
|
||||
"version": "1.0.170",
|
||||
"license": "AGPL-3.0",
|
||||
"description": "Machine Interface Driver for OpenBuilds",
|
||||
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
||||
|
|
Ładowanie…
Reference in New Issue