Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordartcafe <github@dartcafe.de>2020-04-29 15:53:53 +0300
committerdartcafe <github@dartcafe.de>2020-04-29 15:53:53 +0300
commit9579a6dfab783ed267a4f04552427e132e41b98b (patch)
treea5baaa017b88df1c5c9e9890e76c2bb688353fac /src/js/views/PollList.vue
parentea45bb2deff5e3222415ab425df0e078b515eb64 (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.vue16
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