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
- 46a37036records: DP71 liveTracker
- 3bcb7039Status/log: DP71 in progressTracker
- 5b3a5693Log: SR1b merged via PR 2, DP71 startedTracker
- 783957c2Merge branch 'sr1-search' into mainTracker
- 792b9652README: search results come from the routeTracker
- fd8570b1|||PR search: one server exchange per keystrokeTracker
- e8f5cbcaLog: SR1 result, SR1bTracker
- 8ad275a4Log/status: tracker 68, SR1Tracker
- f5a06a0fLog: gitoria push setup, SR1Tracker
- d6b109baMission SR1mre
- 608b7558Log: FF1 merged via PR #1mre
- 2939d94cMerge branch 'ff1-gate-failfast' into mainTracker
- c934361a|||PR tests: gates fail fast when the app exits during startmre
- d714ae42Log/status: AP56 closed out, FF1mre
- a429d088Mission FF1mre
- 03bbfba3Log: AP56c causemre
- 24845fe3Log: AP56b result, AP56cmre
- 6a6d71eaLog: gitoria membershipmre
- 8b842dc8Log + CONDUCTOR: gitoria PR switch-onmre
- 6bb7c20estatus: window 2026-11-09mre