1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2025-09-05 18:22:46 +00:00

Add support for server-side notifications

This commit is contained in:
Henk Kalkwater 2021-09-09 02:18:10 +02:00
parent 357ac89330
commit 60bc90c5fa
No known key found for this signature in database
GPG key ID: A69C050E9FD9FF6A
14 changed files with 179 additions and 14 deletions

View file

@ -53,6 +53,24 @@ ApplicationWindow {
Keys.onEscapePressed: pop()
}
NotificationList {
id: notifList
anchors {
right: parent.right
bottom: parent.bottom
}
width: Math.min(parent.width, 400)
height: parent.height
Connections {
target: ApiClient.eventbus
onDisplayMessage: {
console.log("Displaying message: ", header, ": ", message)
notifList.addNotification(header, message, timeout)
}
}
}
Connections {
target: ApiClient
onSetupRequired: { pageStack.replace(Qt.resolvedUrl("pages/setup/ServerSelectPage.qml")); }