refs #969 Reset poll form when toggle the form

This commit is contained in:
AkiraFukushima 2019-07-20 22:09:55 +09:00
parent 64fd8805c3
commit aeed12cd59
1 changed files with 6 additions and 1 deletions

View File

@ -149,7 +149,7 @@ export default {
showContentWarning: false,
visibilityList: Visibility,
openPoll: false,
polls: ['', ''],
polls: [],
pollExpire: {
label: this.$t('modals.new_toot.poll.expires.1_day'),
value: 3600 * 24
@ -354,6 +354,11 @@ export default {
},
togglePollForm() {
this.openPoll = !this.openPoll
if (this.openPoll) {
this.polls = ['', '']
} else {
this.polls = []
}
},
addPoll() {
this.polls.push('')