Make the banner buttons work
For invitation accept/decline. Forget remains to be implemented in nio.
This commit is contained in:
@@ -80,6 +80,10 @@ Rectangle {
|
||||
icon.width: 32
|
||||
display: bannerButtons.displayMode
|
||||
|
||||
onClicked:
|
||||
Backend.clientManager.clients[chatPage.userId].
|
||||
call(modelData.clientFunction, modelData.clientArgs)
|
||||
|
||||
Layout.maximumWidth: bannerButtons.compact ? height : -1
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
|
@@ -19,11 +19,15 @@ Banner {
|
||||
text: "Accept",
|
||||
iconName: "accept",
|
||||
iconColor: Qt.hsla(0.45, 0.9, 0.3, 1),
|
||||
clientFunction: "joinRoom",
|
||||
clientArgs: [chatPage.roomId],
|
||||
},
|
||||
{
|
||||
text: "Decline",
|
||||
iconName: "decline",
|
||||
iconColor: Qt.hsla(0.95, 0.9, 0.35, 1),
|
||||
clientFunction: "leaveRoom",
|
||||
clientArgs: [chatPage.roomId],
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -15,6 +15,8 @@ Banner {
|
||||
text: "Forget",
|
||||
iconName: "trash_can",
|
||||
iconColor: Qt.hsla(0.95, 0.9, 0.35, 1),
|
||||
clientFunction: "forgetRoom",
|
||||
clientArgs: [chatPage.roomId],
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user