Implement tooltips for the serverlist

This commit is contained in:
Corban-Lee Jones 2024-04-26 23:27:39 +01:00
parent f6bf8c85e8
commit 990229f3b2

View File

@ -106,6 +106,10 @@ function addServerTemplate(serverPrimaryKey, serverGuildId, serverName, serverIc
template.find("img").attr("src", `https://cdn.discordapp.com/icons/${serverGuildId}/${serverIconHash}.webp?size=80`);
template.attr("data-id", serverPrimaryKey);
// Tooltips
template.attr("data-bs-title", serverName);
template.tooltip();
// Bind the button for selecting this server
template.find(".server-item-selector").off("click").on("click", function() {
selectServer(serverPrimaryKey);