tracker
All repositories: gitoria
2.5 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 (`/movies/<slug>`, tracker#21: the one title 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), `cardOf`, `posterUrlOfName` (shows.hl). tracker#30 (mission 025): the slim cached card per// movie and the user's cached watched set, no whole record (cast + crew) per load.// mission 058 (tracker#24): a movie watched on its page (watch `movie:<id>`, watches.hl) shows the solid check in its row,// and the count line says how many of them are watched ("3 movies · 1 watched"). The user's watched set (watchedSetOf, kept).parent './main.hl'import { appTitle } from '../lib/app.hl'import { userIdOfSession } from '../lib/users.hl'import { myMoviesRowsOf } from '../lib/follows.hl'import { watchedCountOf } from '../lib/watches.hl'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 = !hasRowscountText = rows.length + (rows.length == 1 ? ' movie' : ' movies') + ' · ' + watchedCountOf(&rows) + ' watched'emptyText = signedIn ? 'You follow no movies yet.' : 'Sign in to see the movies you follow.'__title = 'My movies — ' + appTitle// Component styles use the shared theme variables.Style {myMovieWatched {flex = 'none'display = 'grid'placeItems = 'center'width = '2rem'height = '2rem'}myMoviesPage {display = 'block'}}View {myMoviesPage {h1 { "My movies" }if (noRows) { p { class = "muted" emptyText } }if (hasRows) {p { class = "muted list-count" id = "mymovies-count" countText }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 }if (row.watched) {myMovieWatched { class = "checkicon solid" title = "Watched"svg { viewBox = "0 0 24 24" width = "22" height = "22" "aria-hidden" = "true"circle { cx = "12" cy = "12" r = "10" }path { d = "M7 12.5 L10.5 16 L17 8.5" }}}}}}}}}}
Branches
Latest commits
- c21aff6bMerge branch 'records-hm55c' into mainTracker
- 9ba258d3|||PR records: HM55b resultTracker
- 64f2d300Merge branch 'records-hm55b2' into mainTracker
- ae3b80dc|||PR records: HM55b briefTracker
- 7ef3cb3bMerge branch 'records-st55' into mainTracker
- fec2e080|||PR records: STATUS HM55Tracker
- 8e174918Merge branch 'records-hm55b' into mainTracker
- b1ecee57|||PR records: HM55 stateTracker
- 28eab08cMerge branch 'records-hm55' into mainTracker
- d3edaa05|||PR records: HM55 start, PROCEDURES.mdTracker
- 3059f86cMerge branch 'records-design-rule' into mainTracker
- 421a4809|||PR records: his-design rule (Apollo 2026-11-13)Tracker
- d1390692Merge branch 'records-dp75b' into mainTracker
- a4d1a7d2|||PR records: later steps checked, branch auditTracker
- e070e16fMerge branch 'records-dp75' into mainTracker
- 642b4fa8|||PR records: DP75 day62 live, AP62 briefTracker
- bfc4ea4dMerge branch 'ap62' into mainTracker
- 2c95ac46|||PR AP62: re-vendor Hybriel set day62 (source 70341ad2, bin a54f5f08)Tracker
- b9c7c3c8Merge branch 'records-dp74' into mainTracker
- 85cfb4ae|||PR records: AP61 day61, DP74 liveTracker