Compare commits

..

No commits in common. "4478befa8d80774c630818774e58460ed393c2f9" and "e0fca4e0a545183df8c705d0d4fc73ab0fbdc888" have entirely different histories.

View file

@ -65,8 +65,6 @@ logonWindow.show();
let loggingIn = false; let loggingIn = false;
elements.logonForm.addEventListener('submit', (e) => { elements.logonForm.addEventListener('submit', (e) => {
e.preventDefault(); e.preventDefault();
localStorage.setItem("MSAUser", elements.logonUsername.value);
localStorage.setItem("MSAgent", elements.agentSelect.value);
connectToRoom(); connectToRoom();
}); });
@ -97,18 +95,12 @@ async function connectToRoom() {
document.addEventListener('DOMContentLoaded', async () => { document.addEventListener('DOMContentLoaded', async () => {
await agentInit(); await agentInit();
elements.logonUsername.value = localStorage.getItem("MSAUser") || "";
for (const agent of await Room.getAgents()) { for (const agent of await Room.getAgents()) {
let option = document.createElement('option'); let option = document.createElement('option');
option.innerText = agent.friendlyName; option.innerText = agent.friendlyName;
option.value = agent.filename; option.value = agent.filename;
elements.agentSelect.appendChild(option); elements.agentSelect.appendChild(option);
} }
elements.agentSelect.value = localStorage.getItem("MSAgent") || "";
if(elements.agentSelect.value === "") {
// HTMLSelectElement is like this, don't complain.
elements.agentSelect.value = "";
}
let motd = await Room.getMotd(); let motd = await Room.getMotd();
elements.motdContainer.innerHTML = motd.html; elements.motdContainer.innerHTML = motd.html;
let ver = localStorage.getItem('msagent-chat-motd-version'); let ver = localStorage.getItem('msagent-chat-motd-version');