jukebox
All repositories: gitoria
1.0 KB
// components/albums.hl — `/albums`: every album, by name, with its cover; a tap opens the album.parent './main.hl'import { navigate } from 'hl:web'import VirtualList from './virtual-list/virtual-list.hl'import { rowsFor, thousands } from '../lib/rows.hl'__title = 'Albums · Jukebox'Hybrid firstRows = rowsFor({ kind = 'albums' }, 0, 100)Number albumTotal = firstRows.totalHybrid chunk = firstRows.rowsNumber chunkFrom = 0String countText = thousands(albumTotal) + ' albums'on albumsLoad(first, wanted) {let start = first - 20if (start < 0) { start = 0 }r = emit server jbRows({ kind = 'albums' }, start, 100)chunk = r.rowschunkFrom = r.offsetreturn null}loadRange = (first, wanted) => { emit albumsLoad(first, wanted) }picked = (id, index) => { navigate('/albums/' + id) }View {jbScreen {jbCount { output { id = "count" countText } }VirtualList { itemCount = albumTotal rowHeight = 56 loaded = chunk loadedFrom = chunkFrom onRange = loadRange onPick = picked listLabel = "Albums" }}}
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