From adff5382cad8b38381adfbfd0d6b35765948b6b9 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Thu, 18 Apr 2019 03:33:51 +0900 Subject: [PATCH] confirm silence (#4560) --- 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 6d68f0ca8c..bcdda6c671 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1336,7 +1336,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 0f46b564a9..2d6aef3371 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({