gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commite5c9b659e5c9b659Pack retained search IDs into UTF-8 bytesmree5c9b659/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

  • 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
  • ed4cbab2status timemre
  • e982c26dlog: HM65 mergedmre
  • 6e72f9d1Merge hm65-fields: episode boot scan reads three fieldsmre
  • 07a5c883HM65 report measured field projection and complete validationmre
  • 0eab858fRead only catalog date fields during the episode boot scanmre
  • d3179273log: HM65 hl:heap vendoringmre
  • cb78a1a0HM65 report missing heap diagnostic package with repromre
  • 89606a5cHM65 briefmre
  • 096ce0d4log: DP69 live on day48mre
  • b3d8a80bDP69 brief, RV48 mergedmre
  • ce6d7d32Merge rv48: Hybriel day48mre
  • 3da2ea86RV48: report day48 cold starts, gates and cleanupmre
  • 8d9ecdfeRV48: re-vendor Hybriel set day48 (source b6a8f429, bin 660a9524)mre
  • 4a802ae7status: RV48 runningmre