diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 66280dc..62cab14 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,4 +1,4 @@ -v1.0.355: Updated installer licence agreement / terms and conditions +v1.0.355: Updated installer license agreement / terms and conditions, Added Email Registration, Fixed Surfacing Wizard menu bug v1.0.354: Fix for double-negative values in Surfacing Wizard v1.0.353: Fixed API integration for cam.openbuilds.com v1.0.352: Added support for nodeIntegration (Additional backend support for awesome JS Macros) diff --git a/app/index.html b/app/index.html index 9aedafb..fdb200e 100644 --- a/app/index.html +++ b/app/index.html @@ -1185,7 +1185,7 @@
- Inputs / Endstops +  Inputs / Endstops
@@ -1234,7 +1234,7 @@
- Power Settings +  Power Settings
@@ -1262,6 +1262,30 @@ +
+
+  Registration Settings +
+
+
+ + + + + + + + + + + + + + +
ParameterStatus
Registered To: NOCOMM
+
+
+ @@ -1357,7 +1381,7 @@
- Communications +  Communications
@@ -1403,7 +1427,7 @@
- Changelog +  Changelog
@@ -1893,8 +1917,6 @@ - - @@ -1907,6 +1929,8 @@ + + diff --git a/app/wizards/mailinglist/mailinglist.js b/app/wizards/mailinglist/mailinglist.js new file mode 100644 index 0000000..4d8cfa0 --- /dev/null +++ b/app/wizards/mailinglist/mailinglist.js @@ -0,0 +1,217 @@ +var mailingListDialog; + + + +$(document).ready(function() { + if (localStorage.getItem('mailinglistID')) { + + // Already signed up once before + console.log("Already Registered! Thank you!"); + console.log("Subscriber ID: " + localStorage.getItem('mailinglistID')); + + $("#registrationCardRegistration").html(localStorage.getItem('mailinglistFirstName') + " " + localStorage.getItem('mailinglistLastName') + " (" + localStorage.getItem('mailinglistID') + ")") + $("#registrationCardRegistration").addClass("success") + + + } else { + + $("#registrationCardRegistration").html("Not Registered") + $("#registrationCardRegistration").addClass("alert") + + // Not signed up yet + var mailinglistTemplate = ` +
+ +
+ We at OpenBuilds are excited to provide you with our free, user-friendly, powerful CNC CONTROL software!
+ As a community-driven organization, we appreciate the continuous support we receive from our users, and offering this software is just one of the ways we give back.
+ Our software is designed to empower both novices and experts to bring their ideas to life. +
+ To get started, all you need to do is fill out the information below to receive software as well as OpenBuilds updates. Once you've signed up, you'll have immediate access to our software. +
+
+ + + +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+ We would like to take this opportunity to thank you for supporting the OpenBuilds Part Store.
+ Your support is what enables us to continue creating innovative tools such as this free software for your benefit.
+ Thank you for your ongoing support of OpenBuilds!
+
+
+
+ +
+
+
+ +
+
+
+ + +
+ + + + + ` + + mailingListDialog = Metro.dialog.create({ + title: " Free Registration", + content: mailinglistTemplate, + toTop: true, + width: '60%', + clsDialog: 'dark', + defaultAction: false + // { + // caption: "Cancel", + // cls: "js-dialog-close", + // onclick: function() { + // // + // } + // }, + // { + // caption: "Register", + // cls: "js-dialog-close success", + // onclick: function() { + // createSurfaceGcode() + // } + // } + // { + // caption: "Cancel", + // cls: "js-dialog-close", + // onclick: function() { + // // do nothing + // } + // } + //] + }); + + } +}); + +function mailingListForm(data) { + console.log(data); +} + +function signUpMailinglist() { + + m_fname = $("#mailingListfname").val(); + m_lname = $("#mailingListlname").val(); + m_email = $("#mailingListfmail").val(); + + $("#mailingListSubmitButton").attr('disabled', true); + $("#mailingListSubmitButton").addClass("disabled"); + $("#mailingListSubmitButton").html("Registering..."); + $("#mailingListResultFail").hide(); + $("#mailingListResultSuccess").hide(); + + + $.ajax({ + url: "https://openbuilds.com/mailinglist", + type: "GET", + crossDomain: true, + data: { + m_email: m_email, + m_fname: m_fname, + m_lname: m_lname, + m_source: "OpenBuildsCONTROL", + }, + + success: function(response) { + var data = JSON.parse(response) + console.log(data) + var successfulSignup = false; + if (data.result == 1) { + successfulSignup = true; + } else if (data.message.indexOf("is in the system already") != -1) { + successfulSignup = true; + } else { + $("#mailingListErrorMsg").html(data.message) + } + + if (successfulSignup == true) { + + if (data.response.subscriber_id != undefined) { + localStorage.setItem('mailinglistID', data.response.subscriber_id); + console.log("Thank you for registering: New Registration Added"); + } else if (data.response[0].subscriberid != undefined) { + localStorage.setItem('mailinglistID', data.response[0].subscriberid); + console.log("Thank you for registering: Existing Registration Found"); + } + + $("#mailingListSubmitButton").html("Registered!").addClass("disabled").removeClass("primary").addClass("success"); + $("#mailingListForm").hide(); + $("#mailingListResultSuccess").show(); + + setTimeout(function() { + Metro.dialog.close(mailingListDialog); + }, 3000); + + localStorage.setItem('mailinglistEmail', m_email); + localStorage.setItem('mailinglistFirstName', m_fname); + localStorage.setItem('mailinglistLastName', m_lname); + + $("#registrationCardRegistration").html(localStorage.getItem('mailinglistFirstName') + " " + localStorage.getItem('mailinglistLastName') + " (" + localStorage.getItem('mailinglistID') + ")") + $("#registrationCardRegistration").addClass("success").removeClass("alert") + + + } else { + $("#mailingListForm").show(); + $("#mailingListResultFail").show(); + $("#mailingListSubmitButton").html("Register").removeClass("disabled").addClass("primary").removeClass("success"); + $("#mailingListSubmitButton").attr('disabled', false); + } + + + }, + error: function(xhr, status) { + $("#mailingListSubmitButton").html("Registration Failed!").addClass("disabled").removeClass("primary").addClass("alert"); + $("#mailingListSubmitButton").attr('disabled', true); + $("#mailingListForm").hide(); + $("#mailingListResultFail").show(); + $("#mailingListErrorMsg").html("Network Error") + + console.log(xhr, status) + setTimeout(function() { + Metro.dialog.close(mailingListDialog); + }, 3000); + } + }); + +} \ No newline at end of file diff --git a/app/wizards/surfacing/surfacing.js b/app/wizards/surfacing/surfacing.js index 88746ad..ce1f5bb 100644 --- a/app/wizards/surfacing/surfacing.js +++ b/app/wizards/surfacing/surfacing.js @@ -144,6 +144,7 @@ function populateSurfaceToolForm() { $("#surfaceY").val(data.surfaceY); $("#surfaceDepth").val(data.surfaceDepth); if (data.surfaceFinalDepth != undefined) { + data.surfaceFinalDepth = data.surfaceDepth; $("#surfaceFinalDepth").val(data.surfaceFinalDepth); } else { $("#surfaceFinalDepth").val(data.surfaceDepth); diff --git a/index.js b/index.js index 4ff8d69..ecc9280 100644 --- a/index.js +++ b/index.js @@ -730,6 +730,13 @@ io.on("connection", function(socket) { shell.openExternal('https://www.openbuilds.com') }); + socket.on("openbuildspartstore", function(data) { + const { + shell + } = require('electron') + shell.openExternal('https://www.openbuildspartstore.com') + }); + socket.on("carveco", function(data) { const { shell @@ -2831,7 +2838,7 @@ if (isElectron()) { // Create myWindow, load the rest of the app, etc... app.on('ready', () => { if (process.platform == 'win32') { - // Don't show window - sit in Tray + // Don't show window - sit in Tray } else { showJogWindow() // Macos and Linux - launch GUI } diff --git a/package.json b/package.json index 6e5671e..18421cd 100644 --- a/package.json +++ b/package.json @@ -1,13 +1,13 @@ { "name": "OpenBuildsCONTROL", - "version": "1.0.356", + "version": "1.0.355", "license": "AGPL-3.0", "description": "OpenBuildsCONTROL CNC Machine Host Software", "author": "github.com/openbuilds ", "devDependencies": { "copyfiles": "^2.4.1", - "electron": "^22.3.1", - "electron-builder": "^v23.6.0", + "electron": "^23.1.1", + "electron-builder": "^v24.0.0-alpha.13", "electron-rebuild": "^3.2.9", "ncp": "^2.0.0", "node-gyp": "^9.3.1"