Skip to content

Commit

Permalink
Merge pull request exonum#114 from boguslavsky/fix-first-login
Browse files Browse the repository at this point in the history
fix modal hide on register
  • Loading branch information
boguslavsky committed Mar 22, 2018
2 parents 2f3722e + c489533 commit 7734423
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
23 changes: 13 additions & 10 deletions frontend/src/components/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@
<script>
const className = 'modal-open'
function toggle(state) {
if (state) {
document.body.classList.add(className)
} else {
document.body.classList.remove(className)
}
}
module.exports = {
name: 'modal',
props: {
Expand All @@ -47,19 +39,30 @@
visible: Boolean
},
watch: {
visible: toggle
visible: function(value) {
this.toggle(value)
}
},
methods: {
close: function() {
this.$emit('close')
},
submit: function() {
this.$emit('submit')
},
toggle: function(state) {
if (state) {
document.body.classList.add(className)
} else {
document.body.classList.remove(className)
}
}
},
mounted: function() {
this.$nextTick(function() {
toggle(false)
this.toggle(false)
})
}
}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
this.current = tab
}
},
changeTab: function(tab) {
this.current = tab
this.tabs.forEach(value => {
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/pages/Auth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@
this.$storage.set(this.keyPair)
this.$router.push({name: 'user'})
this.$nextTick(function() {
this.$router.push({name: 'user'})
})
}
}
}
Expand Down

0 comments on commit 7734423

Please sign in to comment.