tracker
All repositories: gitoria
2.6 KB
// components/franchises.hl — `/franchises` (tracker.worldapi.org#19, mission 066): every franchise (→ its index), then the// timelines that belong to none (most of them TMDB's movie collections, collections.hl seed), each with its number of titles.// 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).parent './main.hl'import { navigate } from 'hl:web'import { appTitle } from '../project.hl'import { franchiseIndexPage, isEditorSession } from '../lib/franchises.hl'import Pagination from './pagination.hl'// static: an mpackdb-backed helper must be `static` (hybriel#115/#116), and LOCAL (mission 047)static indexOf = (&raw) => { return franchiseIndexPage(raw) }static editorOf = (&session) => { return isEditorSession(session) }session = nullpage = nullcanEdit = editorOf(session)listing = indexOf(page)franchiseRows = listing.franchisestimelineRows = listing.timelinespageNo = listing.pagehasFranchises = franchiseRows.length > 0noFranchises = franchiseRows.length == 0 && pageNo == 1hasTimelines = listing.total > 0pageCount = listing.pageshasPages = pageCount > 1// 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)timelineCountText = (listing.total == 1 ? '1 timeline without a franchise' : listing.total + ' timelines without a franchise') + (hasPages ? ' · page ' + pageNo + ' of ' + pageCount : '')goPage = (to) => { navigate(to == 1 ? '/franchises' : '/franchises/page/' + to) }__title = pageNo > 1 ? 'Franchises, page ' + pageNo + ' — ' + appTitle : 'Franchises — ' + appTitleView {franchisesPage {franchisesHead {h1 { class = "typed" typeWord { class = "type-word type-franchise" "Franchises" } }if (canEdit) { a { id = "franchises-edit" class = "button" href = "/franchises/edit" "Edit" } }}if (noFranchises) { p { class = "muted" "No franchises yet." } }if (hasFranchises) {franchiseList { id = "franchise-list"for (f of franchiseRows) {a { class = "franchise-row" href = f.hreffranchiseName { f.name }franchiseCount { f.countText }}}}}if (hasTimelines) {h2 { class = "film-heading" "Timelines" }p { class = "muted list-count" timelineCountText }timelineList { id = "timeline-list"for (t of timelineRows) {a { class = "timeline-link" href = t.hreftimelineLinkName { t.name }timelineLinkCount { t.countText }}}}if (hasPages) {pagerBox { Pagination { pages = pageCount page = pageNo onPage = goPage } }}}}}
Branches
Latest commits
- 9d806e35records: mpackdb freeze until day38mre
- a660239drecords: day37 lacks #277, wait for day38mre
- b0abfdeaLOG: Anton hybriel#277 fix ready for day37mre
- 7b5b2918Tracker: hybriel#277 fix comes in day37mre
- 7ddbeec8Tracker: RV28c blocked on day35 regressionmre
- bf401884Tracker: RV28c startedmre
- 0ff4ecd4Tracker: RV28c briefmre
- 06565b1fRecords: day35 relay note, tickets subscription idmre
- c6dc3e86RV28b: switch to set day35mre
- 24e401b8Tracker: TR7 watch cleanmre
- b0412957Tracker: RV28b handed overmre
- 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