better titlebar ui
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
async function loadMeUI() {
|
||||
const token = localStorage.getItem("token")
|
||||
|
||||
if (!token) return
|
||||
|
||||
try {
|
||||
@@ -31,20 +32,15 @@ async function loadMeUI() {
|
||||
if (dropdownAvatar) dropdownAvatar.src = avatarUrl
|
||||
}
|
||||
|
||||
const titlebarUserBox = document.getElementById("titlebar-user-box")
|
||||
const titlebarUsername = document.getElementById("titlebar-username")
|
||||
const titlebarAvatar = document.getElementById("titlebar-avatar")
|
||||
const titlebarDropdownAvatar = document.getElementById("titlebar-dropdown-avatar")
|
||||
const titlebarDropdownUsername = document.getElementById("titlebar-dropdown-username")
|
||||
const titlebarActions = document.getElementById("titlebar-actions")
|
||||
|
||||
if (titlebarUserBox && titlebarUsername && titlebarAvatar) {
|
||||
titlebarUserBox.style.display = "flex"
|
||||
|
||||
titlebarUsername.textContent = user.username
|
||||
if (titlebarAvatar) {
|
||||
titlebarAvatar.src = avatarUrl
|
||||
}
|
||||
|
||||
if (titlebarDropdownAvatar) titlebarDropdownAvatar.src = avatarUrl
|
||||
if (titlebarDropdownUsername) titlebarDropdownUsername.textContent = user.username
|
||||
if (titlebarActions) {
|
||||
titlebarActions.style.display = "flex"
|
||||
}
|
||||
|
||||
setupDropdown()
|
||||
|
||||
Reference in New Issue
Block a user