From e1dbdc2bfc0f41c2b308b142c70e9e4573c98cf9 Mon Sep 17 00:00:00 2001 From: mei23 Date: Thu, 21 Mar 2019 21:42:34 +0900 Subject: [PATCH] confirm silence --- locales/ja-JP.yml | 2 ++ src/client/app/admin/views/users.vue | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index d4457b6594..7320b0ad13 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1326,7 +1326,9 @@ admin/views/users.vue: unsuspend-confirm: "凍結を解除しますか?" unsuspended: "凍結を解除しました" make-silence: "サイレンス" + silence-confirm: "サイレンスしますか?" unmake-silence: "サイレンスの解除" + unsilence-confirm: "サイレンスを解除しますか?" verify: "公式アカウントにする" verify-confirm: "公式アカウントにしますか?" verified: "公式アカウントにしました" diff --git a/src/client/app/admin/views/users.vue b/src/client/app/admin/views/users.vue index ff485cec86..cef6f796cc 100644 --- a/src/client/app/admin/views/users.vue +++ b/src/client/app/admin/views/users.vue @@ -232,6 +232,8 @@ export default Vue.extend({ }, async silenceUser() { + if (!await this.getConfirmed(this.$t('silence-confirm'))) return; + const process = async () => { await this.$root.api('admin/silence-user', { userId: this.user._id }); this.$root.dialog({ @@ -251,6 +253,8 @@ export default Vue.extend({ }, async unsilenceUser() { + if (!await this.getConfirmed(this.$t('unsilence-confirm'))) return; + const process = async () => { await this.$root.api('admin/unsilence-user', { userId: this.user._id }); this.$root.dialog({