mirror of
https://github.com/gotson/komga.git
synced 2025-12-22 00:13:30 +01:00
fix(webui): simplify unread filter
only offer UNREAD option, the other 2 are confusing and not really relevant
This commit is contained in:
parent
8ba07142f3
commit
bb60f10d49
3 changed files with 10 additions and 10 deletions
|
|
@ -11,7 +11,7 @@
|
|||
<div v-for="(f, i) in filtersOptions"
|
||||
:key="i"
|
||||
>
|
||||
<v-subheader>{{ f.name }}</v-subheader>
|
||||
<v-subheader v-if="f.name">{{ f.name }}</v-subheader>
|
||||
<v-list-item v-for="v in f.values"
|
||||
:key="v"
|
||||
@click.stop="click(i, v)"
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ export default Vue.extend({
|
|||
] as SortOption[],
|
||||
sortActive: {} as SortActive,
|
||||
sortDefault: { key: 'metadata.titleSort', order: 'asc' } as SortActive,
|
||||
filterOptions: [{ name: 'STATUS', values: SeriesStatus }, { name: 'READ STATUS', values: ReadStatus }],
|
||||
filterOptions: [{ values: [ReadStatus.UNREAD] }, { name: 'STATUS', values: SeriesStatus }],
|
||||
filters: [[], []] as any[],
|
||||
sortUnwatch: null as any,
|
||||
filterUnwatch: null as any,
|
||||
|
|
@ -191,8 +191,8 @@ export default Vue.extend({
|
|||
|
||||
// restore from query param
|
||||
this.sortActive = this.parseQuerySortOrDefault(this.$route.query.sort)
|
||||
this.filters.splice(0, 1, parseQueryFilter(this.$route.query.status, SeriesStatus))
|
||||
this.filters.splice(1, 1, parseQueryFilter(this.$route.query.readStatus, ReadStatus))
|
||||
this.filters.splice(1, 1, parseQueryFilter(this.$route.query.status, SeriesStatus))
|
||||
this.filters.splice(0, 1, parseQueryFilter(this.$route.query.readStatus, ReadStatus))
|
||||
if (this.$route.query.page) this.page = Number(this.$route.query.page)
|
||||
if (this.$route.query.pageSize) this.pageSize = Number(this.$route.query.pageSize)
|
||||
|
||||
|
|
@ -206,8 +206,8 @@ export default Vue.extend({
|
|||
|
||||
// reset
|
||||
this.sortActive = this.parseQuerySortOrDefault(to.query.sort)
|
||||
this.filters.splice(0, 1, parseQueryFilter(to.query.status, SeriesStatus))
|
||||
this.filters.splice(1, 1, parseQueryFilter(to.query.readStatus, ReadStatus))
|
||||
this.filters.splice(1, 1, parseQueryFilter(to.query.status, SeriesStatus))
|
||||
this.filters.splice(0, 1, parseQueryFilter(to.query.readStatus, ReadStatus))
|
||||
this.page = 1
|
||||
this.totalPages = 1
|
||||
this.totalElements = null
|
||||
|
|
@ -284,8 +284,8 @@ export default Vue.extend({
|
|||
page: `${this.page}`,
|
||||
pageSize: `${this.pageSize}`,
|
||||
sort: `${this.sortActive.key},${this.sortActive.order}`,
|
||||
status: `${this.filters[0]}`,
|
||||
readStatus: `${this.filters[1]}`,
|
||||
status: `${this.filters[1]}`,
|
||||
readStatus: `${this.filters[0]}`,
|
||||
},
|
||||
}).catch(_ => {
|
||||
})
|
||||
|
|
@ -304,7 +304,7 @@ export default Vue.extend({
|
|||
if (libraryId !== 0) {
|
||||
requestLibraryId = libraryId
|
||||
}
|
||||
const seriesPage = await this.$komgaSeries.getSeries(requestLibraryId, pageRequest, undefined, this.filters[0], this.filters[1])
|
||||
const seriesPage = await this.$komgaSeries.getSeries(requestLibraryId, pageRequest, undefined, this.filters[1], this.filters[0])
|
||||
|
||||
this.totalPages = seriesPage.totalPages
|
||||
this.totalElements = seriesPage.totalElements
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ export default Vue.extend({
|
|||
}] as SortOption[],
|
||||
sortActive: {} as SortActive,
|
||||
sortDefault: { key: 'metadata.numberSort', order: 'asc' } as SortActive,
|
||||
filterOptions: [{ name: 'READ STATUS', values: ReadStatus }],
|
||||
filterOptions: [{ values: [ReadStatus.UNREAD] }],
|
||||
filters: [[]] as any[],
|
||||
dialogEdit: false,
|
||||
sortUnwatch: null as any,
|
||||
|
|
|
|||
Loading…
Reference in a new issue