hostname editable
This commit is contained in:
parent
2e6676f50b
commit
4d5e48527b
2 changed files with 17 additions and 2 deletions
|
|
@ -194,7 +194,7 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>Hostname</td>
|
<td>Hostname</td>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" placeholder="Studio-Camera-6K-Pro.local" id="hostnameInput">
|
<input type="text" placeholder="Studio-Camera-6K-Pro.local" id="hostnameInput" onclick="hostnameInputHandler()" onkeydown="hostnameInputHandler()">
|
||||||
<button onclick="initCamera()">Connect</button>
|
<button onclick="initCamera()">Connect</button>
|
||||||
<input type="checkbox" id="secureCheckbox">
|
<input type="checkbox" id="secureCheckbox">
|
||||||
<span id="secureCheckboxLabel">Use HTTPS</span>
|
<span id="secureCheckboxLabel">Use HTTPS</span>
|
||||||
|
|
|
||||||
15
web-ui.js
15
web-ui.js
|
|
@ -52,6 +52,7 @@ function initCamera() {
|
||||||
document.getElementById("connectionErrorSpan").innerHTML = "Error "+error.code+": "+error.name+" (Your hostname is probably incorrect, hover for more details)";
|
document.getElementById("connectionErrorSpan").innerHTML = "Error "+error.code+": "+error.name+" (Your hostname is probably incorrect, hover for more details)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsavedChanges = unsavedChanges.filter((e) => {return e !== "Hostname"});
|
||||||
}
|
}
|
||||||
|
|
||||||
// =============================== UI Updater ==================================
|
// =============================== UI Updater ==================================
|
||||||
|
|
@ -64,7 +65,9 @@ function updateUIAll() {
|
||||||
|
|
||||||
// ========== Hostname ==========
|
// ========== Hostname ==========
|
||||||
|
|
||||||
|
if (!unsavedChanges.includes("Hostname")) {
|
||||||
document.getElementById("hostnameInput").value = cameras[ci].hostname;
|
document.getElementById("hostnameInput").value = cameras[ci].hostname;
|
||||||
|
}
|
||||||
|
|
||||||
// ========== Format ==========
|
// ========== Format ==========
|
||||||
|
|
||||||
|
|
@ -471,6 +474,18 @@ function presetInputHandler() {
|
||||||
unsavedChanges = unsavedChanges.filter((e) => {return e !== "presets"});
|
unsavedChanges = unsavedChanges.filter((e) => {return e !== "presets"});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hostnameInputHandler() {
|
||||||
|
let newHostname = document.getElementById("hostnameInput").value;
|
||||||
|
|
||||||
|
if (event.key === 'Enter') {
|
||||||
|
event.preventDefault;
|
||||||
|
unsavedChanges = unsavedChanges.filter((e) => {return e !== "Hostname"});
|
||||||
|
initCamera();
|
||||||
|
} else {
|
||||||
|
unsavedChanges.push('Hostname');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function AEmodeInputHandler() {
|
function AEmodeInputHandler() {
|
||||||
let AEmode = document.getElementById("AEmodeDropDown").value;
|
let AEmode = document.getElementById("AEmodeDropDown").value;
|
||||||
let AEtype = document.getElementById("AEtypeDropDown").value;
|
let AEtype = document.getElementById("AEtypeDropDown").value;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue