tracker
All repositories: gitoria
3.1 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 '../lib/app.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 — ' + appTitle// Component styles use the shared theme variables.Style {franchisesPage {display = 'block'}franchiseList {display = 'block'marginBottom = '1.2rem'}aFranchiseRow {display = 'flex'alignItems = 'baseline'gap = '.8rem'padding = '.6rem 0'color = 'var(--color-text-strong)'}franchiseName {flex = '1'minWidth = '0'fontSize = '1.05rem'fontWeight = '600'overflowWrap = 'anywhere'}franchiseCount {flex = 'none'fontSize = '.85rem'color = 'var(--color-text-muted)'}}View {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 { Style.aFranchiseRow 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
- 4b54f6f9Merge branch 'records-audit' into mainTracker
- cab4a3bc|||PR records: branch audit, PR-onlyTracker
- 641e1c4cMerge branch 'records-dp71' into mainTracker
- 85a6e9f5|||PR records: DP71 checked in ChromeTracker
- f5be5f18records: gitoria PR-only planTracker
- 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