mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-04-09 16:19:25 -07:00
feat(stats): roll up same-episode sessions within a day
Group sessions for the same video inside each day header so repeated viewings of an episode collapse into a single expandable bucket with aggregate active time and card counts. Multi-session buckets get a dedicated delete action that wipes every session in the group via the bulk delete endpoint; singleton buckets continue to render the existing SessionRow flow unchanged. Delete confirmation copy lives in delete-confirm for parity with the other bulk-delete flows, and the bucket delete path is extracted into a pure buildBucketDeleteHandler factory so it can be unit-tested without rendering the tab. MediaSessionList is intentionally untouched -- it is already scoped to a single video and doesn't need rollup.
This commit is contained in:
@@ -17,3 +17,9 @@ export function confirmAnimeGroupDelete(title: string, count: number): boolean {
|
||||
export function confirmEpisodeDelete(title: string): boolean {
|
||||
return globalThis.confirm(`Delete "${title}" and all its sessions?`);
|
||||
}
|
||||
|
||||
export function confirmBucketDelete(title: string, count: number): boolean {
|
||||
return globalThis.confirm(
|
||||
`Delete all ${count} session${count === 1 ? '' : 's'} of "${title}" from this day?`,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user