jukebox
All repositories: gitoria
1.0 KB
// components/artists.hl — `/artists`: every artist, by name, with the cover of one of their albums; a tap opens the artist.parent './main.hl'import { navigate } from 'hl:web'import VirtualList from './virtual-list/virtual-list.hl'import { rowsFor, thousands } from '../lib/rows.hl'__title = 'Artists · Jukebox'Hybrid firstRows = rowsFor({ kind = 'artists' }, 0, 100)Number artistTotal = firstRows.totalHybrid chunk = firstRows.rowsNumber chunkFrom = 0String countText = thousands(artistTotal) + ' artists'on artistsLoad(first, wanted) {let start = first - 20if (start < 0) { start = 0 }r = emit server jbRows({ kind = 'artists' }, start, 100)chunk = r.rowschunkFrom = r.offsetreturn null}loadRange = (first, wanted) => { emit artistsLoad(first, wanted) }picked = (id, index) => { navigate('/artists/' + id) }View {jbScreen {jbCount { output { id = "count" countText } }VirtualList { itemCount = artistTotal rowHeight = 56 loaded = chunk loadedFrom = chunkFrom onRange = loadRange onPick = picked listLabel = "Artists" }}}
Branches
Latest commits
- 6dcaeb46Records: resetKey planmre
- c5dbf2ecRecords: R2 resultmre
- 956069b8Records: R1 result, mission 007mre
- 3c8a2e12Mission 007: #20 sort scrollmre
- deb8cef5Records: mission 006 startedmre
- 4f0ad42fMission 006: jukebox#20mre
- 800cae06Records: #21 planmre
- 64bc7823Records: #21 causemre
- 76639655Records: B1 questionmre
- d7906b36Records: mission 005 startedmre
- d3df773cMission 005: doc linemre
- 6a5d840aMission 005: jukebox#22mre
- 13e5e748Records: mission 004 startedmre
- a8098271Mission 004: jukebox#21mre
- df8f5205Records: jukebox#19-21, #11 closedmre
- b7a4e692Records: hybriel#298mre
- 9bcbb017Records: day38b waits for day39 fixmre
- f80504e1Records: day38b repro sentmre
- 8048258bRecords: day38b jb3 regression, L1 Chromes stoppedmre
- 68aace7fRecords: mission 003 day38bmre