locale for validation message is switched when changing locale. Cleaned uo AuthLayout_gdd.vue

This commit is contained in:
Moriz Wahl 2021-03-24 16:28:36 +01:00
parent 0b5e85b1cc
commit 763c22648a
2 changed files with 53 additions and 79 deletions

View File

@ -17,54 +17,56 @@
</template>
<script>
import { ParticlesBg } from "particles-bg-vue";
import icon from "./icon.js";
import { ParticlesBg } from "particles-bg-vue";
import icon from "./icon.js"
import { localeChanged } from 'vee-validate'
export default {
name: 'app',
components: {
ParticlesBg
},
created () {
console.log( "xx", $cookies.get("gdd_lang"))
console.log('%cWillkommen bei Gradido %cgreen text', 'font-weight:bold', 'color: green')
if ( $cookies.isKey("gdd_session_id") == true) {
console.log('%cHey %c'+$cookies.get("gdd_u")+'', 'font-weight:bold', 'color: orange')
this.$store.commit('session_id', $cookies.get("gdd_session_id"))
this.$store.commit('email', $cookies.get("gdd_u"))
this.$store.commit('language', $cookies.get("gdd_lang"))
this.$i18n.locale = $cookies.get("gdd_lang")
this.$router.push("overview")
export default {
name: 'app',
components: {
ParticlesBg
},
created () {
console.log( "xx", $cookies.get("gdd_lang"))
console.log('%cWillkommen bei Gradido %cgreen text', 'font-weight:bold', 'color: green')
if ( $cookies.isKey("gdd_session_id") == true) {
console.log('%cHey %c'+$cookies.get("gdd_u")+'', 'font-weight:bold', 'color: orange')
this.$store.commit('session_id', $cookies.get("gdd_session_id"))
this.$store.commit('email', $cookies.get("gdd_u"))
this.$store.commit('language', $cookies.get("gdd_lang"))
this.$i18n.locale = $cookies.get("gdd_lang")
this.$router.push("overview")
}else {
console.log("app.vue to Logout")
this.$store.dispatch('logout')
}
},
data() {
return {
config: {
num: [1, 7],
rps: 15,
radius: [5, 50],
life: [6.5, 15],
v: [1, 1],
tha: [-40, 40],
body: icon,
alpha: [0.6, 0],
scale: [0.1, 0.4],
position: "all",
cross: "dead",
random: 2,
},
};
},
console.log("app.vue to Logout")
this.$store.dispatch('logout')
}
},
data() {
return {
config: {
num: [1, 7],
rps: 15,
radius: [5, 50],
life: [6.5, 15],
v: [1, 1],
tha: [-40, 40],
body: icon,
alpha: [0.6, 0],
scale: [0.1, 0.4],
position: "all",
cross: "dead",
random: 2,
},
};
},
methods: {
setLocale(locale) {
this.$i18n.locale = locale
this.$store.commit('language', this.$i18n.locale)
}
},
}
setLocale(locale) {
this.$i18n.locale = locale
this.$store.commit('language', this.$i18n.locale)
localeChanged(locale)
}
},
}
</script>
<style>

View File

@ -9,38 +9,10 @@
</div>
</template>
<script>
import ContentFooter from './ContentFooter.vue';
import { localeChanged } from 'vee-validate'
export default {
components: {
ContentFooter
},
data() {
return {
year: new Date().getFullYear(),
pageClass: 'login-page'
};
},
computed: {
title() {
return `${this.$route.name} Page`;
}
},
methods: {
setLocale(locale) {
this.$i18n.locale = locale
localeChanged()
//this.$router.push({
// params: { lang: locale }
//})
//this.hideDropdown()
}
}
};
import ContentFooter from './ContentFooter.vue'
export default {
components: {
ContentFooter
},
}
</script>
<style lang="scss">
.card { background-color:rgba(136, 130, 131, 0.3); }
</style>