Two fronts of the modularization, both gated green before this commit. QML leaves the flat qml/ directory for seven modules: cards, controls, rows, settings, shell, theme, views. Only Main.qml and LoginScreen.qml stay at the root. build.rs matches the tree exactly (55 files), relative imports and asset paths were re-anchored for the new depth. The QbzBridge God-object starts breaking up: QbzSession, QbzShell, QbzPlayer, QbzQueue and QbzHome are now their own #[cxx_qt::bridge] singletons, each with its own OnceLock<CxxQtThread> and ui() hop, booted in order from Main.qml. Bridge files stay directly under src/ because cxx-qt-build only accepts rust_files from one directory (QTBUG-93443). bridge.rs keeps 5.5 domains (library, album/artist, settings, integrations, search, playlist) and dies once they are split out. cc
54 lines
1.8 KiB
QML
54 lines
1.8 KiB
QML
// QbzOfflinePlaceholder — the offline gate (offline/OfflinePlaceholder
|
|
// .slint), consolidated in phase 22 from the TWO verbatim copies
|
|
// (HomeView + LibraryView). Arms: `induced` (offlineMode === 2) switches
|
|
// the body copy; `showSettingsAction` mounts the induced-only "Open
|
|
// Settings" button (POC-NOTE: navigates via QbzShell.navigateTo —
|
|
// the Slint opens Settings the same way).
|
|
|
|
import QtQuick
|
|
import com.blitzfc.qbz
|
|
import "../theme"
|
|
|
|
Column {
|
|
property bool induced: QbzSession.offlineMode === 2
|
|
property bool showSettingsAction: false
|
|
signal settingsClicked()
|
|
|
|
QbzTheme { id: theme }
|
|
|
|
spacing: 0
|
|
QbzIcon {
|
|
name: "cloud-off"
|
|
width: 56
|
|
height: 56
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
tintName: "muted"
|
|
}
|
|
Item { width: 1; height: 18 }
|
|
Text {
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
text: QbzSession.tr("You're offline", QbzSession.trRev)
|
|
color: theme.textPrimary
|
|
font.pixelSize: theme.fontHeading
|
|
font.weight: theme.weightSemibold
|
|
}
|
|
Item { width: 1; height: 8 }
|
|
Text {
|
|
width: 420
|
|
text: induced
|
|
? QbzSession.tr("Offline mode is enabled. Disable it in Settings to use Qobuz.", QbzSession.trRev)
|
|
: QbzSession.tr("No internet connection. Your local library and downloads keep working.", QbzSession.trRev)
|
|
color: theme.textSecondary
|
|
font.pixelSize: theme.fontBody
|
|
horizontalAlignment: Text.AlignHCenter
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
Item { visible: showSettingsAction && induced; width: 1; height: 18 }
|
|
SettingsButton {
|
|
visible: showSettingsAction && induced
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
text: QbzSession.tr("Open Settings", QbzSession.trRev)
|
|
onClicked: parent.settingsClicked()
|
|
}
|
|
}
|