1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
This commit is contained in:
SHestres 2025-03-30 11:01:14 -04:00 committed by GitHub
commit 671e577689
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 46 additions and 7 deletions

View file

@ -149,9 +149,17 @@ const UserNew = () => {
}).catch(err => {
console.error('[usernew] failed to update user policy', err);
});
}, function () {
toast(globalize.translate('ErrorDefault'));
loading.hide();
}, function (error) {
try {
console.error('[usernew] failed to create new user', error);
error.text().then((errorMessage: string) => {
toast(errorMessage);
loading.hide();
});
} catch {
toast(globalize.translate('ErrorDefault'));
loading.hide();
}
});
};
@ -198,6 +206,7 @@ const UserNew = () => {
type='text'
id='txtUsername'
label='LabelName'
validator={{ pattern: '^([\\w \\-\'._@+]*)([\\w\\-\'._@+])([\\w \\-\'._@+]*)$', errMessage: globalize.translate('MessageInvalidUsernameFormat') }}
options={'required'}
/>
</div>