status-desktop/ui/imports/shared/popups/ReviewContactRequestPopup.qml
Lukáš Tinkl d9d6d90dc9 [Style] remove legacy Style and its themes
- legacy Style and ThemePalette removed
- moved and deduplicated font definitions into `Theme` (unrelated to a
color palette)
- `Style.current.foo` -> `Theme.foo`
- `Style.current.fooColor` -> `Theme.palette.fooColor`
- upgrade the imports to 5.15
- removed some mode dead components

Fixes #16514
2024-10-22 15:54:31 +02:00

62 lines
1.6 KiB
QML

import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQml.Models 2.15
import StatusQ.Controls 0.1
import StatusQ.Core 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1
import utils 1.0
CommonContactDialog {
id: root
// expected roles: id, from, clock, text, contactRequestState
required property var crDetails
signal accepted(string contactRequestId)
signal discarded(string contactRequestId)
title: qsTr("Review contact request")
Rectangle {
Layout.fillWidth: true
Layout.preferredHeight: msgColumn.implicitHeight + msgColumn.anchors.topMargin + msgColumn.anchors.bottomMargin
color: "transparent"
border.width: 1
border.color: Theme.palette.baseColor2
radius: Theme.radius
ColumnLayout {
id: msgColumn
anchors.fill: parent
anchors.margins: Theme.padding
StatusTimeStampLabel {
Layout.maximumWidth: parent.width
timestamp: crDetails.clock
}
StatusBaseText {
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: crDetails.text
}
}
}
rightButtons: ObjectModel {
StatusFlatButton {
text: qsTr("Ignore")
objectName: "ignoreButton"
onClicked: root.discarded(crDetails.id ?? "")
}
StatusButton {
text: qsTr("Accept")
type: StatusBaseButton.Type.Success
objectName: "acceptButton"
onClicked: root.accepted(crDetails.id ?? "")
}
}
}