mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
Add support for server-side notifications
This commit is contained in:
parent
357ac89330
commit
60bc90c5fa
14 changed files with 179 additions and 14 deletions
|
@ -55,7 +55,7 @@ ApplicationWindow {
|
|||
|
||||
PlatformMediaControl {
|
||||
playbackManager: appWindow.playbackManager
|
||||
canQuit: fasle
|
||||
canQuit: false
|
||||
desktopFile: "harbour-sailfin"
|
||||
playerName: "Sailfin"
|
||||
canRaise: true
|
||||
|
@ -100,6 +100,23 @@ ApplicationWindow {
|
|||
}
|
||||
}
|
||||
|
||||
Notification {
|
||||
id: serverNotification
|
||||
//: The application name for the notification
|
||||
appName: qsTr("Sailfin")
|
||||
appIcon: "harbour-sailfin"
|
||||
isTransient: true
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: apiClient.eventbus
|
||||
onDisplayMessage: {
|
||||
serverNotification.summary = header
|
||||
serverNotification.body = message
|
||||
serverNotification.publish()
|
||||
}
|
||||
}
|
||||
|
||||
PlaybackManager {
|
||||
id: _playbackManager
|
||||
apiClient: appWindow.apiClient
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue