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:
parent
c982ab2c05
commit
0eb9b522f6
6 changed files with 109 additions and 38 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue