Add signin view, fix linting

This commit is contained in:
Kevin Thomas
2021-07-21 17:58:29 -07:00
parent 3572d69cba
commit b4e791a21c
5 changed files with 73 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ module.exports = {
node: true node: true
}, },
extends: [ extends: [
'plugin:vue/essential', 'plugin:vue/recommended',
'@vue/standard' '@vue/standard'
], ],
parserOptions: { parserOptions: {

View File

@@ -1,8 +1,8 @@
<template> <template>
<v-app> <v-app>
<AppBar /> <AppBar />
<v-main> <v-main>
<router-view/> <router-view />
</v-main> </v-main>
</v-app> </v-app>
</template> </template>

52
src/components/Login.vue Normal file
View File

@@ -0,0 +1,52 @@
<template>
<v-form v-model="valid">
<v-container>
<v-col cols="12" class="mb-4">
<h1 class="display-2 font-weight-bold mb-3">
Login
</h1>
</v-col>
<v-col
cols="12"
md="4"
>
<v-text-field
v-model="username"
:rules="usernameRules"
label="Username"
required
/>
</v-col>
<v-col
cols="12"
md="4"
>
<v-text-field
v-model="password"
type="password"
:rules="passwordRules"
label="Password"
required
/>
</v-col>
</v-container>
</v-form>
</template>
<script>
export default {
data: () => ({
valid: false,
username: '',
password: '',
usernameRules: [
v => !!v || 'Username is required'
],
passwordRules: [
v => !!v || 'Password is required'
]
})
}
</script>

View File

@@ -11,12 +11,12 @@ const routes = [
component: Home component: Home
}, },
{ {
path: '/about', path: '/login',
name: 'About', name: 'Signin',
// route level code-splitting // route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route // this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited. // which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/About.vue') component: () => import(/* webpackChunkName: "about" */ '../views/Signin.vue')
} }
] ]

15
src/views/Signin.vue Normal file
View File

@@ -0,0 +1,15 @@
<template>
<Login />
</template>
<script>
import Login from '../components/Login'
export default {
name: 'Signin',
components: {
Login
}
}
</script>