gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitcb634512cb634512log: 2026-11-08 keyed lists livemrecb634512/components/releases.hl

3.0 KB

  1. // components/releases.hl — THE RELEASES of a repo (gitoria#12, gitoria#16): `/releases` on <slug>.<domain>, its
  2. // own route. The repo head is rendered on the server from the request's host. The list comes from git (the
  3. // |||RL commits of the main branch) on the SERVER too
  4. // (lib/releases.hl releasesNow — hl:proc run() waits, hybriel#80): it is in the first HTML and in every hl:web navigation.
  5. parent './repo.hl'
  6. import { siteName } from '../project.hl'
  7. import { slugOfRequest } from '../lib/orgs.hl'
  8. import { titleSlug, repoAt } from '../lib/repos.hl'
  9. import { pageTitle } from '../lib/repos-helpers.hl'
  10. import { releasesNow } from '../lib/releases.hl'
  11. host = null
  12. orepo = ''
  13. session = null
  14. slug = slugOfRequest(host, orepo)
  15. repo = repoAt(slug, session)
  16. hasRepo = repo != null
  17. got = repo != null ? releasesNow(slug, repo.branch) : null
  18. releasesShown = got != null && !got.isMessage
  19. releasesMessage = got != null && got.isMessage
  20. releasesText = got != null && got.isMessage ? got.message : ''
  21. releasesNone = got != null && !got.isMessage && got.noReleases
  22. releasesList = got != null && !got.isMessage ? got.releases : []
  23. releasesDefault = got != null && !got.isMessage ? got.defaultName : ''
  24. __title = pageTitle(siteName, titleSlug(host, orepo, session), 'Releases')
  25. View {
  26. repoPage {
  27. if (hasRepo) {
  28. repoReleases { id = "releases"
  29. if (releasesMessage) { p { id = "releasesmessage" class = "empty" releasesText } }
  30. if (releasesShown) {
  31. p { id = "releaseshelp" class = "muted" "A commit on " strong { releasesDefault } " whose message starts with " code { "|||RL " } " makes a release: the last version +1; " code { "|||RL|med " } " counts the middle number, " code { "|||RL|mj " } " the major number, " code { "|||RL|1.1.1a " } " sets the version." }
  32. if (releasesNone) { p { id = "noreleases" class = "empty" "No release yet." } }
  33. ol { id = "releaselist"
  34. for (rl of releasesList) {
  35. li {
  36. strong { Style.strongVersion rl.version }
  37. if (rl.isLatest) { span { Style.spanLatest "latest" } }
  38. if (rl.hasTitle) { a { Style.aReleaseSubject href = rl.href rl.title } }
  39. if (rl.noTitle) { a { Style.aReleaseSubject class = "muted" href = rl.href rl.short } }
  40. span { class = "muted" rl.author }
  41. time { rl.date }
  42. }
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }
  49. }
  50. Style {
  51. repoReleases {
  52. display = 'grid'
  53. gap = '1rem'
  54. minWidth = '0'
  55. // Direct-child universal selectors have no bare language form.
  56. '> *' {
  57. margin = '0'
  58. }
  59. }
  60. #releaselist {
  61. display = 'grid'
  62. gap = '.4rem'
  63. margin = '0'
  64. padding = '0'
  65. listStyle = 'none'
  66. li {
  67. display = 'flex'
  68. flexWrap = 'wrap'
  69. alignItems = 'center'
  70. gap = '0 .8rem'
  71. margin = '0'
  72. padding = '.1rem 1rem .3rem'
  73. background = 'var(--color-surface)'
  74. borderRadius = 'var(--radius-large)'
  75. overflowWrap = 'anywhere'
  76. }
  77. }
  78. strongVersion {
  79. fontSize = '1.05rem'
  80. color = 'var(--color-accent)'
  81. }
  82. spanLatest {
  83. fontSize = '.875rem'
  84. color = 'var(--color-text-muted)'
  85. }
  86. aReleaseSubject {
  87. flex = '1 1 12rem'
  88. display = 'inline-flex'
  89. alignItems = 'center'
  90. minHeight = '2.75rem'
  91. }
  92. }

Branches

Latest commits

  • cb634512log: 2026-11-08 keyed lists livemre
  • 07c98d4aLists: keyed rows with @id, remove(id) and one whole-list assignment instead of hand-rebuilt loopsmre
  • 0db0d81elog: 2026-11-08 day52 live, W30 startedmre
  • b05f6d92tests/status: the gate's 3 s app token expired during the restart; it lives 60 s like status-keyedmre
  • 1e8f4f0avendor: Hybriel set-day52 (fault-path leak fix #335, keyed rows #331)mre
  • f5f0fb7blog: 2026-11-08 day50/#29 live, H25 correction, V52 startedmre
  • dc77fb95main: offline note from __hlOnline, tick removed (#29)mre
  • 37a86d93tests/reviews: seeded fake hook's DNS failures are not server errors (flaky gate)mre
  • 07ab845bvendor: Hybriel set-day50 (run() leak fix #335)mre
  • 71b2fa4blog: hybriel#335mre
  • bd94cc7elog: #25 cause found (run() leak)mre
  • 565cb508log: H25 round 1mre
  • 90a0af84log: H25 startedmre
  • 87bd53b8mission H25mre
  • 71a746cflog: day48 livemre
  • bf568e14log: V48 mergedmre
  • 09955dedMerge v48: Hybriel set-day48, theme layouts ce4a0bamre
  • f2a2b0cevendor: Hybriel set-day48, theme layouts ce4a0bamre
  • 5d0834e7log: Apollo model rulemre
  • fe8e5bd5log: #25 sample, V48 missionmre