mirror of
https://github.com/gotson/komga.git
synced 2026-02-15 20:02:40 +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"
|
<div v-for="(f, i) in filtersOptions"
|
||||||
:key="i"
|
: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"
|
<v-list-item v-for="v in f.values"
|
||||||
:key="v"
|
:key="v"
|
||||||
@click.stop="click(i, v)"
|
@click.stop="click(i, v)"
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ export default Vue.extend({
|
||||||
] as SortOption[],
|
] as SortOption[],
|
||||||
sortActive: {} as SortActive,
|
sortActive: {} as SortActive,
|
||||||
sortDefault: { key: 'metadata.titleSort', order: 'asc' } 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[],
|
filters: [[], []] as any[],
|
||||||
sortUnwatch: null as any,
|
sortUnwatch: null as any,
|
||||||
filterUnwatch: null as any,
|
filterUnwatch: null as any,
|
||||||
|
|
@ -191,8 +191,8 @@ export default Vue.extend({
|
||||||
|
|
||||||
// restore from query param
|
// restore from query param
|
||||||
this.sortActive = this.parseQuerySortOrDefault(this.$route.query.sort)
|
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.status, SeriesStatus))
|
||||||
this.filters.splice(1, 1, parseQueryFilter(this.$route.query.readStatus, ReadStatus))
|
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.page) this.page = Number(this.$route.query.page)
|
||||||
if (this.$route.query.pageSize) this.pageSize = Number(this.$route.query.pageSize)
|
if (this.$route.query.pageSize) this.pageSize = Number(this.$route.query.pageSize)
|
||||||
|
|
||||||
|
|
@ -206,8 +206,8 @@ export default Vue.extend({
|
||||||
|
|
||||||
// reset
|
// reset
|
||||||
this.sortActive = this.parseQuerySortOrDefault(to.query.sort)
|
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.status, SeriesStatus))
|
||||||
this.filters.splice(1, 1, parseQueryFilter(to.query.readStatus, ReadStatus))
|
this.filters.splice(0, 1, parseQueryFilter(to.query.readStatus, ReadStatus))
|
||||||
this.page = 1
|
this.page = 1
|
||||||
this.totalPages = 1
|
this.totalPages = 1
|
||||||
this.totalElements = null
|
this.totalElements = null
|
||||||
|
|
@ -284,8 +284,8 @@ export default Vue.extend({
|
||||||
page: `${this.page}`,
|
page: `${this.page}`,
|
||||||
pageSize: `${this.pageSize}`,
|
pageSize: `${this.pageSize}`,
|
||||||
sort: `${this.sortActive.key},${this.sortActive.order}`,
|
sort: `${this.sortActive.key},${this.sortActive.order}`,
|
||||||
status: `${this.filters[0]}`,
|
status: `${this.filters[1]}`,
|
||||||
readStatus: `${this.filters[1]}`,
|
readStatus: `${this.filters[0]}`,
|
||||||
},
|
},
|
||||||
}).catch(_ => {
|
}).catch(_ => {
|
||||||
})
|
})
|
||||||
|
|
@ -304,7 +304,7 @@ export default Vue.extend({
|
||||||
if (libraryId !== 0) {
|
if (libraryId !== 0) {
|
||||||
requestLibraryId = libraryId
|
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.totalPages = seriesPage.totalPages
|
||||||
this.totalElements = seriesPage.totalElements
|
this.totalElements = seriesPage.totalElements
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ export default Vue.extend({
|
||||||
}] as SortOption[],
|
}] as SortOption[],
|
||||||
sortActive: {} as SortActive,
|
sortActive: {} as SortActive,
|
||||||
sortDefault: { key: 'metadata.numberSort', order: 'asc' } as SortActive,
|
sortDefault: { key: 'metadata.numberSort', order: 'asc' } as SortActive,
|
||||||
filterOptions: [{ name: 'READ STATUS', values: ReadStatus }],
|
filterOptions: [{ values: [ReadStatus.UNREAD] }],
|
||||||
filters: [[]] as any[],
|
filters: [[]] as any[],
|
||||||
dialogEdit: false,
|
dialogEdit: false,
|
||||||
sortUnwatch: null as any,
|
sortUnwatch: null as any,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue