diff --git a/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.html b/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.html index a77e0a852..1ea7711ec 100644 --- a/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.html +++ b/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.html @@ -181,49 +181,49 @@

Examples with Full Metadata

- title: Harry Potter and the Sorcerer's Stone - subtitle: The Boy Who Lived - authors: J.K. Rowling - series: Harry Potter + title: The Name of the Wind + subtitle: Special Edition + authors: Patrick Rothfuss + series: The Kingkiller Chronicle seriesIndex: 01 - year: 1997 - currentFilename: harry1_original.epub + year: 2007 + currentFilename: name_of_the_wind_original.epub

Basic pattern: {{ '{authors} - {title}' }}

-

Output: J.K. Rowling - Harry Potter and the Sorcerer's Stone.epub

+

Output: Patrick Rothfuss - The Name of the Wind.epub

Pattern with punctuation: {{ '{title}: {series}' }}

-

Output: Harry Potter and the Sorcerer's Stone: Harry Potter.epub

+

Output: The Name of the Wind: The Kingkiller Chronicle.epub

Series in folder path: {{ '{authors}/{series}/{seriesIndex} - {title}' }}

-

Output: J.K. Rowling/Harry Potter/01 - Harry Potter and the Sorcerer's Stone.epub

+

Output: Patrick Rothfuss/The Kingkiller Chronicle/01 - The Name of the Wind.epub

Folder only: {{ '{title}/' }}

-

Output: /Harry Potter and the Sorcerer's Stone/harry1_original.epub

+

Output: /The Name of the Wind/name_of_the_wind_original.epub

Absolute path: {{ '/{authors}/{title}' }}

-

Output: /J.K. Rowling/Harry Potter and the Sorcerer's Stone.epub

+

Output: /Patrick Rothfuss/The Name of the Wind.epub

Reuse original filename in path: {{ '{authors}/{series}/{currentFilename}' }}

-

Output: J.K. Rowling/Harry Potter/harry1_original.epub

+

Output: Patrick Rothfuss/The Kingkiller Chronicle/name_of_the_wind_original.epub

Title + Subtitle: {{ '{title}: {subtitle}' }}

-

Output: Harry Potter and the Sorcerer's Stone: The Boy Who Lived.epub

+

Output: The Name of the Wind: The Kingkiller Chronicle: Day One.epub

diff --git a/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.scss b/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.scss index 3c11e045c..bfd527f0b 100644 --- a/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.scss +++ b/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.scss @@ -38,7 +38,7 @@ .settings-description { color: var(--p-text-muted-color); - font-size: 0.875rem; + font-size: 0.9rem; line-height: 1.5; margin-bottom: 1rem; } @@ -75,7 +75,7 @@ .section-description { color: var(--p-text-muted-color); - font-size: 0.875rem; + font-size: 0.9rem; line-height: 1.5; margin: 0; } @@ -103,7 +103,7 @@ label { font-weight: 600; color: var(--p-text-color); - font-size: 0.875rem; + font-size: 0.9rem; } } @@ -120,7 +120,7 @@ .error-message { color: var(--p-red-500); - font-size: 0.875rem; + font-size: 0.9rem; margin-top: 0.25rem; } @@ -138,7 +138,7 @@ .preview-label { color: var(--p-text-muted-color); - font-size: 0.875rem; + font-size: 0.9rem; } .preview-value { @@ -227,7 +227,7 @@ .placeholders-description { color: var(--p-text-muted-color); - font-size: 0.875rem; + font-size: 0.9rem; line-height: 1.5; code { @@ -263,7 +263,7 @@ li { color: var(--p-text-color); - font-size: 0.875rem; + font-size: 0.9rem; margin-bottom: 0.5rem; } } @@ -280,7 +280,7 @@ .optional-blocks-info { p { color: var(--p-text-color); - font-size: 0.875rem; + font-size: 0.9rem; line-height: 1.5; margin-bottom: 1rem; } @@ -307,7 +307,7 @@ li { color: var(--p-text-color); - font-size: 0.875rem; + font-size: 0.9rem; margin-bottom: 0.25rem; } } @@ -342,7 +342,7 @@ } span { - font-size: 0.875rem; + font-size: 0.9rem; color: var(--p-text-muted-color); code { @@ -376,7 +376,7 @@ } .example-pattern { - font-size: 0.875rem; + font-size: 0.9rem; margin-bottom: 0.5rem; strong { @@ -392,7 +392,7 @@ } .example-output { - font-size: 0.875rem; + font-size: 0.9rem; margin: 0; strong { diff --git a/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.ts b/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.ts index 7c951b64f..81b2be99a 100644 --- a/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.ts +++ b/booklore-ui/src/app/features/settings/file-naming-pattern/file-naming-pattern.component.ts @@ -21,15 +21,15 @@ import {ExternalDocLinkComponent} from '../../../shared/components/external-doc- }) export class FileNamingPatternComponent implements OnInit { readonly exampleMetadata: Record = { - title: "Harry Potter and the Sorcerer's Stone", - subtitle: 'The Boy Who Lived', - authors: 'J.K. Rowling', - year: '1997', - series: 'Harry Potter', - seriesIndex: '01', - language: 'en', - publisher: 'Bloomsbury', - isbn: '9780747532699', + title: "The Name of the Wind", + subtitle: "Special Edition", + authors: "Patrick Rothfuss", + year: "2007", + series: "The Kingkiller Chronicle", + seriesIndex: "01", + language: "English", + publisher: "DAW Books", + isbn: "9780756404741", }; defaultPattern = ''; @@ -95,7 +95,7 @@ export class FileNamingPatternComponent implements OnInit { } validatePattern(pattern: string): boolean { - const validPatternRegex = /^[\w\s\-{}\/().<>.,:'"]*$/; + const validPatternRegex = /^[\w\s\-{}\[\]\/().<>.,:'"]*$/; return validPatternRegex.test(pattern); }