From 5c6c13c261740bb9b32ff2a9437da3b835951fe8 Mon Sep 17 00:00:00 2001 From: supalerk-ar66 Date: Thu, 15 Jan 2026 11:26:37 +0700 Subject: [PATCH] feat: Implement user profile dropdown menu with dark mode toggle and add new course browsing pages. --- Frontend-Learner/.nuxt/tailwind/postcss.mjs | 2 +- Frontend-Learner/components/user/UserMenu.vue | 2 ++ Frontend-Learner/pages/browse/discovery.vue | 7 +++---- Frontend-Learner/pages/browse/opencovery.vue | 7 +------ 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/Frontend-Learner/.nuxt/tailwind/postcss.mjs b/Frontend-Learner/.nuxt/tailwind/postcss.mjs index 0244fec7..50cb74eb 100644 --- a/Frontend-Learner/.nuxt/tailwind/postcss.mjs +++ b/Frontend-Learner/.nuxt/tailwind/postcss.mjs @@ -1,4 +1,4 @@ -// generated by the @nuxtjs/tailwindcss module at 15/1/2569 11:02:11 +// generated by the @nuxtjs/tailwindcss module at 15/1/2569 11:25:01 import "@nuxtjs/tailwindcss/config-ctx" import configMerger from "@nuxtjs/tailwindcss/merger"; diff --git a/Frontend-Learner/components/user/UserMenu.vue b/Frontend-Learner/components/user/UserMenu.vue index b0afbbf1..0659072a 100644 --- a/Frontend-Learner/components/user/UserMenu.vue +++ b/Frontend-Learner/components/user/UserMenu.vue @@ -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}` }) diff --git a/Frontend-Learner/pages/browse/discovery.vue b/Frontend-Learner/pages/browse/discovery.vue index 5c4e21a6..ee611aae 100644 --- a/Frontend-Learner/pages/browse/discovery.vue +++ b/Frontend-Learner/pages/browse/discovery.vue @@ -245,9 +245,9 @@ const filteredCourses = computed(() => {
- + + ← กลับหน้ารายการคอร์ส +
@@ -393,7 +393,6 @@ const filteredCourses = computed(() => { > ฟรี - ระยะเวลาจำกัด
- + @@ -126,11 +126,6 @@ const course = {
{{ course.originalPrice }} {{ course.price }} -
- - ระยะเวลาจำกัด - -