refactor: Remove series-related fields and components to streamline novel management
Build and Push Reader Image / docker (push) Successful in 41s

- Eliminated seriesId and related fields from various models and components to simplify the data structure.
- Updated UI components to reflect the removal of series dependencies, enhancing clarity and maintainability.
- Adjusted API calls and data handling to ensure compatibility with the new structure.
This commit is contained in:
2026-05-12 14:37:37 +07:00
parent 09734cdadd
commit 3036854cf2
14 changed files with 48 additions and 687 deletions
-20
View File
@@ -18,7 +18,6 @@ type BrowseNovel = {
views: number
totalChapters: number
status: string
seriesId?: string | null
}
type BrowseResponse = {
@@ -34,24 +33,6 @@ type GenreItem = {
slug: string
}
function collapseSeriesRows<T extends { id: string; seriesId?: string | null }>(rows: T[]): T[] {
const pickedSeries = new Set<string>()
const output: T[] = []
for (const row of rows) {
if (!row.seriesId) {
output.push(row)
continue
}
if (pickedSeries.has(row.seriesId)) continue
pickedSeries.add(row.seriesId)
output.push(row)
}
return output
}
function buildBrowsePath(params: Record<string, string>) {
const search = new URLSearchParams(params)
return `/api/novels/browse?${search.toString()}`
@@ -100,7 +81,6 @@ export default async function SearchPage({
status: statusFilter === "all" ? "" : statusFilter,
page: String(requestedPage),
limit: String(PAGE_SIZE),
collapse_series: "true",
})
)