From a5cd388a1ee2f25ae675b4e5784aa5c792d9ca4a Mon Sep 17 00:00:00 2001 From: les Date: Wed, 7 Oct 2020 13:05:19 +0200 Subject: [PATCH] fix some missing $config --- components/admin/Moderation.vue | 4 ++-- components/admin/Theme.vue | 2 +- pages/event/_id.vue | 2 +- pages/event/eventAdmin.vue | 2 +- pages/settings.vue | 14 ++++++-------- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/components/admin/Moderation.vue b/components/admin/Moderation.vue index a5c83b94..f777a561 100644 --- a/components/admin/Moderation.vue +++ b/components/admin/Moderation.vue @@ -141,14 +141,14 @@ export default { }, async toggleUserBlock (ap_user) { if (!ap_user.blocked) { - const ret = await this.$root.$confirm(this.$t('admin.user_block_confirm')) + const ret = await this.$root.$confirm('admin.user_block_confirm') if (!ret) { return } } await this.$axios.post('/instances/toggle_user_block', { ap_id: ap_user.ap_id }) ap_user.blocked = !ap_user.blocked }, async deleteResource (resource) { - const ret = await this.$root.$confirm(this.$t('admin.delete_resource_confirm')) + const ret = await this.$root.$confirm('admin.delete_resource_confirm') if (!ret) { return } await this.$axios.delete(`/resources/${resource.id}`) this.resources = this.resources.filter(r => r.id !== resource.id) diff --git a/components/admin/Theme.vue b/components/admin/Theme.vue index c697d738..ffd742ef 100644 --- a/components/admin/Theme.vue +++ b/components/admin/Theme.vue @@ -143,7 +143,7 @@ export default { this.linkModal = false }, async removeFooterLink (item) { - const ret = await this.$root.$confirm(this.$t('common.confirm'), this.$t('admin.delete_footer_link_confirm')) + const ret = await this.$root.$confirm('admin.delete_footer_link_confirm') if (!ret) { return } const footerLinks = this.settings.footerLinks.filter(l => l.label !== item.label) this.setSetting({ key: 'footerLinks', value: footerLinks }) diff --git a/pages/event/_id.vue b/pages/event/_id.vue index 068ebb56..427cee52 100644 --- a/pages/event/_id.vue +++ b/pages/event/_id.vue @@ -67,7 +67,7 @@ v-dialog(v-model='showFollowMe' destroy-on-close max-width='500px') h4(slot='title') {{$t('common.follow_me_title')}} - FollowMe + FollowMe(@close='showFollowMe=false' is-dialog) v-dialog.showResource#resourceDialog(v-model='showResources' fullscreen width='95vw' diff --git a/pages/event/eventAdmin.vue b/pages/event/eventAdmin.vue index 2300f19b..71c0c0b9 100644 --- a/pages/event/eventAdmin.vue +++ b/pages/event/eventAdmin.vue @@ -29,7 +29,7 @@ export default { methods: { ...mapActions(['delEvent']), async remove (parent = false) { - const ret = await this.$root.$confirm(this.$t('common.confirm'), this.$t(`event.remove_${parent ? 'recurrent_' : ''}confirmation`)) + const ret = await this.$root.$confirm(`event.remove_${parent ? 'recurrent_' : ''}confirmation`) if (!ret) { return } const id = parent ? this.event.parentId : this.event.id await this.$axios.delete(`/event/${id}`) diff --git a/pages/settings.vue b/pages/settings.vue index 7a23b187..ab78b7ef 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -54,14 +54,12 @@ export default { // Message({ message: e, showClose: true, type: 'warning' }) // }) // }, - remove_account () { - this.$root.$confirm(this.$t('settings.remove_account_confirm'), this.$t('common.confirm'), { - type: 'error' - }).then(() => { - this.$axios.$delete('/user') - this.$auth.logout() - this.$router.replace('/') - }) + async remove_account () { + const ret = await this.$root.$confirm('settings.remove_account_confirm', { color: 'error' }) + if (!ret) return + this.$axios.$delete('/user') + this.$auth.logout() + this.$router.replace('/') } }, head () {