Skip to content
Snippets Groups Projects
Unverified Commit 4215a11d authored by atsuchan's avatar atsuchan Committed by GitHub
Browse files

パスワードリセットがおささってしまわないようにする (#10304)

Add dialog to Password reset
parent 57cac0aa
No related branches found
No related tags found
No related merge requests found
......@@ -969,6 +969,7 @@ cannotBeChangedLater: "後から変更できません。"
reactionAcceptance: "リアクションの受け入れ"
likeOnly: "いいねのみ"
likeOnlyForRemote: "リモートからはいいねのみ"
resetPasswordConfirm: "パスワードリセットしますか?"
_achievements:
earnedAt: "獲得日時"
......
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment