Update Login.vue

This commit is contained in:
Zaptyp 2021-06-11 15:49:30 +02:00
parent ccf15ff26b
commit a19ea9085d

View file

@ -1,18 +1,28 @@
<template> <template>
<div id="login"> <div id="login">
<img class="image" src="../assets/logo_login.svg" width="500" alt="Wulkanowy">
<v-main style="width: 100%;"> <v-main style="width: 100%;">
<div style="clear: both;"></div>
<v-card <v-card
:loading="this.$store.state.isLoading" elevation="10"
elevation="24"
id="login-form" id="login-form"
class="mx-auto mt-9"> class="mx-auto"
<form> >
<v-container> <Baner v-if="window.width > 900"></Baner>
<UserLogin v-if="!this.$store.state.showStudentsList"></UserLogin> <div class="card">
<SelectStudent v-if="this.$store.state.showStudentsList"></SelectStudent> <v-col>
</v-container> <form>
</form> <v-container>
<UserLogin
v-if="!this.$store.state.showStudentsList && !this.$store.state.isLoading">
</UserLogin>
<SelectStudent
v-if="this.$store.state.showStudentsList && !this.$store.state.isLoading">
</SelectStudent>
<Loading v-if="this.$store.state.isLoading"></Loading>
</v-container>
</form>
</v-col>
</div>
</v-card> </v-card>
</v-main> </v-main>
</div> </div>
@ -21,17 +31,41 @@
<script> <script>
import UserLogin from '../components/Login/UserLogin.vue'; import UserLogin from '../components/Login/UserLogin.vue';
import SelectStudent from '../components/Login/SelectStudent.vue'; import SelectStudent from '../components/Login/SelectStudent.vue';
import Baner from '../components/Login/Baner.vue';
import Loading from '../components/Login/Loading.vue';
export default { export default {
name: 'Login', name: 'Login',
components: { components: {
SelectStudent, SelectStudent,
UserLogin, UserLogin,
Baner,
Loading,
},
data() {
return {
windowWidth: '',
window: {
width: 0,
height: 0,
},
};
},
created() {
window.addEventListener('resize', this.handleResize);
this.handleResize();
},
destroyed() {
window.removeEventListener('resize', this.handleResize);
}, },
methods: { methods: {
getLoading() { getLoading() {
return this.$store.state.isLoading; return this.$store.state.isLoading;
}, },
handleResize() {
this.window.width = window.innerWidth;
this.window.height = window.innerHeight;
},
}, },
}; };
</script> </script>
@ -40,27 +74,24 @@ export default {
::-webkit-scrollbar { ::-webkit-scrollbar {
display: none; display: none;
} }
#login { #login {
text-align: center; text-align: center;
background-position: center center;
overflow: hidden; overflow: hidden;
background-image: url("../assets/wallpaper.jpg"); background-image: url("../assets/wallpaper.jpg");
background-size: cover; background-size: cover;
height: 100%; height: 100%;
width: 100%; width: 100%;
} }
#login-form { #login-form {
width: 500px;
top: 15%; top: 15%;
bottom: 50%; width: 850px;
margin-bottom: 200px;
} }
.login-input { .login-input {
margin: 10px; margin: 10px;
} }
.login-button { .login-button {
margin: 10px; margin: 10px;
} }
</style> </style>