gitoriaLog in with ident

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit6bb2daf16bb2daf1tracker#13: homepage (tiles, intro, latest movies/shows), /shows, /movies/page/N, /my/movies; lists cached in memorymre6bb2daf1/components/mymovies.hl

1.9 KB

  1. // components/mymovies.hl — `/my/movies` (tracker.worldapi.org#13): every MOVIE the signed-in user follows, the one
  2. // followed last on top — the architect: "/my/movies = the movies you follow, like /my/shows". A row: the small poster, the
  3. // title with its year linking to the movie's page (`/shows/<slug>`: movies share the show page and its Follow button).
  4. // Read-only like /my/shows, the same row look (the my-show-row tags/classes in styles.hl). Reused: `followsOfUser`,
  5. // `insertByFollowDesc` (follows.hl), `showById`, `posterUrlOf`, `titleWithYear` (shows.hl).
  6. parent './main.hl'
  7. import { appTitle } from '../project.hl'
  8. import { userIdOfSession } from '../users.hl'
  9. import { followsOfUser, insertByFollowDesc } from '../follows.hl'
  10. import { showById, posterUrlOf, titleWithYear } from '../shows.hl'
  11. // static: an mpackdb-backed helper must be `static` (hybriel#115/#116)
  12. static myMoviesRowsOf = (userId) => {
  13. if (userId == null) { return [] }
  14. let out = []
  15. for (f of followsOfUser(userId)) {
  16. let show = showById(f.show)
  17. if (show != null && show.type == 'movie') {
  18. out = insertByFollowDesc(out, {
  19. id = show.id title = titleWithYear(show) href = '/shows/' + show.urlSegment
  20. posterUrl = posterUrlOf(show) followedAt = f.at != null ? f.at : 0
  21. })
  22. }
  23. }
  24. return out
  25. }
  26. session = null
  27. userId = userIdOfSession(session)
  28. signedIn = userId != null
  29. // a plain copy of userId for `rows` (mission 047: session sync, see components/show.hl `me`)
  30. me = userId
  31. rows = signedIn ? myMoviesRowsOf(me) : []
  32. hasRows = rows.length > 0
  33. noRows = !hasRows
  34. emptyText = signedIn ? 'You follow no movies yet.' : 'Sign in to see the movies you follow.'
  35. __title = 'My movies — ' + appTitle
  36. View {
  37. myMoviesPage {
  38. h1 { "My movies" }
  39. if (noRows) { p { class = "muted" emptyText } }
  40. if (hasRows) {
  41. myShowsRows {
  42. for (row of rows) {
  43. myShowRow {
  44. img { class = "myshow-poster" src = row.posterUrl alt = row.title }
  45. a { class = "myshow-title" href = row.href row.title }
  46. }
  47. }
  48. }
  49. }
  50. }
  51. }

Branches

Latest commits

  • 6bb2daf1tracker#13: homepage (tiles, intro, latest movies/shows), /shows, /movies/page/N, /my/movies; lists cached in memorymre
  • 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