QML: show daemon availability banner

Expose the Game Center daemon availability to the UI and show\nan inline error banner when it is not reachable, with a retry action.
This commit is contained in:
Marco Allegretti 2026-02-06 14:03:22 +01:00
parent 0485954eb8
commit ded8ad83da

View file

@ -893,23 +893,45 @@ Kirigami.ApplicationWindow {
} }
] ]
LibraryView { ColumnLayout {
id: libraryView
anchors.fill: parent anchors.fill: parent
spacing: 0
filterSource: root.currentSource Kirigami.InlineMessage {
searchActive: root.searchActive id: daemonBanner
Layout.fillWidth: true
adaptiveCardSize: root.adaptiveCardSize Layout.bottomMargin: Kirigami.Units.smallSpacing
isTouchDevice: root.isTouchDevice type: Kirigami.MessageType.Error
visible: !App.launcher.daemonAvailable
onGameSelected: function(game) { text: i18n("Game Center daemon is not running. Game launching is unavailable.")
root.selectedGame = game actions: [
detailsSheet.open() Kirigami.Action {
text: i18n("Retry")
icon.name: "view-refresh"
onTriggered: App.launcher.retryDaemonConnection()
}
]
} }
onGameLaunched: function(game) { LibraryView {
App.launcher.launchGame(game) id: libraryView
Layout.fillWidth: true
Layout.fillHeight: true
filterSource: root.currentSource
searchActive: root.searchActive
adaptiveCardSize: root.adaptiveCardSize
isTouchDevice: root.isTouchDevice
onGameSelected: function(game) {
root.selectedGame = game
detailsSheet.open()
}
onGameLaunched: function(game) {
App.launcher.launchGame(game)
}
} }
} }
} }