renamed methods
This commit is contained in:
parent
1aa9fe4412
commit
a7c53edf79
1 changed files with 10 additions and 8 deletions
|
|
@ -1,16 +1,19 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { useAuthStore} from '@/stores/authStore.js'
|
||||
import { useAuthStore } from '@/stores/authStore.js'
|
||||
|
||||
const store = useAuthStore()
|
||||
|
||||
const email = ref('')
|
||||
const password = ref('')
|
||||
|
||||
|
||||
const onSubmit = () => {
|
||||
const onSignIn = () => {
|
||||
store.login(email.value, password.value)
|
||||
}
|
||||
|
||||
const onSignUp = () => {
|
||||
console.log('Sign up placeholder')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
@ -24,7 +27,7 @@ const onSubmit = () => {
|
|||
pane-style="padding-left: 4px; padding-right: 4px; box-sizing: border-box;"
|
||||
>
|
||||
<n-tab-pane name="signin" tab="Sign in">
|
||||
<n-form @submit.prevent="onSubmit">
|
||||
<n-form @submit.prevent="onSignIn">
|
||||
<n-form-item-row label="Email">
|
||||
<n-input v-model:value="email"/>
|
||||
</n-form-item-row>
|
||||
|
|
@ -32,11 +35,11 @@ const onSubmit = () => {
|
|||
<n-input v-model:value="password" type="password" show-password-on="click" />
|
||||
</n-form-item-row>
|
||||
</n-form>
|
||||
<n-button type="primary" block secondary strong @click="onSubmit"> Sign In </n-button>
|
||||
<n-button type="primary" block secondary strong @click="onSignIn"> Sign In</n-button>
|
||||
</n-tab-pane>
|
||||
|
||||
<n-tab-pane name="signup" tab="Sign up">
|
||||
<n-form>
|
||||
<n-form @submit.prevent="onSignUp" @keydown.enter.prevent="onSignUp">
|
||||
<n-form-item-row label="Email">
|
||||
<n-input />
|
||||
</n-form-item-row>
|
||||
|
|
@ -47,7 +50,7 @@ const onSubmit = () => {
|
|||
<n-input type="password" show-password-on="click" />
|
||||
</n-form-item-row>
|
||||
</n-form>
|
||||
<n-button type="primary" block secondary strong> Sign up </n-button>
|
||||
<n-button type="primary" block secondary strong @click="onSignUp">Sign up</n-button>
|
||||
</n-tab-pane>
|
||||
</n-tabs>
|
||||
</n-card>
|
||||
|
|
@ -61,6 +64,5 @@ const onSubmit = () => {
|
|||
.my-card {
|
||||
max-width: 500px;
|
||||
width: 90%;
|
||||
margin: 10px auto 0;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue