feat: Implement core classroom functionality including video player, learning and quiz pages, course detail view, and i18n support.
This commit is contained in:
parent
008f712480
commit
7f5119e5aa
9 changed files with 289 additions and 109 deletions
|
|
@ -24,7 +24,7 @@ onMounted(async () => {
|
|||
if (!token) {
|
||||
isLoading.value = false
|
||||
isSuccess.value = false
|
||||
errorMessage.value = t('auth.invalidToken') || 'Token ไม่ถูกต้อง'
|
||||
errorMessage.value = t('auth.invalidToken')
|
||||
return
|
||||
}
|
||||
|
||||
|
|
@ -38,15 +38,13 @@ onMounted(async () => {
|
|||
} else {
|
||||
isSuccess.value = false
|
||||
if (result.code === 400) {
|
||||
errorMessage.value = t('profile.emailAlreadyVerified') || 'อีเมลได้รับการยืนยันแล้ว'
|
||||
// Treat as success visually or show specific message?
|
||||
// Requirement says "check mark" for done.
|
||||
// If already verified, maybe show success-like state with "Already Verified" message.
|
||||
isSuccess.value = true // Let's show checkmark but with specific message
|
||||
errorMessage.value = t('profile.emailAlreadyVerified')
|
||||
// If already verified, show success state with specific message
|
||||
isSuccess.value = true
|
||||
} else if (result.code === 401) {
|
||||
errorMessage.value = t('auth.tokenExpired') || 'Token หมดอายุหรือล้มเหลว'
|
||||
errorMessage.value = t('auth.tokenExpired')
|
||||
} else {
|
||||
errorMessage.value = result.error || 'ยืนยันอีเมลไม่สำเร็จ'
|
||||
errorMessage.value = result.error || t('common.error')
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
@ -64,7 +62,7 @@ const navigateToHome = () => {
|
|||
<div v-if="isLoading" class="flex flex-col items-center justify-center py-8">
|
||||
<q-spinner-dots size="4rem" color="primary" />
|
||||
<h2 class="mt-6 text-xl font-bold text-slate-900 dark:text-white animate-pulse">
|
||||
{{ $t('auth.verifyingEmail') || 'กำลังยืนยันอีเมล...' }}
|
||||
{{ $t('auth.verifyingEmail') }}
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
|
|
@ -75,10 +73,10 @@ const navigateToHome = () => {
|
|||
</div>
|
||||
|
||||
<h2 class="text-3xl font-black text-slate-900 dark:text-white mb-2">
|
||||
{{ errorMessage && errorMessage !== '' ? (errorMessage) : ($t('auth.emailVerified') || 'ยืนยันอีเมลสำเร็จ!') }}
|
||||
{{ errorMessage && errorMessage !== '' ? (errorMessage) : ($t('auth.emailVerified')) }}
|
||||
</h2>
|
||||
<p class="text-slate-500 dark:text-slate-400 mb-8">
|
||||
{{ $t('auth.emailVerifiedDesc') || 'บัญชีของคุณได้รับการยืนยันเรียบร้อยแล้ว' }}
|
||||
{{ $t('auth.emailVerifiedDesc') }}
|
||||
</p>
|
||||
|
||||
<q-btn
|
||||
|
|
@ -86,7 +84,7 @@ const navigateToHome = () => {
|
|||
rounded
|
||||
color="primary"
|
||||
class="w-full py-3 font-bold text-lg shadow-lg shadow-blue-500/30"
|
||||
:label="$t('common.backToHome') || 'กลับสู่หน้าหลัก'"
|
||||
:label="$t('common.backToHome')"
|
||||
@click="navigateToHome"
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -109,7 +107,7 @@ const navigateToHome = () => {
|
|||
rounded
|
||||
color="slate-700"
|
||||
class="w-full py-3 font-bold text-lg"
|
||||
label="ลองใหม่อีกครั้ง"
|
||||
:label="$t('common.tryAgain')"
|
||||
@click="router.push('/')"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue