This commit is contained in:
zhangzheng
2026-02-27 18:35:40 +08:00
parent adef8b4cce
commit 1bb1fee5cc
265 changed files with 104076 additions and 92 deletions

View File

@@ -0,0 +1,27 @@
import * as Config from "./config.js";
import {addServer, removeServer, reset, readServersFromLocalStorage} from "./icesettings.js";
const addButton = document.querySelector('button#add');
const removeButton = document.querySelector('button#remove');
const resetButton = document.querySelector('button#reset');
const startupDiv = document.getElementById("startup");
addButton.onclick = addServer;
removeButton.onclick = removeServer;
resetButton.onclick = reset;
startupDiv.innerHTML = "";
const displayConfig = async () => {
const res = await Config.getServerConfig();
if (res.useWebSocket) {
startupDiv.innerHTML += "<li>Signaling Protocol : <b>WebSocket</b></li>";
} else {
startupDiv.innerHTML += "<li>Signaling Protocol : <b>HTTP</b></li>";
}
const mode = res.startupMode.replace(/^./, res.startupMode[0].toUpperCase());
startupDiv.innerHTML += `<li>Signaling Mode : <b>${mode}</b></li>`;
};
displayConfig();
readServersFromLocalStorage();