pull/301/head
openbuilds-engineer 2023-02-28 20:40:11 +02:00
rodzic 51bbc44426
commit b52bc6db54
6 zmienionych plików z 260 dodań i 11 usunięć

Wyświetl plik

@ -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)

Wyświetl plik

@ -1185,7 +1185,7 @@
<div class="cell p-0 m-0">
<div class="card">
<div class="card-header p-1 m-0">
<i class="fas fa-fw fa-bolt"></i>Inputs / Endstops
<i class="fas fa-fw fa-bolt"></i>&nbsp;Inputs / Endstops
</div>
<div class="card-content">
<table class="table striped compact">
@ -1234,7 +1234,7 @@
<div class="card" id="powerSettingsCard">
<div class="card-header p-1 m-0">
<i class="fas fa-fw fa-power-off"></i>Power Settings
<i class="fas fa-fw fa-power-off"></i>&nbsp;Power Settings
</div>
<div class="card-content">
<table class="table striped compact">
@ -1262,6 +1262,30 @@
</div>
</div>
<div class="card" id="registrationCard">
<div class="card-header p-1 m-0">
<i class="fas fa-fw fa-user-check"></i>&nbsp;Registration Settings
</div>
<div class="card-content">
<table class="table striped compact">
<thead>
<tr>
<th style="width: 70%;">Parameter</th>
<th style="width: 30%;">Status</th>
</tr>
</thead>
<tbody>
<tr>
<td class="pt-1 mt-0 pb-0 pt-0">Registered To: </td>
<td class="pt-1 mt-0 pb-0 pt-0"><span class="tally powerstatus" id="registrationCardRegistration">NOCOMM</span></td>
</tr>
</tbody>
</table>
</div>
</div>
@ -1357,7 +1381,7 @@
<div class="card">
<div class="card-header p-1 m-0">
<i class="fas fa-fw fa-tty"></i>Communications
<i class="fas fa-fw fa-tty"></i>&nbsp;Communications
</div>
<div class="card-content" style="height: calc(100vh - 630px); min-height: 90px; overflow-x: auto;">
<table class="table striped compact">
@ -1403,7 +1427,7 @@
<div class="card">
<div class="card-header p-1 m-0">
<i class="fas fa-fw fa-history"></i> Changelog
<i class="fas fa-fw fa-history"></i>&nbsp;Changelog
</div>
<div class="card-content" style="height: calc(100vh - 680px); min-height: 120px; overflow-x: auto;">
<div id="changelog" class="text-small"></div>
@ -1893,8 +1917,6 @@
<script type="text/javascript" src="lib/3dview/3dview.js"></script>
<!-- Wizards -->
<script type="text/javascript" src="wizards/calibration/calibrate.js"></script>
<script type="text/javascript" src="wizards/calibration/calibrate-x.js"></script>
@ -1907,6 +1929,8 @@
<script type="text/javascript" src="wizards/surfacing/surfacing.js"></script>
<script type="text/javascript" src="wizards/mailinglist/mailinglist.js"></script>
<!-- <script type="text/javascript" src="wizards/flashingtool/grbl-flashing.js"></script> -->
<script type="text/javascript" src="wizards/flashingtool2/flashingtool.js"></script>

Wyświetl plik

@ -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 = `
<div id="mailingListForm">
<div class="text-small">
We at OpenBuilds are excited to provide you with our free, user-friendly, powerful CNC CONTROL software! <br>
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. <br>
Our software is designed to empower both novices and experts to bring their ideas to life.
<hr>
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.
<br>
</div>
<form action="signUpMailinglist">
<div class="row mt-4">
<div class="cell-md-6">
<input id="mailingListfname" data-validate="required minlength=3" type="text" placeholder="First name" class="metro-input" data-role="input" data-prepend="<span class='mif-user'></span>">
</div>
<div class="cell-md-6">
<input id="mailingListlname" data-validate="required minlength=3" type="text" placeholder="Last name" class="metro-input" data-role="input" data-prepend="<span class='mif-user'></span>">
</div>
</div>
<div class="row mt-4">
<div class="cell-md-12">
<input id="mailingListfmail" data-validate="required email" type="text" placeholder="Email Address" class="metro-input" data-role="input" data-prepend="<span class='mif-mail'></span>">
</div>
</div>
<div class="row mt-4">
<div class="cell-md-12">
<div class="text-small">
We would like to take this opportunity to thank you for supporting the <a href=#" onclick="socket.emit('openbuildspartstore');">OpenBuilds Part Store</a>.<br>
Your support is what enables us to continue creating innovative tools such as this free software for your benefit.<br>
Thank you for your ongoing support of OpenBuilds!<br>
</div>
</div>
</div>
<div class="row mt-4">
<div class="cell-md-12">
<div class="float-right">
<button id="mailingListSubmitButton" class="button primary" onclick="signUpMailinglist()">Register</button>
</div>
</div>
</div>
</form>
</div>
<div id="mailingListResultSuccess" style="display: none;">
<div class="remark success">
Succesfully Registered! Thank you!
</div>
</div>
<div id="mailingListResultFail" style="display: none;">
<div class="remark alert">
Registration Failed. Please try again.
<hr>
<span id="mailingListErrorMsg"></span>
</div>
</div>
`
mailingListDialog = Metro.dialog.create({
title: "<i class='fas fa-user'></i> 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);
}
});
}

Wyświetl plik

@ -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);

Wyświetl plik

@ -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
}

Wyświetl plik

@ -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 <support@openbuilds.com>",
"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"