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>2021-10-18 01:05:29 +0300
committerdartcafe <github@dartcafe.de>2021-10-18 01:05:29 +0300
commitf1ad6f9ae69b0fdbeada38883c8cf9816c1fcef1 (patch)
treed262026c9ffec2a1d4f3e1236e7557e6c0a53f37 /src/js/components/Configuration
parent591251366cc0ad974b6e7ed681a9eb64b8539bbf (diff)
Adding a reminder job configurable per poll
Signed-off-by: dartcafe <github@dartcafe.de>
Diffstat (limited to 'src/js/components/Configuration')
-rw-r--r--src/js/components/Configuration/ConfigAutoReminder.vue57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/js/components/Configuration/ConfigAutoReminder.vue b/src/js/components/Configuration/ConfigAutoReminder.vue
new file mode 100644
index 00000000..d816d8d5
--- /dev/null
+++ b/src/js/components/Configuration/ConfigAutoReminder.vue
@@ -0,0 +1,57 @@
+<!--
+ - @copyright Copyright (c) 2021 René Gieling <github@dartcafe.de>
+ -
+ - @author René Gieling <github@dartcafe.de>
+ -
+ - @license GNU AGPL version 3 or any later version
+ -
+ - This program is free software: you can redistribute it and/or modify
+ - it under the terms of the GNU Affero General Public License as
+ - published by the Free Software Foundation, either version 3 of the
+ - License, or (at your option) any later version.
+ -
+ - This program is distributed in the hope that it will be useful,
+ - but WITHOUT ANY WARRANTY; without even the implied warranty of
+ - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ - GNU Affero General Public License for more details.
+ -
+ - You should have received a copy of the GNU Affero General Public License
+ - along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -
+ -->
+
+<template>
+ <CheckboxRadioSwitch :checked.sync="autoReminder" type="switch">
+ {{ t('polls', 'Use Autoreminder') }}
+ </CheckboxRadioSwitch>
+</template>
+
+<script>
+import { mapState } from 'vuex'
+import { CheckboxRadioSwitch } from '@nextcloud/vue'
+
+export default {
+ name: 'ConfigAutoReminder',
+
+ components: {
+ CheckboxRadioSwitch,
+ },
+
+ computed: {
+ ...mapState({
+ poll: (state) => state.poll,
+ }),
+
+ autoReminder: {
+ get() {
+ return !!this.poll.autoReminder
+ },
+ set(value) {
+ this.$store.commit('poll/setProperty', { autoReminder: +value })
+ this.$emit('change')
+ },
+ },
+
+ },
+}
+</script>