feat: Implement user profile dropdown menu with dark mode toggle and add new course browsing pages.

This commit is contained in:
supalerk-ar66 2026-01-15 11:26:37 +07:00
parent ae771420be
commit 5c6c13c261
4 changed files with 7 additions and 11 deletions

View file

@ -30,12 +30,14 @@ const menuPosition = ref({ top: '0px', right: '0px' })
// Computed property to display user initials (e.g. "JD" for John Doe)
const userInitials = computed(() => {
if (!currentUser.value) return ''
const f = currentUser.value.firstName?.charAt(0).toUpperCase() || ''
const l = currentUser.value.lastName?.charAt(0).toUpperCase() || ''
return f + l
})
const userName = computed(() => {
if (!currentUser.value) return ''
return `${currentUser.value.firstName} ${currentUser.value.lastName}`
})