feat: Implement core authentication and course management logic with new discovery and profile pages.
This commit is contained in:
parent
1aa3190ca4
commit
2ffcc36fe4
12 changed files with 397 additions and 89 deletions
|
|
@ -64,11 +64,12 @@
|
|||
|
||||
## 🔐 ระบบรักษาความปลอดภัยและ Logic พิเศษ (Core Logic)
|
||||
|
||||
| ส่วนงาน | ไฟล์ | คำอธิบาย |
|
||||
| :-------------- | :----------------------------------- | :-------------------------------------------------------------- |
|
||||
| **Route Guard** | `middleware/auth.ts` | Middleware ดักจับการเข้าถึง เช็กสถานะการล็อกอิน |
|
||||
| **Auth State** | `composables/useAuth.ts` | Centralized Logic สำหรับ Login/Logout เก็บ state ผู้ใช้ปัจจุบัน |
|
||||
| **No-Cache** | `server/middleware/cache-control.ts` | ป้องกันการ Cache หน้าสำคัญด้วย Headers |
|
||||
| ส่วนงาน | ไฟล์ | คำอธิบาย |
|
||||
| :--------------- | :----------------------------------- | :-------------------------------------------------------------- |
|
||||
| **Route Guard** | `middleware/auth.ts` | Middleware ดักจับการเข้าถึง เช็กสถานะการล็อกอิน |
|
||||
| **Auth State** | `composables/useAuth.ts` | Centralized Logic สำหรับ Login/Logout เก็บ state ผู้ใช้ปัจจุบัน |
|
||||
| **Course Logic** | `composables/useCourse.ts` | Centralized Logic สำหรับดึงข้อมูลคอร์สทั้งหมดและรายละเอียดคอร์ส |
|
||||
| **No-Cache** | `server/middleware/cache-control.ts` | ป้องกันการ Cache หน้าสำคัญด้วย Headers |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -101,3 +102,10 @@
|
|||
|
||||
- **New Layout:** ปรับปรุงหน้า Dashboard ให้แสดง "คอร์สที่เรียนล่าสุด" และ "คอร์สแนะนำ" อย่างชัดเจน
|
||||
- **Progress Tracking:** แสดง Progress Bar ที่สวยงามสำหรับการเรียนปัจจุบัน
|
||||
|
||||
### 4. **API Integration (Course System)**
|
||||
|
||||
- **Real Data Integration:** เชื่อมต่อหน้า `browse/discovery` เข้ากับ Backend API (`/api/courses`) สำเร็จ
|
||||
- **Dynamic Detail View:** เพิ่มระบบดึงข้อมูลรายคอร์ส (`/api/courses/{id}`) เมื่อคลิก "ดูรายละเอียด"
|
||||
- **New Composable:** สร้าง `useCourse.ts` เพื่อจัดการ Logic การดึงข้อมูลคอร์สแยกออกมาให้เป็นระเบียบ
|
||||
- **Updated Course Card:** รองรับการแสดงผลรูปภาพปกคอร์ส (`thumbnail_url`) และราคาจริงจาก API
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue