63 lines
2.1 KiB
HTML
63 lines
2.1 KiB
HTML
<html><head>
|
|
<link rel="stylesheet" type="text/css" href="style.css">
|
|
</head>
|
|
<body>
|
|
|
|
|
|
<form action="update.html" method="post"><p>Currently installed: %FULLNAMEID%</p>
|
|
<p>
|
|
Available main: <span id="masterDiv">(...checking...)</span>
|
|
|
|
<br>
|
|
Available dev2: <span id="develDiv">(...checking...)</span>
|
|
|
|
</p>
|
|
<input type="submit" name="main" value="Main-Update"></input><br>
|
|
<input type="submit" name="dev2" value="Dev-Update"><br>
|
|
<div id="local-update-section">
|
|
<input type="submit" name="local" value="Local-Update"> from
|
|
<input type="text" name="url" value="%LOCAL_UPDATES%" size="64"><br>
|
|
</div>
|
|
</form>
|
|
|
|
<p>Note: If suffix is the same, update should work fully. If the number is
|
|
different, update contains changes in the file system. A full re-flash is
|
|
required to get all new features, but the update should not break anything.
|
|
If the letter is different, a full re-flash is mandatory, update will not
|
|
work.</p>
|
|
<p id="local-update-info">
|
|
The local-update feature is for developers and requires a path containing
|
|
<tt>update.fs.bin</tt> and <tt>update.ino.bin</tt>.
|
|
</p>
|
|
|
|
<script>
|
|
const localEnabled = "%LOCAL_UPDATES%";
|
|
|
|
document.addEventListener("DOMContentLoaded", () => {
|
|
if (localEnabled.trim() === "") {
|
|
// Hide the local update section
|
|
const localUpdateSection = document.getElementById("local-update-section");
|
|
const localUpdateInfo = document.getElementById("local-update-info");
|
|
if (localUpdateSection) localUpdateSection.style.display = "none";
|
|
if (localUpdateInfo) localUpdateInfo.style.display = "none";
|
|
}
|
|
});
|
|
|
|
const masterInfo = document.getElementById('masterDiv');
|
|
const develInfo = document.getElementById('develDiv');
|
|
|
|
let request = new XMLHttpRequest();
|
|
request.open('GET', 'http://rdzsonde.mooo.com/main/update-info.html');
|
|
request.onload = function() {
|
|
masterInfo.innerHTML = request.response.replace(/<[^>]*>/g, '');
|
|
}
|
|
request.send();
|
|
let drequest = new XMLHttpRequest();
|
|
drequest.open('GET', 'http://rdzsonde.mooo.com/dev2/update-info.html');
|
|
drequest.onload = function() {
|
|
develInfo.innerHTML= drequest.response.replace(/<[^>]*>/g, '');;
|
|
}
|
|
drequest.send();
|
|
</script>
|
|
</body></html>
|