Opt-in collapsible My QBZ tree in the sidebar (Settings > Navigation): a branding-titled parent over Mixtapes and Collections sections, each header a link to its grid with a chevron that only collapses. Header text and icon on the left, a Playlists-parity toolbar floating right (search, new, sort A-Z/Z-A, refresh, collapse) with the chevron aligned to the playlist carets. The tree feed rides QbzShell (QbzMyQbz is not reliably registered in the shell context) and is published through publish_sidebar, so it lands reliably at startup. Per-element visibility reuses the mixtape hidden flag (repo::set_hidden): a row's right-click hides it from the sidebar, and the detail hero menu toggles "Hide from sidebar" / "Show in sidebar". Collapse state for the playlist tree and all three My QBZ sections is persisted. The collapsible tree and the flat My QBZ entry are mutually exclusive — the classic row is suppressed whenever the tree is on. Settings gains a Navigation section (Navigation + Search moved out of Appearance). Detail view also gains a discreet, column-aligned sub-header over the inline track list. Eight locales updated. cc
143 lines
6.9 KiB
QML
143 lines
6.9 KiB
QML
// Settings > Navigation — the navigation and search preferences split out
|
|
// of Appearance, which now keeps only the visual groups. Same settingsJson
|
|
// document, so every control keeps working unchanged; only the parent moved.
|
|
import QtQuick
|
|
import com.blitzfc.qbz
|
|
import "../controls"
|
|
import "../theme"
|
|
|
|
Column {
|
|
property bool kioskHost: false
|
|
id: root
|
|
property var doc: ({})
|
|
|
|
// ============================ NAVIGATION ============================
|
|
GroupHeader { kioskHost: root.kioskHost; text: QbzSession.tr("NAVIGATION", QbzSession.trRev) }
|
|
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
label: QbzSession.tr("Show navigation in sidebar", QbzSession.trRev)
|
|
description: QbzSession.tr("Move the Discover, Library, Local Library and My QBZ sections out of the header and into the sidebar.", QbzSession.trRev)
|
|
QbzToggle { kioskHost: root.kioskHost;
|
|
checked: root.doc.navInSidebar === true
|
|
onToggled: function (v) { QbzBridge.settingsBool("nav-in-sidebar", v) }
|
|
}
|
|
}
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
// ADR-010: only mounted when navigation is NOT in the sidebar.
|
|
visible: root.doc.navInSidebar !== true
|
|
label: QbzSession.tr("Compact header navigation", QbzSession.trRev)
|
|
description: QbzSession.tr("Use the icon-only section navigation in the header even while the sidebar is open.", QbzSession.trRev)
|
|
QbzToggle { kioskHost: root.kioskHost;
|
|
checked: root.doc.navHeaderCompact === true
|
|
onToggled: function (v) { QbzBridge.settingsBool("nav-header-compact", v) }
|
|
}
|
|
}
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
label: QbzSession.tr("My QBZ", QbzSession.trRev)
|
|
description: QbzSession.tr("Rename the My QBZ hub. Leave the name blank (or hit reset) to restore the default.", QbzSession.trRev)
|
|
Row {
|
|
spacing: 8
|
|
QbzLineEdit { kioskHost: root.kioskHost;
|
|
width: 150
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
text: root.doc.myQbzLabel || ""
|
|
placeholder: QbzSession.tr("My QBZ", QbzSession.trRev)
|
|
onCommitted: function (v) { QbzBridge.settingsString("myqbz-label", v) }
|
|
}
|
|
SettingsButton { kioskHost: root.kioskHost;
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
iconName: "rotate-ccw"
|
|
onClicked: QbzBridge.settingsString("myqbz-label", "")
|
|
}
|
|
}
|
|
}
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
label: QbzSession.tr("Show collapsible My QBZ in sidebar", QbzSession.trRev)
|
|
QbzToggle { kioskHost: root.kioskHost;
|
|
checked: root.doc.collapsibleMyqbz === true
|
|
onToggled: function (v) { QbzBridge.settingsBool("collapsible-myqbz", v) }
|
|
}
|
|
}
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
visible: root.doc.collapsibleMyqbz === true
|
|
label: QbzSession.tr("Show Mixtapes", QbzSession.trRev)
|
|
QbzToggle { kioskHost: root.kioskHost;
|
|
checked: root.doc.myqbzShowMixtapes === true
|
|
onToggled: function (v) { QbzBridge.settingsBool("myqbz-show-mixtapes", v) }
|
|
}
|
|
}
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
visible: root.doc.collapsibleMyqbz === true
|
|
label: QbzSession.tr("Show Collections", QbzSession.trRev)
|
|
QbzToggle { kioskHost: root.kioskHost;
|
|
checked: root.doc.myqbzShowCollections === true
|
|
onToggled: function (v) { QbzBridge.settingsBool("myqbz-show-collections", v) }
|
|
}
|
|
}
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
label: QbzSession.tr("Invert swipe navigation direction", QbzSession.trRev)
|
|
description: QbzSession.tr("Swap the two-finger touchpad swipe: left goes back, right goes forward.", QbzSession.trRev)
|
|
QbzToggle { kioskHost: root.kioskHost;
|
|
checked: root.doc.invertSwipeNavigation === true
|
|
onToggled: function (v) { QbzBridge.settingsBool("invert-swipe-navigation", v) }
|
|
}
|
|
}
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
label: QbzSession.tr("Click on menu item navigates to first tab", QbzSession.trRev)
|
|
description: QbzSession.tr("Clicking a section in the sidebar or title bar opens its first tab — including your chosen Local Library default — instead of only showing its menu", QbzSession.trRev)
|
|
QbzToggle { kioskHost: root.kioskHost;
|
|
checked: root.doc.navClickFirstTab === true
|
|
onToggled: function (v) { QbzBridge.settingsBool("nav-click-first-tab", v) }
|
|
}
|
|
}
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
label: QbzSession.tr("Show Purchases", QbzSession.trRev)
|
|
description: QbzSession.tr("Show the Purchases section in the sidebar for browsing and downloading your purchased music", QbzSession.trRev)
|
|
QbzToggle { kioskHost: root.kioskHost;
|
|
checked: root.doc.showPurchases === true
|
|
onToggled: function (v) { QbzBridge.settingsBool("show-purchases", v) }
|
|
}
|
|
}
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
// Nothing to place while the section itself is off (owner
|
|
// 2026-08-21) — absent rather than rendered-and-inert.
|
|
visible: root.doc.showPurchases === true
|
|
label: QbzSession.tr("Purchases in title bar", QbzSession.trRev)
|
|
description: QbzSession.tr("Place the Purchases entry in the custom title bar instead of the sidebar", QbzSession.trRev)
|
|
rowEnabled: !root.tbLocked
|
|
QbzToggle { kioskHost: root.kioskHost;
|
|
enabled: !root.tbLocked
|
|
checked: root.doc.navTbPurchases === true
|
|
onToggled: function (v) { QbzBridge.settingsBool("nav-tb-purchases", v) }
|
|
}
|
|
}
|
|
|
|
SettingsSpacer { }
|
|
SettingsDivider { }
|
|
SettingsSpacer { }
|
|
|
|
// ============================== SEARCH ==============================
|
|
GroupHeader { kioskHost: root.kioskHost; text: QbzSession.tr("SEARCH", QbzSession.trRev) }
|
|
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
label: QbzSession.tr("Intelligent Search", QbzSession.trRev)
|
|
description: QbzSession.tr("Smart search cache, ranking, and the search preview dropdown. On by default.", QbzSession.trRev)
|
|
QbzToggle { kioskHost: root.kioskHost;
|
|
checked: root.doc.intelligentSearch === true
|
|
onToggled: function (v) { QbzBridge.settingsBool("intelligent-search", v) }
|
|
}
|
|
}
|
|
SettingRow { kioskHost: root.kioskHost;
|
|
label: QbzSession.tr("Immersive search", QbzSession.trRev)
|
|
description: QbzSession.tr("What selecting a result in the Immersive search does. Disabled turns the in-immersive search off.", QbzSession.trRev)
|
|
QbzSelect { kioskHost: root.kioskHost;
|
|
menuWidth: 200
|
|
options: root.doc.immersiveSearchActions || []
|
|
currentIndex: root.doc.immersiveSearchActionIndex || 0
|
|
onSelected: function (i) { QbzBridge.settingsSelect("immersive-search-action", i) }
|
|
}
|
|
}
|
|
|
|
Item { width: 1; height: 40 }
|
|
}
|