tracker
All repositories: gitoria
1.9 KB
// components/mymovies.hl — `/my/movies` (tracker.worldapi.org#13): every MOVIE the signed-in user follows, the one// followed last on top — the architect: "/my/movies = the movies you follow, like /my/shows". A row: the small poster, the// title with its year linking to the movie's page (`/shows/<slug>`: movies share the show page and its Follow button).// Read-only like /my/shows, the same row look (the my-show-row tags/classes in styles.hl). Reused: `followsOfUser`,// `insertByFollowDesc` (follows.hl), `showById`, `posterUrlOf`, `titleWithYear` (shows.hl).parent './main.hl'import { appTitle } from '../project.hl'import { userIdOfSession } from '../users.hl'import { followsOfUser, insertByFollowDesc } from '../follows.hl'import { showById, posterUrlOf, titleWithYear } from '../shows.hl'// static: an mpackdb-backed helper must be `static` (hybriel#115/#116)static myMoviesRowsOf = (userId) => {if (userId == null) { return [] }let out = []for (f of followsOfUser(userId)) {let show = showById(f.show)if (show != null && show.type == 'movie') {out = insertByFollowDesc(out, {id = show.id title = titleWithYear(show) href = '/shows/' + show.urlSegmentposterUrl = posterUrlOf(show) followedAt = f.at != null ? f.at : 0})}}return out}session = nulluserId = userIdOfSession(session)signedIn = userId != null// a plain copy of userId for `rows` (mission 047: session sync, see components/show.hl `me`)me = userIdrows = signedIn ? myMoviesRowsOf(me) : []hasRows = rows.length > 0noRows = !hasRowsemptyText = signedIn ? 'You follow no movies yet.' : 'Sign in to see the movies you follow.'__title = 'My movies — ' + appTitleView {myMoviesPage {h1 { "My movies" }if (noRows) { p { class = "muted" emptyText } }if (hasRows) {myShowsRows {for (row of rows) {myShowRow {img { class = "myshow-poster" src = row.posterUrl alt = row.title }a { class = "myshow-title" href = row.href row.title }}}}}}}
Branches
- mainmain branch
Latest commits
- 03edc783Merge branch 't15-tvmaze'mre
- 71b46345tracker#15: numbering check by date or title, placeholder titles in other languages, docs + real-data proofmre
- 6bb2daf1tracker#13: homepage (tiles, intro, latest movies/shows), /shows, /movies/page/N, /my/movies; lists cached in memorymre
- 34f2c15btracker#15: TVmaze merge in the sync (gaps only: new episodes/seasons, empty titles/air dates; numbering check), fake TVmaze episodes + gatemre
- cbdc4ea7tracker#12: link icons TMDB/IMDb/TVDB/TVmaze; sync fills missing ids (TVmaze lookup); movies fetched via /movie/mre
- b105bcd8tracker#11: Hybriel master ff51cf46 (checks no longer vanish), mobile-first styles, carets, follow button, sign-in modal, inverted check, orange castmre
- 31b758aatracker#10: installable app (manifest, service worker, offline shell), own icon + faviconmre
- 2fa9d997tracker#9: TMDB sync (followed shows: seasons, episodes, posters), tools/sync-tmdb.hl + daily run 04:00 UTC, fake TMDB in gatemre
- 49e1f61edeploy.sh: back up live storage/.sessions/.env before every deploy (newest 5 kept)mre
- 54070a4etracker#8: /my/unwatched + /my/schedule (301 from old), S01E01, title (year), 1 episode, watched-set lookup (unwatched 15s -> 1s)mre
- 3251488atracker#7: /my/shows (followed shows, newest follow first, poster, title, last watched SxxEyy); gate can take screenshots (TRACKER_GATE_SHOTS)mre
- 44b7d9f9tracker#6: /schedule — upcoming episodes of followed shows, soonest firstmre
- 91c9fc8ctracker#5: /unwatched — unwatched released episodes of followed shows, newest firstmre
- a97c0295tracker#4: show page /shows/:slug (header, seasons, episodes, watch checks) + tools/relink-episode-seasons.hlmre
- 05f407c5tracker: no border on any button except inverted ones (Log out, ident status and identities too); header brand weight 100mre
- 17375427tracker#2: tools/migrate.hl + tools/verify.hl — old MongoDB data into mpackdb with new idsmre
- 31aac936tracker#3: no border on the header and on filled buttons; inverted buttons keep theirsmre
- 2ad9d29ctracker#1: login exactly like calendar (identity selector in the header, empty homepage)mre
- 3691e176tracker#1: empty tracker with the ident login (state of 2026-09-27)mre