prevent selecting the active server
All checks were successful
Build and Push Docker Image / build (push) Successful in 14s
All checks were successful
Build and Push Docker Image / build (push) Successful in 14s
instead, hide the sidebar on smaller screens, so that the user's input doesn't feel unresponsive.
This commit is contained in:
parent
49dfb59d71
commit
15ce3c1dbb
@ -90,7 +90,10 @@ function createSelectButton(serverData) {
|
|||||||
|
|
||||||
// Bind the button for selecting this server
|
// Bind the button for selecting this server
|
||||||
template.find(".sidebar-item").off("click").on("click", function() {
|
template.find(".sidebar-item").off("click").on("click", function() {
|
||||||
selectServer($(this).data("id"));
|
const myID = $(this).data("id");
|
||||||
|
|
||||||
|
// only select if not already selected, otherwise hide sidebar on smaller screens (responsive)
|
||||||
|
selectedServer?.id !== myID ? selectServer(myID) : setSidebarVisibility(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#serverList").prepend(template);
|
$("#serverList").prepend(template);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user