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.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.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,
|
v1.0.167: Improved Memory management for 3D Viewer, Added Inch Mode (Issue#59), Moved Steps/mm Calibration Tools to "Wizards and Tools" menu,
|
||||||
|
|
54
index.js
54
index.js
|
@ -55,6 +55,8 @@ var lastsentuploadprogress = 0;
|
||||||
// Electron app
|
// Electron app
|
||||||
const electron = require('electron');
|
const electron = require('electron');
|
||||||
const electronApp = electron.app;
|
const electronApp = electron.app;
|
||||||
|
|
||||||
|
|
||||||
if (isElectron()) {
|
if (isElectron()) {
|
||||||
console.log("Local User Data: " + electronApp.getPath('userData'))
|
console.log("Local User Data: " + electronApp.getPath('userData'))
|
||||||
electronApp.commandLine.appendSwitch('ignore-gpu-blacklist', 'true')
|
electronApp.commandLine.appendSwitch('ignore-gpu-blacklist', 'true')
|
||||||
|
@ -492,10 +494,12 @@ app.get('/workspace', (req, res) => {
|
||||||
app.post('/upload', function(req, res) {
|
app.post('/upload', function(req, res) {
|
||||||
res.header("Access-Control-Allow-Origin", "*");
|
res.header("Access-Control-Allow-Origin", "*");
|
||||||
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
|
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
|
||||||
// console.log(req)
|
//console.log(req)
|
||||||
uploadprogress = 0
|
uploadprogress = 0
|
||||||
var form = new formidable.IncomingForm();
|
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) {
|
form.on('fileBegin', function(name, file) {
|
||||||
console.log('Uploading ' + file.name);
|
console.log('Uploading ' + file.name);
|
||||||
|
@ -2174,6 +2178,10 @@ if (isElectron()) {
|
||||||
|
|
||||||
function createApp() {
|
function createApp() {
|
||||||
createTrayIcon();
|
createTrayIcon();
|
||||||
|
if (process.platform == 'darwin') {
|
||||||
|
console.log("Creating MacOS Menu")
|
||||||
|
createMenu()
|
||||||
|
}
|
||||||
if (process.platform == 'win32' && process.argv.length >= 2) {
|
if (process.platform == 'win32' && process.argv.length >= 2) {
|
||||||
var openFilePath = process.argv[1];
|
var openFilePath = process.argv[1];
|
||||||
if (openFilePath !== "") {
|
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() {
|
function createTrayIcon() {
|
||||||
if (process.platform !== 'darwin') {
|
if (process.platform !== 'darwin') {
|
||||||
appIcon = new Tray(
|
appIcon = new Tray(
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "OpenBuildsCONTROL",
|
"name": "OpenBuildsCONTROL",
|
||||||
"version": "1.0.169",
|
"version": "1.0.170",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"description": "Machine Interface Driver for OpenBuilds",
|
"description": "Machine Interface Driver for OpenBuilds",
|
||||||
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
"author": "github.com/openbuilds <webmaster@openbuilds.com>",
|
||||||
|
|
Ładowanie…
Reference in New Issue