Add offline indicator, surprise me button, and continue watching on channel

- Offline banner in nav when backend is unreachable (network error, not 4xx)
- GET /channels/{id}/random — picks random unwatched video, navigates to watch
- GET /channels/{id}/in-progress — videos with >30s progress, not yet watched
- Channel page: 'Surprise me' button (desktop + mobile) navigates to random video
- Channel page: 'Continue watching' row above video list when in-progress videos exist

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-26 23:46:58 +02:00
parent e02ea12494
commit 3652038cf5
4 changed files with 120 additions and 2 deletions

View File

@@ -65,6 +65,9 @@ export const addChannelToGroup = (groupId, channelId) => api.post(`/channels/gro
export const removeChannelFromGroup = (groupId, channelId) => api.delete(`/channels/groups/${groupId}/channels/${channelId}`);
export const bulkChannelAction = (channel_ids, action) => api.post("/channels/bulk-action", { channel_ids, action });
export const getActiveTasks = () => api.get("/channels/tasks");
export const getRandomChannelVideo = (id, unwatchedOnly = true) =>
api.get(`/channels/${id}/random`, { params: { unwatched_only: unwatchedOnly } });
export const getChannelInProgress = (id) => api.get(`/channels/${id}/in-progress`);
// Videos
export const homeFeed = (page = 0, limit = 25, mode = "ranked", duration = "") =>