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>2022-08-06 11:03:57 +0300
committerdartcafe <github@dartcafe.de>2022-08-21 02:29:30 +0300
commitceff9809a8ccdf0a0c4cb5f231bbc66a6afd24e8 (patch)
tree176b2a9a5709e43c2263525dd85109b86f155542 /src/js/components
parent96eead52d6a45654e74fd018c957021eadb36536 (diff)
send out confirmed options
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components')
-rw-r--r--src/js/components/Configuration/ConfigClosing.vue17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/js/components/Configuration/ConfigClosing.vue b/src/js/components/Configuration/ConfigClosing.vue
index 925fbbeb..b7529c07 100644
--- a/src/js/components/Configuration/ConfigClosing.vue
+++ b/src/js/components/Configuration/ConfigClosing.vue
@@ -29,6 +29,12 @@
</template>
{{ closed ? t('polls', 'Reopen poll'): t('polls', 'Close poll') }}
</VueButton>
+ <VueButton @click="sendConfirmation()">
+ <template #icon>
+ <OpenPollIcon v-if="closed" />
+ </template>
+ {{ t('polls', 'Send Confirmation') }}
+ </VueButton>
<CheckboxRadioSwitch v-show="!closed" :checked.sync="useExpire" type="switch">
{{ t('polls', 'Poll closing date') }}
</CheckboxRadioSwitch>
@@ -38,6 +44,7 @@
<script>
import { mapState, mapGetters } from 'vuex'
+import { showError, showSuccess } from '@nextcloud/dialogs'
import moment from '@nextcloud/moment'
import { Button as VueButton, DatetimePicker, CheckboxRadioSwitch } from '@nextcloud/vue'
import OpenPollIcon from 'vue-material-design-icons/LockOpenVariant.vue'
@@ -120,6 +127,16 @@ export default {
this.$emit('change')
},
+
+ async sendConfirmation() {
+ const confirmations = await this.$store.dispatch('poll/sendConfirmation')
+ confirmations.sent.forEach((confirmation) => {
+ showSuccess(t('polls', `Confirmation sent to ${confirmation}`))
+ })
+ confirmations.error.forEach((confirmation) => {
+ showError(t('polls', `Confirmation could not be sent to ${confirmation}`))
+ })
+ },
},
}
</script>