tracker
All repositories: gitoria
2.7 KB
// components/schedule.hl — `/my/schedule` (tracker.worldapi.org#6, moved from `/schedule` in #8): every episode of a show the signed-in// user follows that is not yet released, soonest first. Creator's words: "/schedule has a similar list// without check icons for he upcoming episodes of shows followed". Same row shape as /unwatched (step 5)// minus the check icon and minus any click handling — this page is read-only, so it needs no `on server`// face at all. Reused (not copied) from follows.hl/shows.hl: `followedShowIds`, `cardOf`, `episodeRowsOf`// — the same functions /unwatched already imports.//// Upcoming = release date strictly AFTER today (the architect's reading of the ticket: "the creator named// the order only for /unwatched" — /unwatched is release <= today, so the natural complement here is// release > today; an episode releasing today already belongs to /unwatched once watched state is added).parent './main.hl'import { appTitle } from '../lib/app.hl'import { userIdOfSession } from '../lib/users.hl'import { scheduleRowsOf } from '../lib/follows.hl'// ---- reactive members -----------------------------------------------------------------------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 ? scheduleRowsOf(&me) : []hasRows = rows.length > 0noRows = !hasRowsemptyText = signedIn ? 'No upcoming episodes.' : 'Sign in to see the shows you follow.'__title = 'Schedule — ' + appTitle// HM49: component rules keep the existing selectors and shared theme variables.Style {schedulePage {display = 'block'}scheduleRows {display = 'block'}scheduleRow {display = 'grid'gridTemplateColumns = 'minmax(0, 1fr) auto'alignItems = 'center'gap = '0 .6rem'padding = '.5rem 0'@media {minWidth = '40rem'display = 'flex'}}scheduleShow {fontWeight = '600'overflowWrap = 'anywhere'padding = '.7rem 0'margin = '-.7rem 0'@media {minWidth = '40rem'flex = 'none'}}scheduleEpisode {gridColumn = '1 / 3'gridRow = '2'color = 'var(--color-text)'overflowWrap = 'anywhere'@media {minWidth = '40rem'flex = '1'}}scheduleDate {gridRow = '1'gridColumn = '2'fontSize = '.85rem'color = 'var(--color-text-muted)'fontVariantNumeric = 'tabular-nums'@media {minWidth = '40rem'flex = 'none'}}}View {schedulePage {h1 { "Schedule" }if (noRows) { p { class = "muted" emptyText } }if (hasRows) {scheduleRows {for (row of rows) {scheduleRow {a { Style.scheduleShow href = row.showHref row.showTitle }scheduleEpisode { row.episodeLabel }scheduleDate { row.release }}}}}}}
Branches
Latest commits
- 2f391aa9Log: HM50 startedmre
- 4b59c03dHM50 mission: doc pathmre
- ed526d67HM50 missionmre
- 2f986ca3Log: RT50 passmre
- 1c4715a4RT50 mission: day50 repro retestmre
- 57d1c0dcLog: day50 retest requestmre
- 60b1f419Log: Anton #336 result, wake checkmre
- 919a18aalog: scratchmre
- 6b504440status tidymre
- 9332bd10log: DP70 livemre
- be11daa0DP70 brief fixmre
- 886a7028DP70 brief, HM67 mergedmre
- b41cdd6dMerge hm67-searchids: packed search IDsmre
- 385904eaReport HM67 matched heap measurements and gate proofmre
- e5c9b659Pack retained search IDs into UTF-8 bytesmre
- 62a5f6c7HM67 brief, HM66 mergedmre
- b32b8440Merge hm66-catalogindex: packed catalog indexmre
- 2db0f7adReport HM66 heap measurements and validationmre
- 6ce15623Pack catalog lists and membership maps in UTF-8 bytesmre
- 71134e21HM66 briefmre