|
|
|
@ -35,7 +35,6 @@ class SetupModel {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const serverAddress = `${location.protocol}//${location.host}`;
|
|
|
|
const serverAddress = `${location.protocol}//${location.host}`;
|
|
|
|
$("#current-host").html(serverAddress);
|
|
|
|
$("#current-host").html(serverAddress);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// this is called in setup.ejs
|
|
|
|
// this is called in setup.ejs
|
|
|
|
@ -53,13 +52,12 @@ class SetupModel {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.step(this.setupType());
|
|
|
|
this.step(this.setupType());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
back() {
|
|
|
|
back() {
|
|
|
|
this.step("setup-type");
|
|
|
|
this.step("setup-type");
|
|
|
|
this.setupType("");
|
|
|
|
this.setupType("");
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async finish() {
|
|
|
|
async finish() {
|
|
|
|
const syncServerHost = this.syncServerHost();
|
|
|
|
const syncServerHost = this.syncServerHost();
|
|
|
|
@ -92,7 +90,7 @@ class SetupModel {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
showAlert(`Sync setup failed: ${resp.error}`);
|
|
|
|
showAlert(`Sync setup failed: ${resp.error}`);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
async function checkOutstandingSyncs() {
|
|
|
|
async function checkOutstandingSyncs() {
|
|
|
|
@ -121,7 +119,7 @@ function hideAlert() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function getSyncInProgress() {
|
|
|
|
function getSyncInProgress() {
|
|
|
|
const el = document.getElementById('syncInProgress');
|
|
|
|
const el = document.getElementById("syncInProgress");
|
|
|
|
if (!el || !(el instanceof HTMLMetaElement)) return false;
|
|
|
|
if (!el || !(el instanceof HTMLMetaElement)) return false;
|
|
|
|
return !!parseInt(el.content);
|
|
|
|
return !!parseInt(el.content);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -130,5 +128,3 @@ addEventListener("DOMContentLoaded", (event) => {
|
|
|
|
ko.applyBindings(new SetupModel(getSyncInProgress()), document.getElementById("setup-dialog"));
|
|
|
|
ko.applyBindings(new SetupModel(getSyncInProgress()), document.getElementById("setup-dialog"));
|
|
|
|
$("#setup-dialog").show();
|
|
|
|
$("#setup-dialog").show();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|