gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit456940c8456940c8Tracker: RULINGS pathmre456940c8/components/franchises.hl

2.6 KB

  1. // components/franchises.hl — `/franchises` (tracker.worldapi.org#19, mission 066): every franchise (→ its index), then the
  2. // timelines that belong to none (most of them TMDB's movie collections, collections.hl seed), each with its number of titles.
  3. // The creator sees an "Edit" link to the editor (/franchises/edit). Data: franchises.hl franchiseIndexPage (the franchises on page 1, the loose timelines 40 per page: /franchises/page/N).
  4. parent './main.hl'
  5. import { navigate } from 'hl:web'
  6. import { appTitle } from '../project.hl'
  7. import { franchiseIndexPage, isEditorSession } from '../lib/franchises.hl'
  8. import Pagination from './pagination.hl'
  9. // static: an mpackdb-backed helper must be `static` (hybriel#115/#116), and LOCAL (mission 047)
  10. static indexOf = (&raw) => { return franchiseIndexPage(raw) }
  11. static editorOf = (&session) => { return isEditorSession(session) }
  12. session = null
  13. page = null
  14. canEdit = editorOf(session)
  15. listing = indexOf(page)
  16. franchiseRows = listing.franchises
  17. timelineRows = listing.timelines
  18. pageNo = listing.page
  19. hasFranchises = franchiseRows.length > 0
  20. noFranchises = franchiseRows.length == 0 && pageNo == 1
  21. hasTimelines = listing.total > 0
  22. pageCount = listing.pages
  23. hasPages = pageCount > 1
  24. // mobile audit MK: the timelines without a franchise are 40 per page (1,546 of them were one 54,000 px page that took 20 s)
  25. timelineCountText = (listing.total == 1 ? '1 timeline without a franchise' : listing.total + ' timelines without a franchise') + (hasPages ? ' · page ' + pageNo + ' of ' + pageCount : '')
  26. goPage = (to) => { navigate(to == 1 ? '/franchises' : '/franchises/page/' + to) }
  27. __title = pageNo > 1 ? 'Franchises, page ' + pageNo + ' — ' + appTitle : 'Franchises — ' + appTitle
  28. View {
  29. franchisesPage {
  30. franchisesHead {
  31. h1 { class = "typed" typeWord { class = "type-word type-franchise" "Franchises" } }
  32. if (canEdit) { a { id = "franchises-edit" class = "button" href = "/franchises/edit" "Edit" } }
  33. }
  34. if (noFranchises) { p { class = "muted" "No franchises yet." } }
  35. if (hasFranchises) {
  36. franchiseList { id = "franchise-list"
  37. for (f of franchiseRows) {
  38. a { class = "franchise-row" href = f.href
  39. franchiseName { f.name }
  40. franchiseCount { f.countText }
  41. }
  42. }
  43. }
  44. }
  45. if (hasTimelines) {
  46. h2 { class = "film-heading" "Timelines" }
  47. p { class = "muted list-count" timelineCountText }
  48. timelineList { id = "timeline-list"
  49. for (t of timelineRows) {
  50. a { class = "timeline-link" href = t.href
  51. timelineLinkName { t.name }
  52. timelineLinkCount { t.countText }
  53. }
  54. }
  55. }
  56. if (hasPages) {
  57. pagerBox { Pagination { pages = pageCount page = pageNo onPage = goPage } }
  58. }
  59. }
  60. }
  61. }

Branches

Latest commits

  • 456940c8Tracker: RULINGS pathmre
  • b87a8fdcTracker: worldapi-conductor paths backmre
  • 641f3b54Tracker: Apollo answermre
  • 8b3cbddaTracker: status, TR7 fix livemre
  • ec30162aTracker: TR7 fix livemre
  • 54cbec80compose: ignore SIGPIPE (TR7 crash loop, exit 141)mre
  • 3e164b63Tracker: status after CL1mre
  • 9d686bb3Tracker: CL1 reviewedmre
  • b8bba562CL1: crash loop report (SIGPIPE confirmed, trap wrapper option)mre
  • 298785f2Tracker: CL1 startedmre
  • 36b22710Tracker: port slot, CL1 briefmre
  • a401190fTracker: GO for the crash loopmre
  • e195d372Tracker: token pathsmre
  • 7f541d11Tracker conductor: CONDUCTOR.md, short STATUS.md, old status + decisions archive to archive/2026-10-31mre
  • 8dd423f7README: login.js stays by caramboleyo's explicit rulemre
  • d8df1493tracker: standby service on port 45018 and a gap-free hand-over in deploy.sh step 4mre
  • 36dd1686ident#31: the selector's sign-in returns to the page the user started on (return attribute = the login callback with next), gate checkmre
  • ff9b838etracker: the Ended status pill uses the same red as layouts (pill danger); gate updatedmre
  • 40d9719eTP2: LOG line and report for the tracker pillsmre
  • ab3f2ba5tracker: status, genres, TMDB/IMDb/TVDB/TVmaze links and list kinds use the theme's pill; dense season list with the season check centred on its title line; gates for bothmre