Skip to content
Snippets Groups Projects
Commit 6386b471 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

redirect if already logged & add transition

parent 210a4857
No related branches found
No related tags found
2 merge requests!2132.3.2-rc1,!199REDMINE_ISSUE-12559
...@@ -151,6 +151,7 @@ ...@@ -151,6 +151,7 @@
</header> </header>
<main> <main>
<div id="content" class="ui stackable grid centered container"> <div id="content" class="ui stackable grid centered container">
<transition name="fadeOutUp">
<div v-if="messages && messages.length > 0" class="row"> <div v-if="messages && messages.length > 0" class="row">
<div class="fourteen wide column"> <div class="fourteen wide column">
<div <div
...@@ -169,6 +170,7 @@ ...@@ -169,6 +170,7 @@
</div> </div>
</div> </div>
</div> </div>
</transition>
<div :class="{ active: loader.isLoading }" class="ui inverted dimmer"> <div :class="{ active: loader.isLoading }" class="ui inverted dimmer">
<div class="ui text loader"> <div class="ui text loader">
{{ loader.message }} {{ loader.message }}
...@@ -373,5 +375,54 @@ footer { ...@@ -373,5 +375,54 @@ footer {
box-shadow: none !important; box-shadow: none !important;
transition: none !important; transition: none !important;
} }
.bounce-enter-active {
animation: bounce-in .5s;
}
.bounce-leave-active {
animation: bounce-in .5s reverse;
}
@keyframes bounce-in {
0% {
transform: scale(0);
}
50% {
transform: scale(1.5);
}
100% {
transform: scale(1);
}
}
.fadeOutUp-enter-active {
animation: fadeInDown .5s;
}
.fadeOutUp-leave-active {
animation: fadeOutUp .5s;
}
@keyframes fadeOutUp {
0% {
opacity: 1;
}
100% {
opacity: 0;
transform: translate3d(0, -100%, 0);
}
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translate3d(0, -100%, 0);
}
to {
opacity: 1;
transform: translate3d(0, 0, 0);
}
}
</style> </style>
\ No newline at end of file
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<div> <div>
<div class="row"> <div class="row">
<div class="fourteen wide column"> <div class="fourteen wide column">
<img <img class="ui centered small image" :src="logo" />
class="ui centered small image"
:src="logo"
/>
<h2 class="ui center aligned icon header"> <h2 class="ui center aligned icon header">
<div class="content"> <div class="content">
{{ APPLICATION_NAME }} {{ APPLICATION_NAME }}
...@@ -60,7 +57,6 @@ ...@@ -60,7 +57,6 @@
</template> </template>
<script> <script>
export default { export default {
name: "Login", name: "Login",
data() { data() {
...@@ -101,5 +97,15 @@ export default { ...@@ -101,5 +97,15 @@ export default {
.catch(); .catch();
}, },
}, },
mounted() {
if (this.$store.state.user) {
this.$store.commit(
"DISPLAY_MESSAGE",
"Vous êtes déjà connecté, vous allez être rediriger vers la page d'accueil."
);
setTimeout(() => this.$router.push("/"), 3100);
}
},
}; };
</script> </script>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment