Files
qbz/crates/qbz-qt/qml/kiosk/KioskLocalTracksTab.qml
T
vicrodh 31da9c57bb fix(qt): kiosk feedback round — chrome, search, album, artists, lyrics
Address the owner's kiosk feedback on top of the release hardening:

- Chrome: the back bar is a drag surface and shrank to 44px with one shared
  button form for Back/Forward/Connect/Cast; Qobuz Connect and Cast are a
  permanent cluster in the bar; the dead Share-logs button left the kiosk
  Settings header.
- Transport bar: the hidden overflow menu is gone; Volume is always visible
  with a vertical sheet, and Desktop mode has its own button.
- Now Playing: one centred transport row (New-bar order); lyrics are centred
  (shared LyricsLinesView gains an opt-in centered, desktop default false).
- Local Library: the media funnel and an Open (ephemeral) entry point reach
  the kiosk; Artists is its own multi-column round-card grid (kiosk-only, the
  desktop LocalArtistsTab is untouched); the Artists drill-down query no
  longer hangs off a stale derived guard.
- Search: the All-tab dashboard shelves render again — they were mounted in a
  Loader Component that read the delegate id under reuse and bound an empty
  model; they are direct children now.
- Album detail: icon actions the height of the quality badge plus play next /
  later / queue, an inline floating quality badge, and zebra rows; both album
  headers show a quality badge.
- Immersive: a quiet auto-hiding kiosk exit moved to the bottom, clear of the
  window controls.

Regression coverage in scripts/test_qt_kiosk_feedback.mjs (wired into the
runtime gate). Verified on a private authenticated Xvfb; QML audits 6/6,
Node gate 5/5, release build 0 warnings.

cc
2026-09-07 12:33:28 -06:00

85 lines
2.9 KiB
QML

// Local Library > Tracks, kiosk body — the second surface the release audit
// reported dead, and for the same reason as Artists: it read the legacy
// `localTracksJson`, which stops being republished once the paged
// `QbzLocalTracks` surface is active (the production default since the native
// model shipped).
//
// It issues NO query of its own. The host's `loadActiveTab` — called on mount
// and on every tab switch — installs the SHARED funnel through
// `tracksSetFilterJson`, exactly as the desktop view does
// (LocalLibraryView.qml:700-707), and that setter is the load. The kiosk never
// hands it a neutral descriptor: the value is the same persisted funnel the
// Full UI reads, so nothing saved from the desktop is erased here.
//
// Everything else is KioskLocalTrackList.
import QtQuick
import com.blitzfc.qbz
import "../theme"
Item {
id: root
property var view: null
readonly property string nativeError: root.nativeActive ? QbzLocal.localTracksNativeError : ""
readonly property bool nativeActive: QbzLocal.localTracksNativeActive
readonly property var nativeModel: QbzLocalTracks
readonly property int trackTotal: root.nativeActive
? (QbzLocal.localTracksNativeTotal || 0)
: (root.view ? root.view.tracks.length : 0)
function t(s) { return QbzSession.tr(s, QbzSession.trRev) }
// A track list is one column; the focus ring walks the model's rows.
function publishNav() {
if (root.view)
root.view.publishNav(1, root.trackTotal)
}
onTrackTotalChanged: root.publishNav()
Component.onCompleted: root.publishNav()
// Only the mounted tab answers the model's page misses (the model does not
// even emit them while the signal has no receiver).
Connections {
target: root.nativeModel
function onPageMiss(page, generation) {
QbzLocal.tracksNativePageMiss(page, generation)
}
}
Connections {
target: QbzLocal
function onLocalArtworkReady(key, path) {
root.nativeModel.setArtwork(key, path)
}
}
KioskLocalTrackList {
id: list
anchors.fill: parent
visible: !QbzLocal.localTracksLoading
&& root.nativeError === ""
&& root.trackTotal > 0
view: root.view
surface: "tracks"
scrollScope: "local:tracks"
nativeActive: root.nativeActive
nativeModel: root.nativeModel
rows: root.nativeActive ? [] : (root.view ? root.view.tracks : [])
}
KioskSkeleton {
anchors.fill: parent
kind: "list"
rowHeight: 64
rowArtSize: 46
pad: root.view ? root.view.pad : 16
loading: QbzLocal.localTracksLoading
error: root.nativeError
empty: !QbzLocal.localTracksLoading
&& root.nativeError === ""
&& root.trackTotal === 0
emptyText: root.t("No tracks in your local library yet.")
}
}