feat: Introduce core e-learning features with new pages for course details, dashboard, authentication, browsing, and learning, supported by a useCourse composable.

This commit is contained in:
supalerk-ar66 2026-01-23 09:47:32 +07:00
parent c982ab2c05
commit 0eb9b522f6
6 changed files with 109 additions and 38 deletions

View file

@ -1,9 +1,8 @@
<script setup lang="ts">
/**
* @file login.vue
* @description Login Page.
* Handles user authentication with email/password and social login (mock).
* Uses the 'auth' layout.
* @description หนาเขาสระบบ (Login Page)
* รองรบการเขาสระบบดวย Email/Password
*/
definePageMeta({
@ -28,6 +27,7 @@ const loginForm = reactive({
})
// Validation rules definition
// (Validation Rules)
const loginRules = {
email: {
rules: {
@ -56,11 +56,12 @@ const loginRules = {
}
/**
* Validates form and attempts login.
* Currently simulates an API call for demonstration.
* งกนตรวจสอบความถกตองของฟอรมและเรยก API login
*/
/**
* Handles input updates, stripping Thai characters and clearing errors.
* ดการเมอมการพมพอม (Input Handler)
* - ลบ error เมอเรมพมพใหม
* - ตรวจสอบภาษาไทยแบบ real-time
*/
const handleInput = (field: keyof typeof loginForm, value: string) => {
loginForm[field] = value