mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 06:15:39 -04:00
Fix episode progress display in seasons: show mark-all for all users, simplify progress indicators
Remove the `userStatus` guard on the "Mark All" button so unauthenticated or unwatchlisted users can also access it. Drop the mobile percentage label (redundant with the watch count) and make the watched/total count always visible instead of hidden on small screens.
This commit is contained in:
@@ -68,7 +68,7 @@ export function TitleSeasons({
|
|||||||
<IconDeviceTvOld aria-hidden={true} className="size-5 text-primary" />
|
<IconDeviceTvOld aria-hidden={true} className="size-5 text-primary" />
|
||||||
<h2 className="font-display text-2xl tracking-tight">Episodes</h2>
|
<h2 className="font-display text-2xl tracking-tight">Episodes</h2>
|
||||||
</div>
|
</div>
|
||||||
{userStatus && userStatus !== "completed" && (
|
{userStatus !== "completed" && (
|
||||||
<AlertDialog open={markAllOpen} onOpenChange={setMarkAllOpen}>
|
<AlertDialog open={markAllOpen} onOpenChange={setMarkAllOpen}>
|
||||||
<AlertDialogTrigger
|
<AlertDialogTrigger
|
||||||
render={
|
render={
|
||||||
@@ -144,14 +144,9 @@ export function TitleSeasons({
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
{totalCount > 0 && (
|
{totalCount > 0 && (
|
||||||
<>
|
<div className="hidden w-24 sm:block sm:group-hover/season:hidden">
|
||||||
<span className="text-xs tabular-nums text-muted-foreground sm:hidden">
|
<Progress value={progressPercent} />
|
||||||
{Math.round(progressPercent)}%
|
</div>
|
||||||
</span>
|
|
||||||
<div className="hidden w-24 sm:block sm:group-hover/season:hidden">
|
|
||||||
<Progress value={progressPercent} />
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
{totalCount > 0 && watchedCount < totalCount && (
|
{totalCount > 0 && watchedCount < totalCount && (
|
||||||
<Button
|
<Button
|
||||||
@@ -180,7 +175,7 @@ export function TitleSeasons({
|
|||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{totalCount > 0 && (
|
{totalCount > 0 && (
|
||||||
<span className="hidden font-mono text-xs tabular-nums text-muted-foreground sm:inline">
|
<span className="font-mono text-xs tabular-nums text-muted-foreground">
|
||||||
{watchedCount}/{totalCount}
|
{watchedCount}/{totalCount}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user