gitoria

tracker

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit4871f8ad4871f8adLog: AP52 live on day52, browser gate greenmre4871f8ad/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

  • 4871f8adLog: AP52 live on day52, browser gate greenmre
  • d9bf2988Merge ap52: day52, tracker#58 server argument, #51 modal close rule, #56 keyed season rowsmre
  • c4a60ef2Log: RT52 retest passed, AP52 startedmre
  • 83760a55Browser gate: search results belong to the address form of the typed text (tracker#52 navigate replace)mre
  • 6e951d91AP52: show-page rows are keyed records; closing a season is one upsert and removes (tracker#56, hybriel#331)mre
  • 3bb4ccddAP52: modal close button refers to its nested rule with Style.buttonModalX (tracker#51, hybriel#333)mre
  • ba16933fAP52: login callback and title route are static handlers taking the server as third argument (tracker#58, hybriel#332)mre
  • 85153900AP52: re-vendor Hybriel set day52 (source 77cfca31, bin 0a8ed496)mre
  • 7c051eddLog: hybriel#338 answermre
  • d049b8b8Log: HM50 live, #52 donemre
  • 6d05fa37Log: HM50 Part A mergedmre
  • 1c7dab74HM50: the shell reads the framework's online state, netProbe removed (tracker#55)mre
  • e8b91697HM50: search address follows the text via navigate(path, replace = true) (tracker#52)mre
  • 6fe1896cHM50: re-vendor Hybriel set day50 (source 0ae38232, bin d3ef9d16)mre
  • 2f391aa9Log: HM50 startedmre
  • 4b59c03dHM50 mission: doc pathmre
  • ed526d67HM50 missionmre
  • 2f986ca3Log: RT50 passmre
  • 1c4715a4RT50 mission: day50 repro retestmre
  • 57d1c0dcLog: day50 retest requestmre