2025-10-22 00:16:32 +07:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { computed } from 'vue'
|
2025-10-31 01:22:35 +07:00
|
|
|
import { OnboardingTab } from './components'
|
2025-10-22 00:16:32 +07:00
|
|
|
import { useAuthStore } from '@/stores'
|
2025-10-31 01:22:35 +07:00
|
|
|
import { LoginTab, CreateTab, RecoverSeedTab } from './components'
|
2025-10-22 00:16:32 +07:00
|
|
|
|
|
|
|
|
const authStore = useAuthStore()
|
|
|
|
|
|
|
|
|
|
const currentState = computed(() => authStore.getCurrentState())
|
|
|
|
|
|
|
|
|
|
const handleGoToCreate = () => {
|
|
|
|
|
authStore.goToCreate()
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-31 01:22:35 +07:00
|
|
|
const handleGoToRecover = () => {
|
|
|
|
|
authStore.goToRecover()
|
2025-10-22 00:16:32 +07:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div class="auth-container">
|
2025-10-31 01:22:35 +07:00
|
|
|
<OnboardingTab
|
2025-10-22 00:16:32 +07:00
|
|
|
v-if="currentState === 'onboarding'"
|
2025-10-23 03:27:02 +07:00
|
|
|
@go-to-create="handleGoToCreate"
|
2025-10-31 01:22:35 +07:00
|
|
|
@go-to-recover="handleGoToRecover"
|
2025-10-22 00:16:32 +07:00
|
|
|
/>
|
|
|
|
|
<LoginTab v-else-if="currentState === 'login'" @go-to-create="handleGoToCreate" />
|
2025-10-31 01:22:35 +07:00
|
|
|
<CreateTab v-else-if="currentState === 'create'" @go-to-recover="handleGoToRecover" />
|
|
|
|
|
<RecoverSeedTab v-else-if="currentState === 'recovery'" />
|
2025-10-22 00:16:32 +07:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.auth-container {
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.complete-state {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
min-height: 100vh;
|
|
|
|
|
text-align: center;
|
|
|
|
|
padding: var(--spacing-xl);
|
|
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
|
color: var(--success-color);
|
|
|
|
|
margin-bottom: var(--spacing-md);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
p {
|
|
|
|
|
color: var(--text-secondary);
|
|
|
|
|
font-size: var(--font-lg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|