mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge 51c4070879
into 7d84185d0e
This commit is contained in:
commit
671e577689
5 changed files with 46 additions and 7 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue