diff --git a/src/webpage/localuser.ts b/src/webpage/localuser.ts index 7fafbe3..ed9a095 100644 --- a/src/webpage/localuser.ts +++ b/src/webpage/localuser.ts @@ -1187,6 +1187,12 @@ class Localuser { const username = document.createElement("span"); username.classList.add("ellipsis"); username.textContent = member.name; + if (user.bot) { + const bot = document.createElement("span"); + bot.classList.add("bot"); + bot.textContent = I18n.bot(); + username.appendChild(bot); + } member.bind(username); user.bind(memberdiv, member instanceof Member ? member.guild : undefined, false); memberdiv.append(pfp, username); diff --git a/src/webpage/style.css b/src/webpage/style.css index bc59d5a..2bc044c 100644 --- a/src/webpage/style.css +++ b/src/webpage/style.css @@ -2120,6 +2120,8 @@ span.instanceStatus { font-weight: bold; color: var(--primary-text-prominent); border-radius: 4px; + flex-grow: 0; + width: fit-content; } .membererror { display: inline-block; diff --git a/src/webpage/user.ts b/src/webpage/user.ts index 8d78c74..ecfce37 100644 --- a/src/webpage/user.ts +++ b/src/webpage/user.ts @@ -812,9 +812,18 @@ class User extends SnowFlake { const userbody = document.createElement("div"); userbody.classList.add("flexttb", "infosection"); div.appendChild(userbody); + const usernamehtml = document.createElement("h2"); - usernamehtml.textContent = this.username; + usernamehtml.textContent = this.name; userbody.appendChild(usernamehtml); + + if (this.bot) { + const username = document.createElement("span"); + username.classList.add("bot"); + username.textContent = this.webhook ? I18n.webhook() : I18n.bot(); + usernamehtml.appendChild(username); + } + userbody.appendChild(badgediv); const discrimatorhtml = document.createElement("h3"); discrimatorhtml.classList.add("tag"); @@ -871,6 +880,12 @@ class User extends SnowFlake { joined.append(p); usernamehtml.textContent = member.name; + if (this.bot) { + const username = document.createElement("span"); + username.classList.add("bot"); + username.textContent = this.webhook ? I18n.webhook() : I18n.bot(); + usernamehtml.appendChild(username); + } roles.classList.add("flexltr", "rolesbox"); for (const role of member.roles) { @@ -1056,7 +1071,14 @@ class User extends SnowFlake { div.appendChild(userbody); const usernamehtml = document.createElement("h2"); usernamehtml.textContent = this.username; + userbody.appendChild(usernamehtml); + if (this.bot) { + const username = document.createElement("span"); + username.classList.add("bot"); + username.textContent = this.webhook ? I18n.webhook() : I18n.bot(); + usernamehtml.appendChild(username); + } userbody.appendChild(badgediv); const discrimatorhtml = document.createElement("h3"); discrimatorhtml.classList.add("tag"); @@ -1093,6 +1115,12 @@ class User extends SnowFlake { membres.then((member) => { if (!member) return; usernamehtml.textContent = member.name; + if (this.bot) { + const username = document.createElement("span"); + username.classList.add("bot"); + username.textContent = this.webhook ? I18n.webhook() : I18n.bot(); + usernamehtml.appendChild(username); + } const roles = document.createElement("div"); roles.classList.add("flexltr", "rolesbox"); for (const role of member.roles) {