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-08-20 22:46:17 +0300
committerdartcafe <github@dartcafe.de>2020-08-20 22:46:17 +0300
commit6b73deac12a2dabc4d94b92ce91eebd04620e3bb (patch)
tree94b2353067dd4e50fdde5ebb650467a3fa247ff0 /src/js/components/SideBar/SideBarTabConfiguration.vue
parentc7f111b583bc1a27c2654c94d2c067fab329ce23 (diff)
migrate to @nextcloud/dialogs
Diffstat (limited to 'src/js/components/SideBar/SideBarTabConfiguration.vue')
-rw-r--r--src/js/components/SideBar/SideBarTabConfiguration.vue15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/js/components/SideBar/SideBarTabConfiguration.vue b/src/js/components/SideBar/SideBarTabConfiguration.vue
index 2e6a3f6f..5339b250 100644
--- a/src/js/components/SideBar/SideBarTabConfiguration.vue
+++ b/src/js/components/SideBar/SideBarTabConfiguration.vue
@@ -109,12 +109,13 @@
</template>
<script>
-import { mapState } from 'vuex'
-import { DatetimePicker } from '@nextcloud/vue'
-import { emit } from '@nextcloud/event-bus'
import ConfigBox from '../Base/ConfigBox'
import debounce from 'lodash/debounce'
+import { mapState } from 'vuex'
+import { showSuccess, showError } from '@nextcloud/dialogs'
+import { emit } from '@nextcloud/event-bus'
import moment from '@nextcloud/moment'
+import { DatetimePicker } from '@nextcloud/vue'
export default {
name: 'SideBarTabConfiguration',
@@ -296,21 +297,21 @@ export default {
emit('update-polls')
})
.catch(() => {
- OC.Notification.showTemporary(t('polls', 'Error deleting poll.'), { type: 'error' })
+ showError(t('polls', 'Error deleting poll.'))
})
},
updatePoll() {
if (this.titleEmpty) {
- OC.Notification.showTemporary(t('polls', 'Title must not be empty!'), { type: 'success' })
+ showError(t('polls', 'Title must not be empty!'))
} else {
this.$store.dispatch('poll/update')
.then((response) => {
- OC.Notification.showTemporary(t('polls', '"{pollTitle}" successfully saved', 1, { pollTitle: response.data.title }), { type: 'success' })
+ showSuccess(t('polls', '"{pollTitle}" successfully saved', 1, { pollTitle: response.data.title }))
emit('update-polls')
})
.catch(() => {
- OC.Notification.showTemporary(t('polls', 'Error writing poll'), { type: 'error' })
+ showError(t('polls', 'Error writing poll'))
})
this.writingPoll = false
}