diff options
author | dartcafe <github@dartcafe.de> | 2020-04-29 15:53:53 +0300 |
---|---|---|
committer | dartcafe <github@dartcafe.de> | 2020-04-29 15:53:53 +0300 |
commit | 9579a6dfab783ed267a4f04552427e132e41b98b (patch) | |
tree | a5baaa017b88df1c5c9e9890e76c2bb688353fac /src/js/views/PollList.vue | |
parent | ea45bb2deff5e3222415ab425df0e078b515eb64 (diff) |
Move sidebar to top level and use in pollList
Diffstat (limited to 'src/js/views/PollList.vue')
-rw-r--r-- | src/js/views/PollList.vue | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/js/views/PollList.vue b/src/js/views/PollList.vue index 0a80fc19..2287c66a 100644 --- a/src/js/views/PollList.vue +++ b/src/js/views/PollList.vue @@ -135,15 +135,25 @@ export default { watch: { $route() { - window.document.title = t('polls', 'Polls') + ' - ' + this.title + this.refreshView() } }, - created() { - window.document.title = t('polls', 'Polls') + ' - ' + this.title + mounted() { + this.refreshView() }, methods: { + refreshView() { + window.document.title = t('polls', 'Polls') + ' - ' + this.title + if (!this.filteredPolls(this.$route.params.type).find(poll => { + return poll.id === this.$store.state.poll.id + })) { + this.$root.$emit('closeSideBar') + } + + }, + setSort(payload) { if (this.sort === payload.sort) { this.reverse = !this.reverse |