some recategorization of options...

This commit is contained in:
Henry Jameson 2018-09-09 19:36:13 +03:00
parent f1c16327b6
commit 2db991fc7f
8 changed files with 78 additions and 47 deletions

View file

@ -5,7 +5,7 @@ const LoginForm = {
}),
computed: {
loggingIn () { return this.$store.state.users.loggingIn },
registrationOpen () { return this.$store.state.config.registrationOpen }
registrationOpen () { return this.$store.state.interface.registrationOpen }
},
methods: {
submit () {

View file

@ -5,11 +5,11 @@ const registration = {
registering: false
}),
created () {
if ((!this.$store.state.config.registrationOpen && !this.token) || !!this.$store.state.users.currentUser) {
if ((!this.$store.state.interface.registrationOpen && !this.token) || !!this.$store.state.users.currentUser) {
this.$router.push('/main/all')
}
// Seems like this doesn't work at first page open for some reason
if (this.$store.state.config.registrationOpen && this.token) {
if (this.$store.state.interface.registrationOpen && this.token) {
this.$router.push('/registration')
}
},

View file

@ -44,8 +44,7 @@ const settings = {
return this.$store.state.users.currentUser
},
currentSaveStateNotice () {
console.log(this.$store.state.config._internal.currentSaveStateNotice && this.$store.state.config._internal.currentSaveStateNotice.error)
return this.$store.state.config._internal.currentSaveStateNotice
return this.$store.state.interface.settings.currentSaveStateNotice
}
},
watch: {

View file

@ -5,15 +5,17 @@
{{$t('settings.settings')}}
</div>
<template v-if="currentSaveStateNotice">
<div @click.prevent class="alert error" v-if="currentSaveStateNotice.error">
Errr
</div>
<transition name="fade">
<template v-if="currentSaveStateNotice">
<div @click.prevent class="alert error" v-if="!currentSaveStateNotice.error">
Errr
</div>
<div @click.prevent class="alert success" v-if="!currentSaveStateNotice.error">
Succ
</div>
<div @click.prevent class="alert success" v-if="!currentSaveStateNotice.error">
Succ
</div>
</template>
</transition>
</div>
<div class="panel-body">
<tab-switcher>