From de16b72cc037351a2eec6cd9d766c04769888ead Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sat, 8 Dec 2018 06:18:37 +0900 Subject: [PATCH] Resolve #3537 (#3540) * Resolve #3537 * tune --- locales/ja-JP.yml | 1 + .../common/views/components/password-settings.vue | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 54dad96f8..b7246d51c 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -980,6 +980,7 @@ common/views/components/password-settings.vue: enter-new-password-again: "もう一度新しいパスワードを入力してください" not-match: "新しいパスワードが一致しません" changed: "パスワードを変更しました" + failed: "パスワード変更に失敗しました" desktop/views/components/sub-note-content.vue: private: "この投稿は非公開です" diff --git a/src/client/app/common/views/components/password-settings.vue b/src/client/app/common/views/components/password-settings.vue index bcea32576..eb511d621 100644 --- a/src/client/app/common/views/components/password-settings.vue +++ b/src/client/app/common/views/components/password-settings.vue @@ -44,10 +44,18 @@ export default Vue.extend({ return; } this.$root.api('i/change_password', { - currentPasword: currentPassword, - newPassword: newPassword + currentPassword, + newPassword }).then(() => { - this.$notify(this.$t('changed')); + this.$root.dialog({ + type: 'success', + text: this.$t('changed') + }); + }).catch(() => { + this.$root.dialog({ + type: 'error', + text: this.$t('failed') + }); }); } }