mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Update library name validation to trim automatically
This commit is contained in:
parent
1c2d7ef918
commit
37d6f94c7c
2 changed files with 3 additions and 3 deletions
|
@ -42,10 +42,10 @@ function onAddLibrary(e) {
|
||||||
isCreating = true;
|
isCreating = true;
|
||||||
loading.show();
|
loading.show();
|
||||||
const dlg = dom.parentWithClass(this, 'dlg-librarycreator');
|
const dlg = dom.parentWithClass(this, 'dlg-librarycreator');
|
||||||
const name = dlg.querySelector('#txtValue').value;
|
const name = dlg.querySelector('#txtValue').value.trim();
|
||||||
let type = dlg.querySelector('#selectCollectionType').value;
|
let type = dlg.querySelector('#selectCollectionType').value;
|
||||||
|
|
||||||
if (name.length == 0 || name.trim().length !== name.length) {
|
if (name.length === 0) {
|
||||||
alert({
|
alert({
|
||||||
text: globalize.translate('LibraryNameInvalid'),
|
text: globalize.translate('LibraryNameInvalid'),
|
||||||
type: 'error'
|
type: 'error'
|
||||||
|
|
|
@ -1015,7 +1015,7 @@
|
||||||
"LeaveBlankToNotSetAPassword": "You can leave this field blank to set no password.",
|
"LeaveBlankToNotSetAPassword": "You can leave this field blank to set no password.",
|
||||||
"Letterer": "Letterer",
|
"Letterer": "Letterer",
|
||||||
"LibraryAccessHelp": "Select the libraries to share with this user. Administrators will be able to edit all folders using the metadata manager.",
|
"LibraryAccessHelp": "Select the libraries to share with this user. Administrators will be able to edit all folders using the metadata manager.",
|
||||||
"LibraryNameInvalid": "Library name cannot be empty or have leading/trailing spaces.",
|
"LibraryNameInvalid": "Library name cannot be empty.",
|
||||||
"LibraryScanFanoutConcurrency": "Parallel library scan tasks limit",
|
"LibraryScanFanoutConcurrency": "Parallel library scan tasks limit",
|
||||||
"LibraryScanFanoutConcurrencyHelp": "Maximum number of parallel tasks during library scans. Setting this to 0 will choose a limit based on your systems core count. WARNING: Setting this number too high may cause issues with network file systems; if you encounter problems lower this number.",
|
"LibraryScanFanoutConcurrencyHelp": "Maximum number of parallel tasks during library scans. Setting this to 0 will choose a limit based on your systems core count. WARNING: Setting this number too high may cause issues with network file systems; if you encounter problems lower this number.",
|
||||||
"LibraryInvalidItemIdError": "The library is in an invalid state and cannot be edited. You are possibly encountering a bug: the path in the database is not the correct path on the filesystem.",
|
"LibraryInvalidItemIdError": "The library is in an invalid state and cannot be edited. You are possibly encountering a bug: the path in the database is not the correct path on the filesystem.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue