add dev mode support
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
declare var PUBLIC_URL: string;
|
||||
|
||||
|
||||
export function uploadFile() {
|
||||
var file1 = document.getElementById("file1") as HTMLInputElement;
|
||||
var loaded_n_total = document.getElementById("loaded_n_total");
|
||||
@@ -29,7 +32,7 @@ export function uploadFile() {
|
||||
status.innerHTML = ajax.responseText;
|
||||
answer.innerHTML = "aborted";
|
||||
}, false);
|
||||
ajax.open("POST", "/ota");
|
||||
ajax.open("POST", PUBLIC_URL+"/ota");
|
||||
ajax.send(file);
|
||||
}
|
||||
|
||||
@@ -45,7 +48,7 @@ let firmware_buildtime = document.getElementById("firmware_buildtime") as HTMLDi
|
||||
let firmware_githash = document.getElementById("firmware_githash") as HTMLDivElement;
|
||||
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
fetch("/version")
|
||||
fetch(PUBLIC_URL+"/version")
|
||||
.then(response => response.json())
|
||||
.then(json => json as VersionInfo)
|
||||
.then(versionInfo => {
|
||||
|
||||
Reference in New Issue
Block a user