add login view

This commit is contained in:
Axolotle 2020-07-08 18:08:07 +02:00
parent aa19c56933
commit d6c7d9abf3
2 changed files with 36 additions and 6 deletions

View file

@ -1,12 +1,9 @@
import Home from './views/Home'
import Login from './views/Login'
const routes = [
{
path: '/',
name: 'Home',
component: Home
},
{path: '/', component: Home},
{path: '/login', component: Login},
]
export default routes

33
app/src/views/Login.vue Normal file
View file

@ -0,0 +1,33 @@
<template>
<b-form @submit.prevent="login">
<!-- TODO add hidden domain input -->
<b-input-group>
<template v-slot:prepend>
<b-input-group-text>
<label class="sr-only" for="input-password" >{{ $t('password') }}</label>
<icon iname="lock" class="sm"/>
</b-input-group-text>
</template>
<b-form-input required type="password" v-model="password" id="input-password" :placeholder="$t('administration_password')"></b-form-input>
<b-input-group-append>
<b-button type="submit" variant="success">{{ $t('login') }}</b-button>
</b-input-group-append>
</b-input-group>
</b-form>
</template>
<script>
export default {
name: 'Login',
data: () => {
return {
password: ''
}
},
methods: {
login: function () {
console.log(this.password);
}
}
}
</script>