feat(qt): one-time blind-mode disclaimer on Purchases

The WindowsDisclaimerModal mechanism on the purchases pref seam: a
purchases_disclaimer_seen key seeded on entry, a disclaimerVisible field
in the list document, and an OK that persists the dismissal for good. The
overlay uses the DiscoverConfigModal wheel-lock shape; the scrim does not
dismiss, so a stray click can never acknowledge it. Body ships as msgids
in all locales with the Star Wars line kept in English everywhere.

cc
This commit is contained in:
vicrodh committed 2026-08-31 11:35:45 -06:00
1 parent 5e6daf0e81
commit ad4d48eeef
10 files changed
+196

No files matched your search

+84
View File
@@ -549,4 +549,88 @@ Rectangle {
anchors.bottom: parent.bottom
target: flick
}
// ── One-time disclaimer modal (QoL round) ────────────────────────────
// The WindowsDisclaimerModal mechanism on the purchases pref seam:
// seeded from `purchases_disclaimer_seen` on entry, OK persists it and
// it never returns. Overlay shape + wheel-lock are the
// DiscoverConfigModal pattern (plain Item, not a Popup — each surface
// eats its own wheel; ADR-009 z ≥ 3000). The scrim does NOT dismiss:
// like the Windows disclaimer, the only way out is the button, so a
// stray click cannot silently acknowledge it forever.
Item {
visible: root.doc.disclaimerVisible === true
enabled: visible
anchors.fill: parent
z: 3100
Rectangle {
anchors.fill: parent
radius: theme.radiusMd
color: "#bf000000"
MouseArea {
anchors.fill: parent
onClicked: {}
onWheel: function (wheel) { wheel.accepted = true }
}
}
Rectangle {
width: Math.min(parent.width - 80, 520)
height: Math.min(discCol.implicitHeight + 48, parent.height - 80)
x: Math.round((parent.width - width) / 2)
y: Math.round((parent.height - height) / 2)
radius: theme.radiusMd
color: theme.surfaceCard
border.width: 1
border.color: theme.borderSubtle
clip: true
MouseArea {
anchors.fill: parent
onWheel: function (wheel) { wheel.accepted = true }
}
Column {
id: discCol
x: 24
y: 24
width: parent.width - 48
spacing: 14
Text {
width: parent.width
text: QbzSession.tr("About music purchases", QbzSession.trRev)
color: theme.textPrimary
font.pixelSize: 17
font.weight: Font.DemiBold
wrapMode: Text.WordWrap
}
Text {
width: parent.width
text: QbzSession.tr("Music purchases are not available in every country or region where the platform offers streaming. One of those countries, where nothing can be bought and only the streaming subscription is offered, is Mexico.", QbzSession.trRev)
color: theme.textSecondary
font.pixelSize: 13
wrapMode: Text.WordWrap
}
Text {
width: parent.width
text: QbzSession.tr("As it happens, the developer and maintainer of this software is from Mexico, so this section was built in blind mode — 'I am one with the Force and the Force is with me' — with some feedback from a couple of contributors, but in the end, in blind mode: it ships with no guarantee that it works and no promise to fix whatever is broken.", QbzSession.trRev)
color: theme.textSecondary
font.pixelSize: 13
wrapMode: Text.WordWrap
}
Item {
width: parent.width
height: 32
QbzPrimaryButton {
anchors.right: parent.right
label: QbzSession.tr("OK", QbzSession.trRev)
btnHeight: 32
onClicked: QbzPurchases.dismissDisclaimer()
}
}
}
}
}
}