summaryrefslogtreecommitdiff
path: root/src/web
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 /src/web
parentv2470 (diff)
downloadmisskey-15d08564c8cb553e48677daee20648d076323424.tar.gz
misskey-15d08564c8cb553e48677daee20648d076323424.tar.bz2
misskey-15d08564c8cb553e48677daee20648d076323424.zip
#739
Diffstat (limited to 'src/web')
-rw-r--r--src/web/app/desktop/tags/dialog.tag3
-rw-r--r--src/web/app/desktop/tags/settings.tag19
2 files changed, 17 insertions, 5 deletions
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%');
+ });
});
});
});