Skip to content

Commit

Permalink
hide serverselector on only one server
Browse files Browse the repository at this point in the history
  • Loading branch information
sstidl committed Dec 29, 2024
1 parent f06187a commit dda7841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/javascript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ async function applyServerListJSON() {
function populateDropdown(servers) {
const serverSelector = document.querySelector("div.server-selector");
const serverList = serverSelector.querySelector("ul.servers");
serverSelector.classList.add("active");

// If we have only a single server, just show it
if (servers.length === 1) {
serverSelector.classList.add("single-server");
selectServer(servers[0]);
return;
}
serverSelector.classList.add("active");

// Make the dropdown open and close
serverSelector.addEventListener("click", () => {
Expand Down

0 comments on commit dda7841

Please sign in to comment.