gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitcab4a3bccab4a3bc|||PR records: branch audit, PR-onlyTrackercab4a3bc/components/schedule.hl

2.7 KB

  1. // components/schedule.hl — `/my/schedule` (tracker.worldapi.org#6, moved from `/schedule` in #8): every episode of a show the signed-in
  2. // user follows that is not yet released, soonest first. Creator's words: "/schedule has a similar list
  3. // without check icons for he upcoming episodes of shows followed". Same row shape as /unwatched (step 5)
  4. // minus the check icon and minus any click handling — this page is read-only, so it needs no `on server`
  5. // face at all. Reused (not copied) from follows.hl/shows.hl: `followedShowIds`, `cardOf`, `episodeRowsOf`
  6. // — the same functions /unwatched already imports.
  7. //
  8. // Upcoming = release date strictly AFTER today (the architect's reading of the ticket: "the creator named
  9. // the order only for /unwatched" — /unwatched is release <= today, so the natural complement here is
  10. // release > today; an episode releasing today already belongs to /unwatched once watched state is added).
  11. parent './main.hl'
  12. import { appTitle } from '../lib/app.hl'
  13. import { userIdOfSession } from '../lib/users.hl'
  14. import { scheduleRowsOf } from '../lib/follows.hl'
  15. // ---- reactive members -----------------------------------------------------------------------
  16. session = null
  17. userId = userIdOfSession(&session)
  18. signedIn = userId != null
  19. // a plain copy of userId for `rows` (mission 047: session sync, see components/show.hl `me`)
  20. me = userId
  21. rows = signedIn ? scheduleRowsOf(&me) : []
  22. hasRows = rows.length > 0
  23. noRows = !hasRows
  24. emptyText = signedIn ? 'No upcoming episodes.' : 'Sign in to see the shows you follow.'
  25. __title = 'Schedule — ' + appTitle
  26. // HM49: component rules keep the existing selectors and shared theme variables.
  27. Style {
  28. schedulePage {
  29. display = 'block'
  30. }
  31. scheduleRows {
  32. display = 'block'
  33. }
  34. scheduleRow {
  35. display = 'grid'
  36. gridTemplateColumns = 'minmax(0, 1fr) auto'
  37. alignItems = 'center'
  38. gap = '0 .6rem'
  39. padding = '.5rem 0'
  40. @media {
  41. minWidth = '40rem'
  42. display = 'flex'
  43. }
  44. }
  45. scheduleShow {
  46. fontWeight = '600'
  47. overflowWrap = 'anywhere'
  48. padding = '.7rem 0'
  49. margin = '-.7rem 0'
  50. @media {
  51. minWidth = '40rem'
  52. flex = 'none'
  53. }
  54. }
  55. scheduleEpisode {
  56. gridColumn = '1 / 3'
  57. gridRow = '2'
  58. color = 'var(--color-text)'
  59. overflowWrap = 'anywhere'
  60. @media {
  61. minWidth = '40rem'
  62. flex = '1'
  63. }
  64. }
  65. scheduleDate {
  66. gridRow = '1'
  67. gridColumn = '2'
  68. fontSize = '.85rem'
  69. color = 'var(--color-text-muted)'
  70. fontVariantNumeric = 'tabular-nums'
  71. @media {
  72. minWidth = '40rem'
  73. flex = 'none'
  74. }
  75. }
  76. }
  77. View {
  78. schedulePage {
  79. h1 { "Schedule" }
  80. if (noRows) { p { class = "muted" emptyText } }
  81. if (hasRows) {
  82. scheduleRows {
  83. for (row of rows) {
  84. scheduleRow {
  85. a { Style.scheduleShow href = row.showHref row.showTitle }
  86. scheduleEpisode { row.episodeLabel }
  87. scheduleDate { row.release }
  88. }
  89. }
  90. }
  91. }
  92. }
  93. }

Branches

Latest commits

  • 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
  • 03bbfba3Log: AP56c causemre