mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Improved play buttons in list
This commit is contained in:
1 parent
bd35418a89
commit
a6f96d5943
3 files changed
+32
-7
No files matched your search
@@ -50,6 +50,8 @@ interface Props {
|
||||
/** Bumped when something outside the deck (batch grid analysis) rewrote the
|
||||
* loaded track's cues/grid, so the deck re-reads them. */
|
||||
cuesRefresh?: number
|
||||
/** Reports whether the deck is playing, so the library can light its row. */
|
||||
onPlayingChange?: (playing: boolean) => void
|
||||
}
|
||||
|
||||
/** m:ss.t — the deck's readouts show tenths, as a CDJ does. */
|
||||
@@ -92,9 +94,11 @@ export function PrepStrip({
|
||||
onNotify,
|
||||
origin = 'collection',
|
||||
cuesRefresh = 0,
|
||||
onPlayingChange,
|
||||
}: Props) {
|
||||
const qc = useQueryClient()
|
||||
const [playing, setPlaying] = useState(false)
|
||||
useEffect(() => onPlayingChange?.(playing), [playing, onPlayingChange])
|
||||
const [previewing, setPreviewing] = useState(false) // momentary hold-to-play active
|
||||
// CUE is held down (mouse OR the C key) — drives the button's pressed look,
|
||||
// which the pointer's :active alone cannot, since the key never touches it.
|
||||
|
||||
Reference in new issue
Block a user