Update the language on the webapp to use confirms to prevent errant clicks
This commit is contained in:
parent
45e427caf9
commit
10e7b13707
|
@ -623,8 +623,8 @@ mobile.EV = function (fstop, shutter) {
|
||||||
};
|
};
|
||||||
|
|
||||||
mobile.reset = function () {
|
mobile.reset = function () {
|
||||||
const reset = confirm(`Reset INTVAL3 to default settings and clear counter?`);
|
const proceed = confirm(`Reset INTVAL3 to default settings and clear counter?`);
|
||||||
if (!reset) return false;
|
if (!proceed) return false;
|
||||||
let opts = {
|
let opts = {
|
||||||
type : 'reset'
|
type : 'reset'
|
||||||
};
|
};
|
||||||
|
@ -644,8 +644,8 @@ mobile.resetSuccess = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
mobile.update = function () {
|
mobile.update = function () {
|
||||||
const update = confirm(`Check for updates? You will be disconnected from the INTVAL3 during this process.`);
|
const proceed = confirm(`Check for updates? You will be disconnected from the INTVAL3 during this process.`);
|
||||||
if (!update) return false;
|
if (!proceed) return false;
|
||||||
let opts = {
|
let opts = {
|
||||||
type : 'update'
|
type : 'update'
|
||||||
};
|
};
|
||||||
|
@ -662,8 +662,8 @@ mobile.updateSuccess = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
mobile.restart = function () {
|
mobile.restart = function () {
|
||||||
const restart = confirm(`Restart the INTVAL3? You will be disconnected from it during this process.`);
|
const proceed = confirm(`Restart the INTVAL3? You will be disconnected from it during this process.`);
|
||||||
if (!restart) return false;
|
if (!proceed) return false;
|
||||||
let opts = {
|
let opts = {
|
||||||
type : 'restart'
|
type : 'restart'
|
||||||
};
|
};
|
||||||
|
|
|
@ -166,6 +166,8 @@ web.reset = function () {
|
||||||
headers : web._header,
|
headers : web._header,
|
||||||
body : JSON.stringify({})
|
body : JSON.stringify({})
|
||||||
}
|
}
|
||||||
|
const proceed = confirm(`Reset INTVAL3 to default settings and clear counter?`);
|
||||||
|
if (!proceed) return false
|
||||||
fetch('/reset', opts)
|
fetch('/reset', opts)
|
||||||
.then(web.useJson)
|
.then(web.useJson)
|
||||||
.then(setState)
|
.then(setState)
|
||||||
|
@ -180,6 +182,8 @@ web.restart = function () {
|
||||||
headers : web._header,
|
headers : web._header,
|
||||||
body : JSON.stringify({})
|
body : JSON.stringify({})
|
||||||
}
|
}
|
||||||
|
const proceed = confirm(`Restart the INTVAL3? You will be disconnected from it during this process.`);
|
||||||
|
if (!proceed) return false;
|
||||||
fetch('/restart', opts)
|
fetch('/restart', opts)
|
||||||
.then(web.useJson)
|
.then(web.useJson)
|
||||||
.then(web.restartSuccess)
|
.then(web.restartSuccess)
|
||||||
|
@ -197,6 +201,8 @@ web.update = function () {
|
||||||
headers : web._header,
|
headers : web._header,
|
||||||
body : JSON.stringify({})
|
body : JSON.stringify({})
|
||||||
}
|
}
|
||||||
|
const proceed = confirm(`Check for updates? You will be disconnected from the INTVAL3 during this process.`);
|
||||||
|
if (!proceed) return false;
|
||||||
fetch('/update', opts)
|
fetch('/update', opts)
|
||||||
.then(web.useJson)
|
.then(web.useJson)
|
||||||
.then(web.updateSuccess)
|
.then(web.updateSuccess)
|
||||||
|
|
Loading…
Reference in New Issue