@@ -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 = `
+
+
+
+
+
+
+
+
+
+ `
+
+ 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"