From 6ba5cd483218644bdc09e9cdfe573f22c1389963 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Wed, 24 Feb 2021 10:01:12 +0800 Subject: [PATCH] feat: sort series by folder name --- komga-webui/src/locales/en.json | 1 + komga-webui/src/views/BrowseLibraries.vue | 1 + .../org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/komga-webui/src/locales/en.json b/komga-webui/src/locales/en.json index 315e676f4..d72582878 100644 --- a/komga-webui/src/locales/en.json +++ b/komga-webui/src/locales/en.json @@ -443,6 +443,7 @@ "date_added": "Date added", "date_updated": "Date updated", "file_size": "File size", + "folder_name": "Folder name", "name": "Name", "number": "Number", "release_date": "Release date" diff --git a/komga-webui/src/views/BrowseLibraries.vue b/komga-webui/src/views/BrowseLibraries.vue index a46098f6a..0b0bd64df 100644 --- a/komga-webui/src/views/BrowseLibraries.vue +++ b/komga-webui/src/views/BrowseLibraries.vue @@ -228,6 +228,7 @@ export default Vue.extend({ {name: this.$t('sort.name').toString(), key: 'metadata.titleSort'}, {name: this.$t('sort.date_added').toString(), key: 'createdDate'}, {name: this.$t('sort.date_updated').toString(), key: 'lastModifiedDate'}, + {name: this.$t('sort.folder_name').toString(), key: 'name'}, ] as SortOption[] }, filterOptionsList(): FiltersOptions { diff --git a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt index 48bd65f20..9b6e046e4 100644 --- a/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt +++ b/komga/src/main/kotlin/org/gotson/komga/infrastructure/jooq/SeriesDtoDao.kt @@ -68,7 +68,8 @@ class SeriesDtoDao( "created" to s.CREATED_DATE, "lastModifiedDate" to s.LAST_MODIFIED_DATE, "lastModified" to s.LAST_MODIFIED_DATE, - "collection.number" to cs.NUMBER + "collection.number" to cs.NUMBER, + "name" to s.NAME ) override fun findAll(search: SeriesSearchWithReadProgress, userId: String, pageable: Pageable): Page {