summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-03-12 16:45:11 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-03-12 16:45:11 +0900
commitba98abc97b839912d19f3337092d54c4a56f77da (patch)
tree7449720f51dfa9ab88707559444460493a560023
parentenhance(client): 設定から自分のロールを確認できるように (diff)
parentパスワードリセットがおささってしまわないようにする (... (diff)
downloadsharkey-ba98abc97b839912d19f3337092d54c4a56f77da.tar.gz
sharkey-ba98abc97b839912d19f3337092d54c4a56f77da.tar.bz2
sharkey-ba98abc97b839912d19f3337092d54c4a56f77da.zip
Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
-rw-r--r--locales/ja-JP.yml1
-rw-r--r--packages/frontend/src/pages/user-info.vue21
2 files changed, 15 insertions, 7 deletions
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index b7ff05e458..efe9306e59 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -970,6 +970,7 @@ reactionAcceptance: "リアクションの受け入れ"
likeOnly: "いいねのみ"
likeOnlyForRemote: "リモートからはいいねのみ"
rolesAssignedToMe: "自分に割り当てられたロール"
+resetPasswordConfirm: "パスワードリセットしますか?"
_achievements:
earnedAt: "獲得日時"
diff --git a/packages/frontend/src/pages/user-info.vue b/packages/frontend/src/pages/user-info.vue
index 373af193d7..571f058240 100644
--- a/packages/frontend/src/pages/user-info.vue
+++ b/packages/frontend/src/pages/user-info.vue
@@ -262,14 +262,21 @@ async function updateRemoteUser() {
}
async function resetPassword() {
- const { password } = await os.api('admin/reset-password', {
- userId: user.id,
- });
-
- os.alert({
- type: 'success',
- text: i18n.t('newPasswordIs', { password }),
+ const confirm = await os.confirm({
+ type: 'warning',
+ text: i18n.ts.resetPasswordConfirm,
});
+ if (confirm.canceled) {
+ return;
+ } else {
+ const { password } = await os.api('admin/reset-password', {
+ userId: user.id,
+ });
+ os.alert({
+ type: 'success',
+ text: i18n.t('newPasswordIs', { password }),
+ });
+ }
}
async function toggleSuspend(v) {