Add window.makePopup(), utils.makePopup() wrapper
This commit is contained in:
@@ -23,7 +23,7 @@ Banner {
|
||||
|
||||
buttonCallbacks: ({
|
||||
forget: button => {
|
||||
utils.makePopup(
|
||||
window.makePopup(
|
||||
"Popups/ForgetRoomPopup.qml",
|
||||
{
|
||||
userId: chat.userId,
|
||||
@@ -31,7 +31,7 @@ Banner {
|
||||
roomName: chat.roomInfo.display_name,
|
||||
},
|
||||
obj => {
|
||||
obj.onOk.connect(() => { button.loading = true })
|
||||
obj.onOk.connect(() => { button.loading = true }) // FIXME
|
||||
},
|
||||
false,
|
||||
)
|
||||
|
@@ -35,7 +35,7 @@ Item {
|
||||
HShortcut {
|
||||
sequences: window.settings.keys.leaveRoom
|
||||
active: userInfo && userInfo.presence !== "offline"
|
||||
onActivated: utils.makePopup(
|
||||
onActivated: window.makePopup(
|
||||
"Popups/LeaveRoomPopup.qml",
|
||||
{userId, roomId, roomName: roomInfo.display_name},
|
||||
)
|
||||
@@ -44,7 +44,7 @@ Item {
|
||||
HShortcut {
|
||||
sequences: window.settings.keys.forgetRoom
|
||||
active: userInfo && userInfo.presence !== "offline"
|
||||
onActivated: utils.makePopup(
|
||||
onActivated: window.makePopup(
|
||||
"Popups/ForgetRoomPopup.qml",
|
||||
{userId, roomId, roomName: roomInfo.display_name},
|
||||
)
|
||||
|
@@ -165,7 +165,7 @@ HTextArea {
|
||||
}
|
||||
}
|
||||
|
||||
onCustomImagePaste: utils.makePopup(
|
||||
onCustomImagePaste: window.makePopup(
|
||||
"Popups/ConfirmClipboardUploadPopup.qml",
|
||||
{
|
||||
userId: chat.userId,
|
||||
|
@@ -21,7 +21,7 @@ HButton {
|
||||
|
||||
HShortcut {
|
||||
sequences: window.settings.keys.sendFileFromPathInClipboard
|
||||
onActivated: utils.makePopup(
|
||||
onActivated: window.makePopup(
|
||||
"Popups/ConfirmUploadPopup.qml",
|
||||
{
|
||||
userId: chat.userId,
|
||||
|
@@ -134,7 +134,7 @@ HColumnLayout {
|
||||
qsTr("Invite members to this room") :
|
||||
qsTr("No permission to invite members to this room")
|
||||
|
||||
onClicked: utils.makePopup(
|
||||
onClicked: window.makePopup(
|
||||
"Popups/InviteToRoomPopup.qml",
|
||||
{
|
||||
userId: chat.userId,
|
||||
|
@@ -74,7 +74,7 @@ Rectangle {
|
||||
|
||||
enabled: (events && events.length > 0) || events === null
|
||||
sequences: window.settings.keys.removeFocusedOrSelectedMessages
|
||||
onActivated: utils.makePopup(
|
||||
onActivated: window.makePopup(
|
||||
"Popups/RedactPopup.qml",
|
||||
{
|
||||
preferUserId: chat.userId,
|
||||
@@ -200,7 +200,7 @@ Rectangle {
|
||||
|
||||
HShortcut {
|
||||
sequences: window.settings.keys.clearRoomMessages
|
||||
onActivated: utils.makePopup(
|
||||
onActivated: window.makePopup(
|
||||
"Popups/ClearMessagesPopup.qml",
|
||||
{
|
||||
userId: window.uiState.pageProperties.userId,
|
||||
@@ -413,7 +413,7 @@ Rectangle {
|
||||
const fullMxc =
|
||||
forLink || (isAnimated(event) ? "" : event.media_url)
|
||||
|
||||
utils.makePopup(
|
||||
window.makePopup(
|
||||
"Popups/ImageViewerPopup/ImageViewerPopup.qml",
|
||||
{
|
||||
thumbnailTitle: getThumbnailTitle(event),
|
||||
|
Reference in New Issue
Block a user