From 2cbb0c80a210fd516b10f32e12b9466053e9881c Mon Sep 17 00:00:00 2001 From: chiguirepower <131210156+chiguirepower@users.noreply.github.com> Date: Mon, 2 Feb 2026 11:25:57 -0600 Subject: [PATCH] Add sort by filePath (#1180 and #2364) (#2512) Co-authored-by: Eduardo --- .../features/book/components/book-browser/sorting/BookSorter.ts | 1 + booklore-ui/src/app/features/book/service/sort.service.ts | 1 + .../dashboard-settings/dashboard-settings.component.ts | 1 + .../view-preferences/view-preferences.component.ts | 1 + 4 files changed, 4 insertions(+) diff --git a/booklore-ui/src/app/features/book/components/book-browser/sorting/BookSorter.ts b/booklore-ui/src/app/features/book/components/book-browser/sorting/BookSorter.ts index a64400e29..3db2a01f2 100644 --- a/booklore-ui/src/app/features/book/components/book-browser/sorting/BookSorter.ts +++ b/booklore-ui/src/app/features/book/components/book-browser/sorting/BookSorter.ts @@ -7,6 +7,7 @@ export class BookSorter { {label: 'Title', field: 'title', direction: SortDirection.ASCENDING}, {label: 'Title + Series', field: 'titleSeries', direction: SortDirection.ASCENDING}, {label: 'File Name', field: 'fileName', direction: SortDirection.ASCENDING}, + {label: 'File Path', field: 'filePath', direction: SortDirection.ASCENDING}, {label: 'Author', field: 'author', direction: SortDirection.ASCENDING}, {label: 'Author (Surname)', field: 'authorSurnameVorname', direction: SortDirection.ASCENDING}, {label: 'Author + Series', field: 'authorSeries', direction: SortDirection.ASCENDING}, diff --git a/booklore-ui/src/app/features/book/service/sort.service.ts b/booklore-ui/src/app/features/book/service/sort.service.ts index 0bd2a66f0..cda06130e 100644 --- a/booklore-ui/src/app/features/book/service/sort.service.ts +++ b/booklore-ui/src/app/features/book/service/sort.service.ts @@ -103,6 +103,7 @@ export class SortService { addedOn: (book) => book.addedOn ? new Date(book.addedOn).getTime() : null, fileSizeKb: (book) => book.fileSizeKb || null, fileName: (book) => book.fileName, + filePath: (book) => book.filePath, random: (book) => Math.random(), }; diff --git a/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.ts b/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.ts index d5adb1702..d6212641b 100644 --- a/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.ts +++ b/booklore-ui/src/app/features/dashboard/components/dashboard-settings/dashboard-settings.component.ts @@ -57,6 +57,7 @@ export class DashboardSettingsComponent implements OnInit { {label: 'Title', value: 'title'}, {label: 'Title + Series', value: 'titleSeries'}, {label: 'File Name', value: 'fileName'}, + {label: 'File Path', value: 'filePath'}, {label: 'Date Added', value: 'addedOn'}, {label: 'Author', value: 'author'}, {label: 'Author (Surname)', value: 'authorSurnameVorname'}, diff --git a/booklore-ui/src/app/features/settings/view-preferences-parent/view-preferences/view-preferences.component.ts b/booklore-ui/src/app/features/settings/view-preferences-parent/view-preferences/view-preferences.component.ts index 7dee71bf4..47d5f1d43 100644 --- a/booklore-ui/src/app/features/settings/view-preferences-parent/view-preferences/view-preferences.component.ts +++ b/booklore-ui/src/app/features/settings/view-preferences-parent/view-preferences/view-preferences.component.ts @@ -35,6 +35,7 @@ export class ViewPreferencesComponent implements OnInit, OnDestroy { {label: 'Title', field: 'title'}, {label: 'Title + Series', field: 'titleSeries'}, {label: 'File Name', field: 'fileName'}, + {label: 'File Path', field: 'filePath'}, {label: 'Author', field: 'author'}, {label: 'Author (Surname)', field: 'authorSurnameVorname'}, {label: 'Author + Series', field: 'authorSeries'},