diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 1ecd35ff0..f3e4f97c2 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -969,6 +969,7 @@ cannotBeChangedLater: "後から変更できません。" reactionAcceptance: "リアクションの受け入れ" likeOnly: "いいねのみ" likeOnlyForRemote: "リモートからはいいねのみ" +resetPasswordConfirm: "パスワードリセットしますか?" _achievements: earnedAt: "獲得日時" diff --git a/packages/frontend/src/pages/user-info.vue b/packages/frontend/src/pages/user-info.vue index 373af193d..571f05824 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) {