upd: handle email signups properly with approval enabled

This commit is contained in:
Mar0xy 2023-10-18 03:21:06 +02:00
parent 3f0cc256dc
commit 32fc540df4
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
3 changed files with 15 additions and 4 deletions

View file

@ -45,6 +45,13 @@ function submit() {
os.api('signup-pending', {
code: props.code,
}).then(res => {
if (res.pendingApproval) {
return os.alert({
type: 'success',
title: i18n.ts._signup.almostThere,
text: i18n.ts._signup.approvalPending,
});
}
return login(res.i, '/');
}).catch(() => {
submitting = false;