forked from noxious/client
FInished password reset (hopefully)
This commit is contained in:
@ -12,10 +12,13 @@
|
||||
<img src="/assets/ui-elements/ui-box-inner.svg" class="absolute left-2 top-2 w-[calc(100%_-_16px)] h-[calc(100%_-_16px)] max-lg:hidden" alt="UI box inner" />
|
||||
|
||||
<!-- Login Form -->
|
||||
<LoginForm v-if="currentForm === 'login'" @openResetPasswordModal="() => isPasswordResetFormShown = true" @switchToRegister="currentForm = 'register'" />
|
||||
<LoginForm v-if="currentForm === 'login' && !doesUrlHaveToken" @openResetPasswordModal="() => isPasswordResetFormShown = true" @switchToRegister="currentForm = 'register'" />
|
||||
|
||||
<!-- Register Form -->
|
||||
<RegisterForm v-if="currentForm === 'register'" @switchToLogin="currentForm = 'login'" />
|
||||
<RegisterForm v-if="currentForm === 'register' && !doesUrlHaveToken" @switchToLogin="currentForm = 'login'" />
|
||||
|
||||
<!-- New Password Form -->
|
||||
<NewPasswordForm v-if="doesUrlHaveToken" @switchToLogin="currentForm = 'login'" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -26,11 +29,13 @@
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useGameStore } from '@/stores/gameStore'
|
||||
import { useCookies } from '@vueuse/integrations/useCookies'
|
||||
import LoginForm from '@/components/screens/partials/login/LoginForm.vue'
|
||||
import RegisterForm from '@/components/screens/partials/login/RegisterForm.vue'
|
||||
import LoginForm from '@/components/screens/partials/LoginForm.vue'
|
||||
import RegisterForm from '@/components/screens/partials/RegisterForm.vue'
|
||||
import NewPasswordForm from '@/components/screens/partials/NewPasswordForm.vue'
|
||||
import ResetPassword from '@/components/utilities/ResetPassword.vue'
|
||||
|
||||
const isPasswordResetFormShown = ref(false)
|
||||
const doesUrlHaveToken = window.location.hash.includes('#')
|
||||
|
||||
const gameStore = useGameStore()
|
||||
const currentForm = ref('login')
|
||||
|
Reference in New Issue
Block a user