mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-18 17:02:15 +00:00
fix: skippable progress
fix: dont show dropped on schedule
This commit is contained in:
parent
78d6037272
commit
124e97f0a7
3 changed files with 6 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ui",
|
||||
"version": "6.1.6",
|
||||
"version": "6.1.7",
|
||||
"license": "BUSL-1.1",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@9.14.4",
|
||||
|
|
|
|||
|
|
@ -48,8 +48,9 @@
|
|||
interface DayAirTimes { day: { date: Date, number: number }, episodes: Array<ResultOf<typeof ScheduleMedia> & { episode: number, airTime: Date }> }
|
||||
|
||||
function aggregate (data: ResultOf<typeof Schedule>, dayList: Array<{ date: Date, number: number }>) {
|
||||
// join media from all queries into single list
|
||||
const mediaList = [...data.curr1?.media ?? [], ...data.curr2?.media ?? [], ...data.curr3?.media ?? [], ...data.residue?.media ?? [], ...data.next1?.media ?? [], ...data.next2?.media ?? []].filter((v, i, a) => v != null && a.findIndex(s => s?.id === v.id) === i) as Array<ResultOf<typeof ScheduleMedia>>
|
||||
// join media from all queries into single list, de-duplicate it, and make sure it's not dropped
|
||||
const mediaList = [...data.curr1?.media ?? [], ...data.curr2?.media ?? [], ...data.curr3?.media ?? [], ...data.residue?.media ?? [], ...data.next1?.media ?? [], ...data.next2?.media ?? []]
|
||||
.filter((v, i, a) => v != null && a.findIndex(s => s?.id === v.id) === i && v.mediaListEntry?.status !== 'DROPPED') as Array<ResultOf<typeof ScheduleMedia>>
|
||||
|
||||
const dayMap: Record<string, DayAirTimes | undefined> = Object.fromEntries(dayList.map(day => [+day.date, { day, episodes: [] }]))
|
||||
|
||||
|
|
|
|||
|
|
@ -20,13 +20,13 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class='w-20 flex flex-col items-center z-10 shrink-0 {step > 0 ? 'text-white' : 'text-muted-foreground'}'>
|
||||
<Badge variant={step > 0 ? 'default' : 'secondary'} class='w-12 h-12 rounded-[50%] flex justify-center {step > 0 ? 'text-black' : 'text-muted-foreground'}' href='../network/'><Network /></Badge>
|
||||
<Badge variant={step > 0 ? 'default' : 'secondary'} class='w-12 h-12 rounded-[50%] flex justify-center {step > 0 ? 'text-black' : 'text-muted-foreground'}' href={step > 1 ? '../network/' : undefined}><Network /></Badge>
|
||||
<div class='mt-3 font-bold'>
|
||||
Network
|
||||
</div>
|
||||
</div>
|
||||
<div class='w-20 flex flex-col items-center z-10 shrink-0 {step > 1 ? 'text-white' : 'text-muted-foreground'}'>
|
||||
<Badge variant={step > 1 ? 'default' : 'secondary'} class='w-12 h-12 rounded-[50%] flex justify-center {step > 1 ? 'text-black' : 'text-muted-foreground'}' href='../extensions/'><Puzzle /></Badge>
|
||||
<Badge variant={step > 1 ? 'default' : 'secondary'} class='w-12 h-12 rounded-[50%] flex justify-center {step > 1 ? 'text-black' : 'text-muted-foreground'}'><Puzzle /></Badge>
|
||||
<div class='mt-3 font-bold'>
|
||||
Extensions
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue