summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-08-29 02:46:28 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-08-29 02:46:28 +0900
commit15d08564c8cb553e48677daee20648d076323424 (patch)
treec7b3798452e0a8dd01db4a78a238445fe148b91e
parentv2470 (diff)
downloadmisskey-15d08564c8cb553e48677daee20648d076323424.tar.gz
misskey-15d08564c8cb553e48677daee20648d076323424.tar.bz2
misskey-15d08564c8cb553e48677daee20648d076323424.zip
#739
-rw-r--r--CHANGELOG.md4
-rw-r--r--locales/en.yml2
-rw-r--r--locales/ja.yml2
-rw-r--r--src/web/app/desktop/tags/dialog.tag3
-rw-r--r--src/web/app/desktop/tags/settings.tag19
5 files changed, 25 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index dc0442ba01..8a310513bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@ ChangeLog
=========
主に notable な changes を書いていきます
+unreleased
+----------
+* New: パスワードを変更する際に新しいパスワードを二度入力させる (#739)
+
2470 (2017/08/29)
-----------------
* New: トークンを再生成できるように (#497)
diff --git a/locales/en.yml b/locales/en.yml
index a24b8725ae..439b7ef069 100644
--- a/locales/en.yml
+++ b/locales/en.yml
@@ -212,6 +212,8 @@ desktop:
reset: "Change your password"
enter-current-password: "Enter the current password"
enter-new-password: "Enter the new password"
+ enter-new-password-again: "Enter the new password again"
+ not-match: "New password not matched"
changed: "Password updated successfully"
mk-post-form:
diff --git a/locales/ja.yml b/locales/ja.yml
index 88e0b76d82..258e192394 100644
--- a/locales/ja.yml
+++ b/locales/ja.yml
@@ -212,6 +212,8 @@ desktop:
reset: "パスワードを変更する"
enter-current-password: "現在のパスワードを入力してください"
enter-new-password: "新しいパスワードを入力してください"
+ enter-new-password-again: "もう一度新しいパスワードを入力してください"
+ not-match: "新しいパスワードが一致しません"
changed: "パスワードを変更しました"
mk-post-form:
diff --git a/src/web/app/desktop/tags/dialog.tag b/src/web/app/desktop/tags/dialog.tag
index 9905123eeb..743fd63942 100644
--- a/src/web/app/desktop/tags/dialog.tag
+++ b/src/web/app/desktop/tags/dialog.tag
@@ -44,6 +44,9 @@
// color #43A4EC
font-weight bold
+ &:empty
+ display none
+
> i
margin-right 0.5em
diff --git a/src/web/app/desktop/tags/settings.tag b/src/web/app/desktop/tags/settings.tag
index 80a42d6652..eabddfb432 100644
--- a/src/web/app/desktop/tags/settings.tag
+++ b/src/web/app/desktop/tags/settings.tag
@@ -256,6 +256,7 @@
</style>
<script>
import passwordDialog from '../scripts/password-dialog';
+ import dialog from '../scripts/dialog';
import notify from '../scripts/notify';
this.mixin('i');
@@ -264,11 +265,19 @@
this.reset = () => {
passwordDialog('%i18n:desktop.tags.mk-password-setting.enter-current-password%', currentPassword => {
passwordDialog('%i18n:desktop.tags.mk-password-setting.enter-new-password%', newPassword => {
- this.api('i/change_password', {
- current_password: currentPassword,
- new_password: newPassword
- }).then(() => {
- notify('%i18n:desktop.tags.mk-password-setting.changed%');
+ passwordDialog('%i18n:desktop.tags.mk-password-setting.enter-new-password-again%', newPassword2 => {
+ if (newPassword !== newPassword2) {
+ dialog(null, '%i18n:desktop.tags.mk-password-setting.not-match%', [{
+ text: 'OK'
+ }]);
+ return;
+ }
+ this.api('i/change_password', {
+ current_password: currentPassword,
+ new_password: newPassword
+ }).then(() => {
+ notify('%i18n:desktop.tags.mk-password-setting.changed%');
+ });
});
});
});