feat(header): clarify video counts and hide idle pause button
Show 'N yours / M total' in the header (your subscriptions vs. the whole shared catalog) with a tooltip, backed by a new total_videos field on /sync/my-status. The admin pause button now only appears when there's sync work to pause; Resume still shows whenever sync is paused.
This commit is contained in:
parent
a16e613fe9
commit
b4109909db
3 changed files with 18 additions and 3 deletions
|
|
@ -34,8 +34,16 @@ export default function SyncStatus({
|
|||
|
||||
return (
|
||||
<div className="hidden lg:flex items-center gap-2 text-xs text-muted">
|
||||
<Database className="w-3.5 h-3.5" />
|
||||
<span>{formatViews(data.my_videos)} videos</span>
|
||||
<Tooltip hint="Videos from your subscriptions, against the total in the shared catalog that every user's subscriptions have pulled in.">
|
||||
<span className="flex items-center gap-1.5 cursor-default">
|
||||
<Database className="w-3.5 h-3.5" />
|
||||
<span>
|
||||
<span className="text-fg font-medium">{formatViews(data.my_videos)}</span> yours
|
||||
</span>
|
||||
<span className="opacity-40">/</span>
|
||||
<span>{formatViews(data.total_videos)} total</span>
|
||||
</span>
|
||||
</Tooltip>
|
||||
<span className="opacity-40">·</span>
|
||||
{data.paused ? (
|
||||
<span className="text-accent font-medium">paused</span>
|
||||
|
|
@ -61,7 +69,9 @@ export default function SyncStatus({
|
|||
</Tooltip>
|
||||
</>
|
||||
)}
|
||||
{isAdmin && (
|
||||
{/* Pause only makes sense when there's work to pause; Resume must always show
|
||||
while paused so it can be lifted. Hidden entirely when idle and not paused. */}
|
||||
{isAdmin && (data.paused || syncing > 0) && (
|
||||
<button
|
||||
onClick={() => toggle.mutate()}
|
||||
disabled={toggle.isPending}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue