gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitd105d8a9d105d8a9Records: mpackdb integrity check cleanmred105d8a9/components/artists.hl

1.0 KB

  1. // components/artists.hl — `/artists`: every artist, by name, with the cover of one of their albums; a tap opens the artist.
  2. parent './main.hl'
  3. import { navigate } from 'hl:web'
  4. import VirtualList from './virtual-list/virtual-list.hl'
  5. import { rowsFor, thousands } from '../lib/rows.hl'
  6. __title = 'Artists · Jukebox'
  7. Hybrid firstRows = rowsFor({ kind = 'artists' }, 0, 100)
  8. Number artistTotal = firstRows.total
  9. Hybrid chunk = firstRows.rows
  10. Number chunkFrom = 0
  11. String countText = thousands(artistTotal) + ' artists'
  12. on artistsLoad(first, wanted) {
  13. let start = first - 20
  14. if (start < 0) { start = 0 }
  15. r = emit server jbRows({ kind = 'artists' }, start, 100)
  16. chunk = r.rows
  17. chunkFrom = r.offset
  18. return null
  19. }
  20. loadRange = (first, wanted) => { emit artistsLoad(first, wanted) }
  21. picked = (id, index) => { navigate('/artists/' + id) }
  22. View {
  23. jbScreen {
  24. jbCount { output { id = "count" countText } }
  25. VirtualList { itemCount = artistTotal rowHeight = 56 loaded = chunk loadedFrom = chunkFrom onRange = loadRange onPick = picked listLabel = "Artists" }
  26. }
  27. }

Branches

Latest commits

  • d105d8a9Records: mpackdb integrity check cleanmre
  • 6e980c53Records: mpackdb rule refinementmre
  • 6d335ac4Records: storage copy rulingmre
  • 7eb2898dRecords: mpackdb second-opener rule until day38mre
  • b011f98eRecords: style form live on day35mre
  • 60d90cb2Records: L1 woken for the restartmre
  • 75ae544fRecords: restart waits for the connection to closemre
  • e0b75951Records: L1 merged and pushed, restart waits for an open connectionmre
  • f2b5db98styles: format styles with nested rules and bare queriesmre
  • f036bab4search: format styles with nested rules and bare queriesmre
  • ef9a9d4asongs: format styles with nested rules and bare queriesmre
  • f22f9aacmain: format styles with nested rules and bare queriesmre
  • f56cd7c7Sync icons from 8176eb1 and verify mixed component sourcesmre
  • d56e5054Sync theme and shared tokens from layouts 17e0f03mre
  • b1362547Re-vendor to Hybriel set day35mre
  • 89e10f08Records: mission 002 rollback wordingmre
  • 9485dee7Records: mission 002 brief (live step)mre
  • 9ba68fe7Records: S1b reviewedmre
  • 193dfff1Records: S1 result, S1b startedmre
  • 028ed776Records: mission 001 continuation S1bmre