gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit8d3b0f208d3b0f20widget: the franchise link's 44 px tap area no longer overlaps the Prequel/Sequel rowmre8d3b0f20/components/mymovies.hl

3.0 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 (`/movies/<slug>`, tracker#21: the one title 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), `cardOf`, `posterUrlOfName` (shows.hl). tracker#30 (mission 025): the slim cached card per
  6. // movie and the user's cached watched set, no whole record (cast + crew) per load.
  7. // mission 058 (tracker#24): a movie watched on its page (watch `movie:<id>`, watches.hl) shows the solid check in its row,
  8. // and the count line says how many of them are watched ("3 movies · 1 watched"). The user's watched set (watchedSetOf, kept).
  9. parent './main.hl'
  10. import { appTitle } from '../project.hl'
  11. import { userIdOfSession } from '../lib/users.hl'
  12. import { followsOfUser, insertByFollowDesc } from '../lib/follows.hl'
  13. import { cardOf, posterUrlOfName } from '../lib/shows.hl'
  14. import { watchedSetOf } from '../lib/watches.hl'
  15. // static: an mpackdb-backed helper must be `static` (hybriel#115/#116)
  16. static watchedCountOf = (&rows) => {
  17. let n = 0
  18. for (r of rows) { if (r.watched) { n = n + 1 } }
  19. return n
  20. }
  21. static myMoviesRowsOf = (&userId) => {
  22. if (userId == null) { return [] }
  23. watched = watchedSetOf(userId)
  24. let out = []
  25. for (f of followsOfUser(userId)) {
  26. let c = cardOf(f.show)
  27. if (c != null && c.type == 'movie') {
  28. out = insertByFollowDesc(out, {
  29. id = c.id title = c.titleYear href = c.href
  30. posterUrl = posterUrlOfName(c.posterName) followedAt = f.at != null ? f.at : 0
  31. watched = watched['movie:' + c.id] == true
  32. })
  33. }
  34. }
  35. return out
  36. }
  37. session = null
  38. userId = userIdOfSession(session)
  39. signedIn = userId != null
  40. // a plain copy of userId for `rows` (mission 047: session sync, see components/show.hl `me`)
  41. me = userId
  42. rows = signedIn ? myMoviesRowsOf(me) : []
  43. hasRows = rows.length > 0
  44. noRows = !hasRows
  45. countText = rows.length + (rows.length == 1 ? ' movie' : ' movies') + ' · ' + watchedCountOf(rows) + ' watched'
  46. emptyText = signedIn ? 'You follow no movies yet.' : 'Sign in to see the movies you follow.'
  47. __title = 'My movies — ' + appTitle
  48. View {
  49. myMoviesPage {
  50. h1 { "My movies" }
  51. if (noRows) { p { class = "muted" emptyText } }
  52. if (hasRows) {
  53. p { class = "muted list-count" id = "mymovies-count" countText }
  54. myShowsRows {
  55. for (row of rows) {
  56. myShowRow {
  57. img { class = "myshow-poster" src = row.posterUrl alt = row.title }
  58. a { class = "myshow-title" href = row.href row.title }
  59. if (row.watched) {
  60. myMovieWatched { class = "checkicon solid" title = "Watched"
  61. svg { viewBox = "0 0 24 24" width = "22" height = "22" "aria-hidden" = "true"
  62. circle { cx = "12" cy = "12" r = "10" }
  63. path { d = "M7 12.5 L10.5 16 L17 8.5" }
  64. }
  65. }
  66. }
  67. }
  68. }
  69. }
  70. }
  71. }
  72. }

Branches

Latest commits

  • 8d3b0f20widget: the franchise link's 44 px tap area no longer overlaps the Prequel/Sequel rowmre
  • 1d98dcfdbrowser gate: the badges' size check reads the padding box (the 44 px tap area is transparent border)mre
  • 2f9e29ffreports/MK-mobile.md, deploy.sh GATES: tests/mobile.mjs, theme check markermre
  • 7cfc8ab5a season of more than 150 episodes starts closed on its title page; the phone gate checks itmre
  • 59095c59tests/mobile.mjs: the phone gate (390 px touch, tap targets, /franchises paging)mre
  • 105309detap targets: every row link, the TMDB/IMDb badges, the widget links, the franchise names and the login-failed link are 44 px high on a phonemre
  • f0b86c8efranchises: 40 loose timelines per page (/franchises/page/N) and a merge sort for the names (1,546 timelines: 20 s and 54,000 px before)mre
  • b9e841a7Merge branch 'sy-sync'mre
  • d1ae2701sync components.hybriel 4922f9c: modal and pagination 44 px targets (vendored copies, verbatim) (SY)mre
  • 043624b2theme: sync from layouts 4994037 (list rows stack, td word-keep, heading code, edited tap target)mre
  • 05d89fd0deploy: security gate (tests/security.mjs)mre
  • 2ae8a47bMerge branch 'sk-sec'mre
  • 8fee5d52sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
  • 944ad51eSK: report reports/SK-sec.md, LOGsk
  • 415487c1SK: import budget per user + id type check, gate checkssk
  • 7b8a4f74security audit SK: nosniff + image sandbox headers, face id checks, adult follow, login budget + new session at login, guest-link budget, tests/security.mjssk
  • f0f26c5areports: T18 section (gates, boot-gate, 3x3 table, search + short-id compare)mre
  • 2a8682a1deploy.sh GATES: tests/warmstart.mjsmre
  • 3761338breports/T17-boot.md: handoff (phase table, fix, numbers so far, open proof)mre
  • 52e09eb2boot: sync window 1000 ms (the gates ask for a complete start), README boot-time sectionmre