better titlebar ui

This commit is contained in:
2026-01-10 20:19:08 +01:00
parent e6c3320a7c
commit 91d19049ef
3 changed files with 84 additions and 38 deletions

View File

@@ -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()