summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2019-07-04 20:39:33 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-07-04 20:39:33 +0900
commit327ffd3498144d239032618a4529bc86ff1cbb1f (patch)
treee0683c4bfeefc27269bb15a37788411ad949a51e
parentテストページ廃止 (diff)
downloadsharkey-327ffd3498144d239032618a4529bc86ff1cbb1f.tar.gz
sharkey-327ffd3498144d239032618a4529bc86ff1cbb1f.tar.bz2
sharkey-327ffd3498144d239032618a4529bc86ff1cbb1f.zip
Resolve #4321
-rw-r--r--locales/ja-JP.yml1
-rw-r--r--src/client/app/common/views/components/follow-button.vue8
2 files changed, 9 insertions, 0 deletions
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index 5767a51b0f..f6e36c045f 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -36,6 +36,7 @@ common:
signout: "ログアウト"
reload-to-apply-the-setting: "この設定を反映するにはページをリロードする必要があります。今すぐリロードしますか?"
fetching-as-ap-object: "連合に照会中"
+ unfollow-confirm: "{name}さんをフォロー解除しますか?"
got-it: "わかった"
customization-tips:
diff --git a/src/client/app/common/views/components/follow-button.vue b/src/client/app/common/views/components/follow-button.vue
index cae6067635..17282cf8f0 100644
--- a/src/client/app/common/views/components/follow-button.vue
+++ b/src/client/app/common/views/components/follow-button.vue
@@ -92,6 +92,14 @@ export default Vue.extend({
try {
if (this.isFollowing) {
+ const canceled = await this.$root.dialog({
+ type: 'warning',
+ text: this.$t('@.unfollow-confirm', { name: user.name || user.username }),
+ showCancelButton: true
+ });
+
+ if (canceled) return;
+
await this.$root.api('following/delete', {
userId: this.user.id
});