mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-26 05:26:00 +00:00
refactor: refactor several popups to make them functional and add them to storybook
This commit is contained in:
parent
5476cde165
commit
540634325d
165
storybook/pages/BlockContactConfirmationDialogPage.qml
Normal file
165
storybook/pages/BlockContactConfirmationDialogPage.qml
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
|
import StatusQ 0.1
|
||||||
|
import StatusQ.Core 0.1
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
import StatusQ.Popups 0.1
|
||||||
|
|
||||||
|
import shared.popups 1.0
|
||||||
|
import Models 1.0
|
||||||
|
|
||||||
|
import utils 1.0
|
||||||
|
import shared.status 1.0
|
||||||
|
|
||||||
|
SplitView {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.fillWidth: true
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Open Block Contact Confirmation Dialog"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
onClicked: blockContactDialog.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: blockContactDialog.implicitWidth
|
||||||
|
Layout.preferredHeight: blockContactDialog.implicitHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
BlockContactConfirmationDialog {
|
||||||
|
id: blockContactDialog
|
||||||
|
visible: false
|
||||||
|
// mainDisplayName: nameInput.text
|
||||||
|
isContact: isContactCheckBox.checked
|
||||||
|
outgoingVerificationStatus: outgoingVerificationStatusSelector.currentValue
|
||||||
|
incomingVerificationStatus: incomingVerificationStatusSelector.currentValue
|
||||||
|
trustStatus: trustStatusSelector.currentValue
|
||||||
|
onAccepted: {
|
||||||
|
blockContactDialog.close()
|
||||||
|
log("Contact blocked: " + nameInput.text)
|
||||||
|
log("Remove Contact: " + blockContactDialog.removeContact)
|
||||||
|
log("Remove ID Verification: " + blockContactDialog.removeIDVerification)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.minimumWidth: 300
|
||||||
|
SplitView.preferredWidth: 400
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Block Contact Dialog Settings"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Name" }
|
||||||
|
TextField {
|
||||||
|
id: nameInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter name"
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: isContactCheckBox
|
||||||
|
text: "Is Contact"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Outgoing Verification Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: outgoingVerificationStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Untrustworthy", value: Constants.verificationStatus.untrustworthy },
|
||||||
|
{ text: "Trusted", value: Constants.verificationStatus.trusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Incoming Verification Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: incomingVerificationStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Untrustworthy", value: Constants.verificationStatus.untrustworthy },
|
||||||
|
{ text: "Trusted", value: Constants.verificationStatus.trusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Trust Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: trustStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Untrusted", value: Constants.trustStatus.untrusted },
|
||||||
|
{ text: "Trusted", value: Constants.trustStatus.trusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add logs section
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Logs"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 150
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
id: logsTextArea
|
||||||
|
readOnly: true
|
||||||
|
wrapMode: TextEdit.Wrap
|
||||||
|
selectByMouse: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Clear Logs"
|
||||||
|
onClicked: logsTextArea.clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add log function
|
||||||
|
function log(message) {
|
||||||
|
var timestamp = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss")
|
||||||
|
logsTextArea.append(timestamp + ": " + message)
|
||||||
|
}
|
||||||
|
}
|
118
storybook/pages/MarkAsIDVerifiedDialogPage.qml
Normal file
118
storybook/pages/MarkAsIDVerifiedDialogPage.qml
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
|
import StatusQ 0.1
|
||||||
|
import StatusQ.Core 0.1
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
import StatusQ.Popups 0.1
|
||||||
|
|
||||||
|
import shared.popups 1.0
|
||||||
|
import Models 1.0
|
||||||
|
|
||||||
|
import utils 1.0
|
||||||
|
import shared.status 1.0
|
||||||
|
|
||||||
|
SplitView {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.fillWidth: true
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Open Mark as ID Verified Dialog"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
onClicked: markAsIDVerifiedDialog.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: markAsIDVerifiedDialog.implicitWidth
|
||||||
|
Layout.preferredHeight: markAsIDVerifiedDialog.implicitHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
MarkAsIDVerifiedDialog {
|
||||||
|
id: markAsIDVerifiedDialog
|
||||||
|
visible: false
|
||||||
|
// mainDisplayName: nameInput.text
|
||||||
|
onAccepted: {
|
||||||
|
markAsIDVerifiedDialog.close()
|
||||||
|
log("User marked as ID verified: " + nameInput.text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.minimumWidth: 300
|
||||||
|
SplitView.preferredWidth: 400
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Mark as ID Verified Dialog Settings"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Name" }
|
||||||
|
TextField {
|
||||||
|
id: nameInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter name"
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add logs section
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Logs"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 150
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
id: logsTextArea
|
||||||
|
readOnly: true
|
||||||
|
wrapMode: TextEdit.Wrap
|
||||||
|
selectByMouse: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Clear Logs"
|
||||||
|
onClicked: logsTextArea.clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add log function
|
||||||
|
function log(message) {
|
||||||
|
var timestamp = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss")
|
||||||
|
logsTextArea.append(timestamp + ": " + message)
|
||||||
|
}
|
||||||
|
}
|
167
storybook/pages/MarkAsUntrustedPopupPage.qml
Normal file
167
storybook/pages/MarkAsUntrustedPopupPage.qml
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
|
import StatusQ 0.1
|
||||||
|
import StatusQ.Core 0.1
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
import StatusQ.Popups 0.1
|
||||||
|
|
||||||
|
import shared.popups 1.0
|
||||||
|
import Models 1.0
|
||||||
|
|
||||||
|
import utils 1.0
|
||||||
|
import shared.status 1.0
|
||||||
|
|
||||||
|
SplitView {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.fillWidth: true
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Open Mark as Untrusted Popup"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
onClicked: markAsUntrustedPopup.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: markAsUntrustedPopup.implicitWidth
|
||||||
|
Layout.preferredHeight: markAsUntrustedPopup.implicitHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
MarkAsUntrustedPopup {
|
||||||
|
id: markAsUntrustedPopup
|
||||||
|
visible: false
|
||||||
|
// mainDisplayName: nameInput.text
|
||||||
|
verificationStatus: verificationStatusSelector.currentValue
|
||||||
|
incomingVerificationStatus: incomingVerificationStatusSelector.currentValue
|
||||||
|
isContact: isContactCheckBox.checked
|
||||||
|
trustStatus: trustStatusSelector.currentValue
|
||||||
|
onAccepted: {
|
||||||
|
markAsUntrustedPopup.close()
|
||||||
|
log("Marked as untrusted: " + nameInput.text)
|
||||||
|
log("Remove ID Verification: " + markAsUntrustedPopup.removeIDVerification)
|
||||||
|
log("Remove Contact: " + markAsUntrustedPopup.removeContact)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.minimumWidth: 300
|
||||||
|
SplitView.preferredWidth: 400
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Mark as Untrusted Popup Settings"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Name" }
|
||||||
|
TextField {
|
||||||
|
id: nameInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter name"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Verification Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: verificationStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Unverified", value: Constants.verificationStatus.unverified },
|
||||||
|
{ text: "Untrustworthy", value: Constants.verificationStatus.untrustworthy },
|
||||||
|
{ text: "Trusted", value: Constants.verificationStatus.trusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Incoming Verification Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: incomingVerificationStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Unverified", value: Constants.verificationStatus.unverified },
|
||||||
|
{ text: "Untrustworthy", value: Constants.verificationStatus.untrustworthy },
|
||||||
|
{ text: "Trusted", value: Constants.verificationStatus.trusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: isContactCheckBox
|
||||||
|
text: "Is Contact"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Trust Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: trustStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Untrusted", value: Constants.trustStatus.untrusted },
|
||||||
|
{ text: "Trusted", value: Constants.trustStatus.trusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add logs section
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Logs"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 150
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
id: logsTextArea
|
||||||
|
readOnly: true
|
||||||
|
wrapMode: TextEdit.Wrap
|
||||||
|
selectByMouse: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Clear Logs"
|
||||||
|
onClicked: logsTextArea.clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add log function
|
||||||
|
function log(message) {
|
||||||
|
var timestamp = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss")
|
||||||
|
logsTextArea.append(timestamp + ": " + message)
|
||||||
|
}
|
||||||
|
}
|
236
storybook/pages/NicknamePopupPage.qml
Normal file
236
storybook/pages/NicknamePopupPage.qml
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
|
import StatusQ 0.1
|
||||||
|
import StatusQ.Core 0.1
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
import StatusQ.Popups 0.1
|
||||||
|
|
||||||
|
import shared.popups 1.0
|
||||||
|
import Models 1.0
|
||||||
|
|
||||||
|
import utils 1.0
|
||||||
|
import shared.views.chat 1.0
|
||||||
|
import shared.status 1.0
|
||||||
|
|
||||||
|
SplitView {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.fillWidth: true
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Open Add Nickname Popup"
|
||||||
|
onClicked: {
|
||||||
|
nicknamePopup.nickname = ""
|
||||||
|
nicknamePopup.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Open Edit Nickname Popup"
|
||||||
|
onClicked: {
|
||||||
|
nicknamePopup.nickname = nicknameInput.text
|
||||||
|
nicknamePopup.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: nicknamePopup.implicitWidth
|
||||||
|
Layout.preferredHeight: nicknamePopup.implicitHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
NicknamePopup {
|
||||||
|
id: nicknamePopup
|
||||||
|
visible: false
|
||||||
|
nickname: nicknameInput.text
|
||||||
|
publicKey: publicKeyInput.text
|
||||||
|
localNickname: localNicknameInput.text
|
||||||
|
name: nameInput.text
|
||||||
|
displayName: displayNameInput.text
|
||||||
|
alias: aliasInput.text
|
||||||
|
ensVerified: ensVerifiedCheckBox.checked
|
||||||
|
onlineStatus: onlineStatusSelector.currentValue
|
||||||
|
largeImage: largeImageInput.text
|
||||||
|
isContact: isContactCheckBox.checked
|
||||||
|
trustStatus: trustStatusSelector.currentValue
|
||||||
|
isBlocked: isBlockedCheckBox.checked
|
||||||
|
onEditDone: function(newNickname) {
|
||||||
|
nicknamePopup.close()
|
||||||
|
log("Nickname edited: " + newNickname)
|
||||||
|
}
|
||||||
|
onRemoveNicknameRequested: {
|
||||||
|
nicknamePopup.close()
|
||||||
|
log("Nickname removed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.minimumWidth: 300
|
||||||
|
SplitView.preferredWidth: 400
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Nickname Popup Settings"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Nickname" }
|
||||||
|
TextField {
|
||||||
|
id: nicknameInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter nickname"
|
||||||
|
text: nicknamePopup.nickname
|
||||||
|
onTextChanged: {
|
||||||
|
nicknamePopup.nickname = text
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Public Key" }
|
||||||
|
TextField {
|
||||||
|
id: publicKeyInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter public key"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Local Nickname" }
|
||||||
|
TextField {
|
||||||
|
id: localNicknameInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Local Nickname"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Name" }
|
||||||
|
TextField {
|
||||||
|
id: nameInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Name"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Display Name" }
|
||||||
|
TextField {
|
||||||
|
id: displayNameInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Display Name"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Alias" }
|
||||||
|
TextField {
|
||||||
|
id: aliasInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Alias"
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: ensVerifiedCheckBox
|
||||||
|
text: "ENS Verified"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Online Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: onlineStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Offline", value: Constants.onlineStatus.inactive },
|
||||||
|
{ text: "Online", value: Constants.onlineStatus.online },
|
||||||
|
{ text: "Away", value: Constants.onlineStatus.away },
|
||||||
|
{ text: "Busy", value: Constants.onlineStatus.busy }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Large Image URL" }
|
||||||
|
TextField {
|
||||||
|
id: largeImageInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Large Image URL"
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: isContactCheckBox
|
||||||
|
text: "Is Contact"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Trust Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: trustStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Untrusted", value: Constants.trustStatus.unknown },
|
||||||
|
{ text: "Trusted", value: Constants.trustStatus.trusted },
|
||||||
|
{ text: "Verified", value: Constants.trustStatus.verifiedTrusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: isBlockedCheckBox
|
||||||
|
text: "Is Blocked"
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add logs section
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Logs"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 150
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
id: logsTextArea
|
||||||
|
readOnly: true
|
||||||
|
wrapMode: TextEdit.Wrap
|
||||||
|
selectByMouse: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Clear Logs"
|
||||||
|
onClicked: logsTextArea.clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add log function
|
||||||
|
function log(message) {
|
||||||
|
var timestamp = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss")
|
||||||
|
logsTextArea.append(timestamp + ": " + message)
|
||||||
|
}
|
||||||
|
}
|
185
storybook/pages/OutgoingContactVerificationRequestPopupPage.qml
Normal file
185
storybook/pages/OutgoingContactVerificationRequestPopupPage.qml
Normal file
@ -0,0 +1,185 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
|
import StatusQ 0.1
|
||||||
|
import StatusQ.Core 0.1
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
import StatusQ.Popups 0.1
|
||||||
|
|
||||||
|
import shared.popups 1.0
|
||||||
|
import Models 1.0
|
||||||
|
|
||||||
|
import utils 1.0
|
||||||
|
import shared.status 1.0
|
||||||
|
|
||||||
|
SplitView {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.fillWidth: true
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Open Outgoing Contact Verification Request Popup"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
onClicked: verificationRequestPopup.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: verificationRequestPopup.implicitWidth
|
||||||
|
Layout.preferredHeight: verificationRequestPopup.implicitHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
OutgoingContactVerificationRequestPopup {
|
||||||
|
id: verificationRequestPopup
|
||||||
|
visible: false
|
||||||
|
verificationStatus: verificationStatusSelector.currentValue
|
||||||
|
verificationChallenge: challengeInput.text
|
||||||
|
verificationResponse: responseInput.text
|
||||||
|
verificationResponseDisplayName: nameInput.text
|
||||||
|
verificationResponseIcon: iconInput.text
|
||||||
|
verificationRequestedAt: requestedAtInput.text
|
||||||
|
verificationRepliedAt: repliedAtInput.text
|
||||||
|
ensVerified: ensVerifiedCheckBox.checked
|
||||||
|
onVerificationRequestCanceled: {
|
||||||
|
log("Verification request canceled")
|
||||||
|
}
|
||||||
|
onUntrustworthyVerified: {
|
||||||
|
log("Marked as untrusted")
|
||||||
|
}
|
||||||
|
onTrustedVerified: {
|
||||||
|
log("Marked as verified")
|
||||||
|
}
|
||||||
|
onOnLinkActivated: {
|
||||||
|
log("Link activated")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.minimumWidth: 300
|
||||||
|
SplitView.preferredWidth: 400
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Verification Request Popup Settings"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Name" }
|
||||||
|
TextField {
|
||||||
|
id: nameInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter name"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Icon" }
|
||||||
|
TextField {
|
||||||
|
id: iconInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter icon"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Verification Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: verificationStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Untrustworthy", value: Constants.verificationStatus.untrustworthy },
|
||||||
|
{ text: "Trusted", value: Constants.verificationStatus.trusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Challenge" }
|
||||||
|
TextField {
|
||||||
|
id: challengeInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter challenge"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Response" }
|
||||||
|
TextField {
|
||||||
|
id: responseInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter response"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Requested At" }
|
||||||
|
TextField {
|
||||||
|
id: requestedAtInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter requested time"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Replied At" }
|
||||||
|
TextField {
|
||||||
|
id: repliedAtInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter replied time"
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckBox {
|
||||||
|
id: ensVerifiedCheckBox
|
||||||
|
text: "ENS Verified"
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add logs section
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Logs"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 150
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
id: logsTextArea
|
||||||
|
readOnly: true
|
||||||
|
wrapMode: TextEdit.Wrap
|
||||||
|
selectByMouse: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Clear Logs"
|
||||||
|
onClicked: logsTextArea.clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add log function
|
||||||
|
function log(message) {
|
||||||
|
var timestamp = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss")
|
||||||
|
logsTextArea.append(timestamp + ": " + message)
|
||||||
|
}
|
||||||
|
}
|
162
storybook/pages/RemoveContactPopupPage.qml
Normal file
162
storybook/pages/RemoveContactPopupPage.qml
Normal file
@ -0,0 +1,162 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
|
import StatusQ 0.1
|
||||||
|
import StatusQ.Core 0.1
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
import StatusQ.Popups 0.1
|
||||||
|
|
||||||
|
import shared.popups 1.0
|
||||||
|
import Models 1.0
|
||||||
|
|
||||||
|
import utils 1.0
|
||||||
|
import shared.status 1.0
|
||||||
|
|
||||||
|
SplitView {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.fillWidth: true
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Open Remove Contact Popup"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
onClicked: removeContactPopup.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: removeContactPopup.implicitWidth
|
||||||
|
Layout.preferredHeight: removeContactPopup.implicitHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
RemoveContactPopup {
|
||||||
|
id: removeContactPopup
|
||||||
|
visible: false
|
||||||
|
// mainDisplayName: nameInput.text
|
||||||
|
outgoingVerificationStatus: outgoingVerificationStatusSelector.currentValue
|
||||||
|
incomingVerificationStatus: incomingVerificationStatusSelector.currentValue
|
||||||
|
trustStatus: trustStatusSelector.currentValue
|
||||||
|
onAccepted: {
|
||||||
|
removeContactPopup.close()
|
||||||
|
log("Contact removed: " + nameInput.text)
|
||||||
|
log("Remove ID Verification: " + removeContactPopup.removeIDVerification)
|
||||||
|
log("Mark as Untrusted: " + removeContactPopup.markAsUntrusted)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.minimumWidth: 300
|
||||||
|
SplitView.preferredWidth: 400
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Remove Contact Popup Settings"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Name" }
|
||||||
|
TextField {
|
||||||
|
id: nameInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter name"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Outgoing Verification Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: outgoingVerificationStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Unverified", value: Constants.verificationStatus.unverified },
|
||||||
|
{ text: "Untrustworthy", value: Constants.verificationStatus.untrustworthy },
|
||||||
|
{ text: "Trusted", value: Constants.verificationStatus.trusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Incoming Verification Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: incomingVerificationStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Unverified", value: Constants.verificationStatus.unverified },
|
||||||
|
{ text: "Untrustworthy", value: Constants.verificationStatus.untrustworthy },
|
||||||
|
{ text: "Trusted", value: Constants.verificationStatus.trusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Trust Status" }
|
||||||
|
ComboBox {
|
||||||
|
id: trustStatusSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "None", value: Constants.trustStatus.none },
|
||||||
|
{ text: "Untrusted", value: Constants.trustStatus.untrustworthy },
|
||||||
|
{ text: "Trusted", value: Constants.trustStatus.trusted }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add logs section
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Logs"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 150
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
id: logsTextArea
|
||||||
|
readOnly: true
|
||||||
|
wrapMode: TextEdit.Wrap
|
||||||
|
selectByMouse: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Clear Logs"
|
||||||
|
onClicked: logsTextArea.clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add log function
|
||||||
|
function log(message) {
|
||||||
|
var timestamp = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss")
|
||||||
|
logsTextArea.append(timestamp + ": " + message)
|
||||||
|
}
|
||||||
|
}
|
120
storybook/pages/RemoveIDVerificationDialogPage.qml
Normal file
120
storybook/pages/RemoveIDVerificationDialogPage.qml
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
|
import StatusQ 0.1
|
||||||
|
import StatusQ.Core 0.1
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
import StatusQ.Popups 0.1
|
||||||
|
|
||||||
|
import shared.popups 1.0
|
||||||
|
import Models 1.0
|
||||||
|
|
||||||
|
import utils 1.0
|
||||||
|
import shared.status 1.0
|
||||||
|
|
||||||
|
SplitView {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.fillWidth: true
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Open Remove ID Verification Dialog"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
onClicked: removeIDVerificationDialog.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: removeIDVerificationDialog.implicitWidth
|
||||||
|
Layout.preferredHeight: removeIDVerificationDialog.implicitHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
RemoveIDVerificationDialog {
|
||||||
|
id: removeIDVerificationDialog
|
||||||
|
visible: false
|
||||||
|
// mainDisplayName: nameInput.text
|
||||||
|
onAccepted: {
|
||||||
|
removeIDVerificationDialog.close()
|
||||||
|
log("ID Verification removed for: " + nameInput.text)
|
||||||
|
log("Mark as Untrusted: " + removeIDVerificationDialog.markAsUntrusted)
|
||||||
|
log("Remove Contact: " + removeIDVerificationDialog.removeContact)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.minimumWidth: 300
|
||||||
|
SplitView.preferredWidth: 400
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Remove ID Verification Dialog Settings"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Name" }
|
||||||
|
TextField {
|
||||||
|
id: nameInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter name"
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add logs section
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Logs"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 150
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
id: logsTextArea
|
||||||
|
readOnly: true
|
||||||
|
wrapMode: TextEdit.Wrap
|
||||||
|
selectByMouse: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Clear Logs"
|
||||||
|
onClicked: logsTextArea.clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add log function
|
||||||
|
function log(message) {
|
||||||
|
var timestamp = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss")
|
||||||
|
logsTextArea.append(timestamp + ": " + message)
|
||||||
|
}
|
||||||
|
}
|
161
storybook/pages/ReviewContactRequestPopupPage.qml
Normal file
161
storybook/pages/ReviewContactRequestPopupPage.qml
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
import QtQuick 2.15
|
||||||
|
import QtQuick.Controls 2.15
|
||||||
|
import QtQuick.Layouts 1.15
|
||||||
|
|
||||||
|
import StatusQ 0.1
|
||||||
|
import StatusQ.Core 0.1
|
||||||
|
import StatusQ.Core.Theme 0.1
|
||||||
|
import StatusQ.Popups 0.1
|
||||||
|
|
||||||
|
import shared.popups 1.0
|
||||||
|
import Models 1.0
|
||||||
|
|
||||||
|
import utils 1.0
|
||||||
|
import shared.status 1.0
|
||||||
|
|
||||||
|
SplitView {
|
||||||
|
id: root
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.fillWidth: true
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 20
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: 50
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Open Review Contact Request Popup"
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
onClicked: reviewContactRequestPopup.open()
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.preferredWidth: reviewContactRequestPopup.implicitWidth
|
||||||
|
Layout.preferredHeight: reviewContactRequestPopup.implicitHeight
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
||||||
|
ReviewContactRequestPopup {
|
||||||
|
id: reviewContactRequestPopup
|
||||||
|
visible: false
|
||||||
|
contactRequestId: contactRequestIdInput.text
|
||||||
|
fromAddress: fromAddressInput.text
|
||||||
|
clock: clockInput.value
|
||||||
|
text: messageInput.text
|
||||||
|
contactRequestState: contactRequestStateSelector.currentValue
|
||||||
|
onAccepted: {
|
||||||
|
reviewContactRequestPopup.close()
|
||||||
|
log("Contact request accepted")
|
||||||
|
}
|
||||||
|
onDiscarded: {
|
||||||
|
reviewContactRequestPopup.close()
|
||||||
|
log("Contact request ignored")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
SplitView.minimumWidth: 300
|
||||||
|
SplitView.preferredWidth: 400
|
||||||
|
SplitView.fillHeight: true
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
anchors.fill: parent
|
||||||
|
spacing: 16
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Review Contact Request Popup Settings"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Contact Request ID" }
|
||||||
|
TextField {
|
||||||
|
id: contactRequestIdInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter contact request ID"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "From Address" }
|
||||||
|
TextField {
|
||||||
|
id: fromAddressInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter from address"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Clock" }
|
||||||
|
SpinBox {
|
||||||
|
id: clockInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
from: 0
|
||||||
|
to: 2147483647 // Max 32-bit integer
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Message" }
|
||||||
|
TextArea {
|
||||||
|
id: messageInput
|
||||||
|
Layout.fillWidth: true
|
||||||
|
placeholderText: "Enter contact request message"
|
||||||
|
}
|
||||||
|
|
||||||
|
Label { text: "Contact Request State" }
|
||||||
|
ComboBox {
|
||||||
|
id: contactRequestStateSelector
|
||||||
|
Layout.fillWidth: true
|
||||||
|
textRole: "text"
|
||||||
|
valueRole: "value"
|
||||||
|
model: [
|
||||||
|
{ text: "Pending", value: 0 },
|
||||||
|
{ text: "Accepted", value: 1 },
|
||||||
|
{ text: "Declined", value: 2 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add logs section
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 8
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: "Logs"
|
||||||
|
font.bold: true
|
||||||
|
font.pixelSize: 16
|
||||||
|
}
|
||||||
|
|
||||||
|
ScrollView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: 150
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
TextArea {
|
||||||
|
id: logsTextArea
|
||||||
|
readOnly: true
|
||||||
|
wrapMode: TextEdit.Wrap
|
||||||
|
selectByMouse: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
text: "Clear Logs"
|
||||||
|
onClicked: logsTextArea.clear()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add log function
|
||||||
|
function log(message) {
|
||||||
|
var timestamp = new Date().toLocaleTimeString(Qt.locale(), "HH:mm:ss")
|
||||||
|
logsTextArea.append(timestamp + ": " + message)
|
||||||
|
}
|
||||||
|
}
|
@ -151,15 +151,51 @@ QtObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openNicknamePopup(publicKey: string, contactDetails, cb) {
|
function openNicknamePopup(publicKey: string, contactDetails, cb) {
|
||||||
openPopup(nicknamePopupComponent, {publicKey, contactDetails}, cb)
|
openPopup(nicknamePopupComponent, {
|
||||||
|
publicKey: publicKey,
|
||||||
|
localNickname: contactDetails.localNickname,
|
||||||
|
name: contactDetails.name,
|
||||||
|
displayName: contactDetails.displayName,
|
||||||
|
alias: contactDetails.alias,
|
||||||
|
ensVerified: contactDetails.ensVerified,
|
||||||
|
onlineStatus: contactDetails.onlineStatus,
|
||||||
|
largeImage: contactDetails.largeImage,
|
||||||
|
isContact: contactDetails.isContact,
|
||||||
|
trustStatus: contactDetails.trustStatus,
|
||||||
|
isBlocked: contactDetails.isBlocked
|
||||||
|
}, cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
function openMarkAsUntrustedPopup(publicKey: string, contactDetails) {
|
function openMarkAsUntrustedPopup(publicKey: string, contactDetails) {
|
||||||
openPopup(markAsUntrustedComponent, {publicKey, contactDetails})
|
openPopup(markAsUntrustedComponent, {
|
||||||
|
publicKey: publicKey,
|
||||||
|
localNickname: contactDetails.localNickname,
|
||||||
|
name: contactDetails.name,
|
||||||
|
displayName: contactDetails.displayName,
|
||||||
|
alias: contactDetails.alias,
|
||||||
|
ensVerified: contactDetails.ensVerified,
|
||||||
|
onlineStatus: contactDetails.onlineStatus,
|
||||||
|
largeImage: contactDetails.largeImage,
|
||||||
|
isContact: contactDetails.isContact,
|
||||||
|
trustStatus: contactDetails.trustStatus,
|
||||||
|
isBlocked: contactDetails.isBlocked
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function openBlockContactPopup(publicKey: string, contactDetails) {
|
function openBlockContactPopup(publicKey: string, contactDetails) {
|
||||||
openPopup(blockContactConfirmationComponent, {publicKey, contactDetails})
|
openPopup(blockContactConfirmationComponent, {
|
||||||
|
publicKey: publicKey,
|
||||||
|
localNickname: contactDetails.localNickname,
|
||||||
|
name: contactDetails.name,
|
||||||
|
displayName: contactDetails.displayName,
|
||||||
|
alias: contactDetails.alias,
|
||||||
|
ensVerified: contactDetails.ensVerified,
|
||||||
|
onlineStatus: contactDetails.onlineStatus,
|
||||||
|
largeImage: contactDetails.largeImage,
|
||||||
|
isContact: contactDetails.isContact,
|
||||||
|
trustStatus: contactDetails.trustStatus,
|
||||||
|
isBlocked: contactDetails.isBlocked
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function openUnblockContactPopup(publicKey: string, contactDetails) {
|
function openUnblockContactPopup(publicKey: string, contactDetails) {
|
||||||
@ -191,11 +227,35 @@ QtObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openMarkAsIDVerifiedPopup(publicKey, contactDetails, cb) {
|
function openMarkAsIDVerifiedPopup(publicKey, contactDetails, cb) {
|
||||||
openPopup(markAsIDVerifiedPopupComponent, {publicKey, contactDetails}, cb)
|
openPopup(markAsIDVerifiedPopupComponent, {
|
||||||
|
publicKey: publicKey,
|
||||||
|
localNickname: contactDetails.localNickname,
|
||||||
|
name: contactDetails.name,
|
||||||
|
displayName: contactDetails.displayName,
|
||||||
|
alias: contactDetails.alias,
|
||||||
|
ensVerified: contactDetails.ensVerified,
|
||||||
|
onlineStatus: contactDetails.onlineStatus,
|
||||||
|
largeImage: contactDetails.largeImage,
|
||||||
|
isContact: contactDetails.isContact,
|
||||||
|
trustStatus: contactDetails.trustStatus,
|
||||||
|
isBlocked: contactDetails.isBlocked
|
||||||
|
}, cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
function openRemoveIDVerificationDialog(publicKey, contactDetails, cb) {
|
function openRemoveIDVerificationDialog(publicKey, contactDetails, cb) {
|
||||||
openPopup(removeIDVerificationPopupComponent, {publicKey, contactDetails}, cb)
|
openPopup(removeIDVerificationPopupComponent, {
|
||||||
|
publicKey: publicKey,
|
||||||
|
localNickname: contactDetails.localNickname,
|
||||||
|
name: contactDetails.name,
|
||||||
|
displayName: contactDetails.displayName,
|
||||||
|
alias: contactDetails.alias,
|
||||||
|
ensVerified: contactDetails.ensVerified,
|
||||||
|
onlineStatus: contactDetails.onlineStatus,
|
||||||
|
largeImage: contactDetails.largeImage,
|
||||||
|
isContact: contactDetails.isContact,
|
||||||
|
trustStatus: contactDetails.trustStatus,
|
||||||
|
isBlocked: contactDetails.isBlocked
|
||||||
|
}, cb)
|
||||||
}
|
}
|
||||||
|
|
||||||
function openOutgoingIDRequestPopup(publicKey, contactDetails, cb) {
|
function openOutgoingIDRequestPopup(publicKey, contactDetails, cb) {
|
||||||
@ -211,7 +271,17 @@ QtObject {
|
|||||||
verificationResponseDisplayName: verificationDetails.displayName,
|
verificationResponseDisplayName: verificationDetails.displayName,
|
||||||
verificationResponseIcon: verificationDetails.icon,
|
verificationResponseIcon: verificationDetails.icon,
|
||||||
verificationRequestedAt: verificationDetails.requestedAt,
|
verificationRequestedAt: verificationDetails.requestedAt,
|
||||||
verificationRepliedAt: verificationDetails.repliedAt
|
verificationRepliedAt: verificationDetails.repliedAt,
|
||||||
|
localNickname: contactDetails.localNickname,
|
||||||
|
name: contactDetails.name,
|
||||||
|
displayName: contactDetails.displayName,
|
||||||
|
alias: contactDetails.alias,
|
||||||
|
ensVerified: contactDetails.ensVerified,
|
||||||
|
onlineStatus: contactDetails.onlineStatus,
|
||||||
|
largeImage: contactDetails.largeImage,
|
||||||
|
isContact: contactDetails.isContact,
|
||||||
|
trustStatus: contactDetails.trustStatus,
|
||||||
|
isBlocked: contactDetails.isBlocked
|
||||||
}
|
}
|
||||||
openPopup(contactOutgoingVerificationRequestPopupComponent, popupProperties, cb)
|
openPopup(contactOutgoingVerificationRequestPopupComponent, popupProperties, cb)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -252,7 +322,7 @@ QtObject {
|
|||||||
console.warn("Popups.openReviewContactRequestPopup: not matching publicKey:", publicKey)
|
console.warn("Popups.openReviewContactRequestPopup: not matching publicKey:", publicKey)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
openPopup(reviewContactRequestPopupComponent, {publicKey, contactDetails, crDetails}, cb)
|
openPopup(reviewContactRequestPopupComponent, {publicKey, contactDetails, ...crDetails}, cb)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Popups.openReviewContactRequestPopup: error getting or parsing contact request data", e)
|
console.error("Popups.openReviewContactRequestPopup: error getting or parsing contact request data", e)
|
||||||
}
|
}
|
||||||
@ -315,7 +385,21 @@ QtObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openRemoveContactConfirmationPopup(publicKey, contactDetails) {
|
function openRemoveContactConfirmationPopup(publicKey, contactDetails) {
|
||||||
openPopup(removeContactConfirmationDialog, {publicKey, contactDetails})
|
openPopup(removeContactConfirmationDialog, {
|
||||||
|
publicKey: publicKey,
|
||||||
|
localNickname: contactDetails.localNickname,
|
||||||
|
name: contactDetails.name,
|
||||||
|
displayName: contactDetails.displayName,
|
||||||
|
alias: contactDetails.alias,
|
||||||
|
ensVerified: contactDetails.ensVerified,
|
||||||
|
onlineStatus: contactDetails.onlineStatus,
|
||||||
|
largeImage: contactDetails.largeImage,
|
||||||
|
isContact: contactDetails.isContact,
|
||||||
|
trustStatus: contactDetails.trustStatus,
|
||||||
|
isBlocked: contactDetails.isBlocked,
|
||||||
|
outgoingVerificationStatus: contactDetails.outgoingVerificationStatus,
|
||||||
|
incomingVerificationStatus: contactDetails.incomingVerificationStatus,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function openDeleteMessagePopup(messageId, messageStore) {
|
function openDeleteMessagePopup(messageId, messageStore) {
|
||||||
@ -409,15 +493,16 @@ QtObject {
|
|||||||
Component {
|
Component {
|
||||||
id: removeContactConfirmationDialog
|
id: removeContactConfirmationDialog
|
||||||
RemoveContactPopup {
|
RemoveContactPopup {
|
||||||
|
id: removeContactPopup
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
rootStore.contactStore.removeContact(publicKey)
|
rootStore.contactStore.removeContact(removeContactPopup.publicKey)
|
||||||
if (removeIDVerification)
|
if (removeContactPopup.removeIDVerification)
|
||||||
rootStore.contactStore.removeTrustVerificationStatus(publicKey)
|
rootStore.contactStore.removeTrustVerificationStatus(removeContactPopup.publicKey)
|
||||||
if (markAsUntrusted) {
|
if (removeContactPopup.markAsUntrusted) {
|
||||||
rootStore.contactStore.markUntrustworthy(publicKey)
|
rootStore.contactStore.markUntrustworthy(removeContactPopup.publicKey)
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 removed from contacts and marked as untrusted").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 removed from contacts and marked as untrusted").arg(removeContactPopup.mainDisplayName))
|
||||||
} else {
|
} else {
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 removed from contacts").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 removed from contacts").arg(removeContactPopup.mainDisplayName))
|
||||||
}
|
}
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
@ -443,16 +528,21 @@ QtObject {
|
|||||||
Component {
|
Component {
|
||||||
id: contactOutgoingVerificationRequestPopupComponent
|
id: contactOutgoingVerificationRequestPopupComponent
|
||||||
OutgoingContactVerificationRequestPopup {
|
OutgoingContactVerificationRequestPopup {
|
||||||
onVerificationRequestCanceled: {
|
id: outgoingContactVerificationRequestPopup
|
||||||
rootStore.contactStore.cancelVerificationRequest(publicKey)
|
onVerificationRequestCanceled: rootStore.contactStore.cancelVerificationRequest(outgoingContactVerificationRequestPopup.publicKey)
|
||||||
}
|
|
||||||
onUntrustworthyVerified: {
|
onUntrustworthyVerified: {
|
||||||
rootStore.contactStore.verifiedUntrustworthy(publicKey)
|
rootStore.contactStore.verifiedUntrustworthy(outgoingContactVerificationRequestPopup.publicKey)
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 marked as untrusted").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 marked as untrusted").arg(outgoingContactVerificationRequestPopup.mainDisplayName))
|
||||||
}
|
}
|
||||||
onTrustedVerified: {
|
onTrustedVerified: {
|
||||||
rootStore.contactStore.verifiedTrusted(publicKey)
|
rootStore.contactStore.verifiedTrusted(outgoingContactVerificationRequestPopup.publicKey)
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 ID verified").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 ID verified").arg(outgoingContactVerificationRequestPopup.mainDisplayName))
|
||||||
|
}
|
||||||
|
onLinkActivated: {
|
||||||
|
rootStore.contactStore.cancelVerificationRequest(outgoingContactVerificationRequestPopup.publicKey)
|
||||||
|
outgoingContactVerificationRequestPopup.close()
|
||||||
|
const contactDetails = Utils.getContactDetailsAsJson(outgoingContactVerificationRequestPopup.publicKey)
|
||||||
|
Global.openSendIDRequestPopup(outgoingContactVerificationRequestPopup.publicKey, contactDetails, null)
|
||||||
}
|
}
|
||||||
onClosed: destroy()
|
onClosed: destroy()
|
||||||
}
|
}
|
||||||
@ -470,9 +560,10 @@ QtObject {
|
|||||||
Component {
|
Component {
|
||||||
id: markAsIDVerifiedPopupComponent
|
id: markAsIDVerifiedPopupComponent
|
||||||
MarkAsIDVerifiedDialog {
|
MarkAsIDVerifiedDialog {
|
||||||
|
id: markAsIDVerifiedPopupView
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
rootStore.contactStore.markAsTrusted(publicKey)
|
rootStore.contactStore.markAsTrusted(markAsIDVerifiedPopupView.publicKey)
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 ID verified").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 ID verified").arg(markAsIDVerifiedPopupView.mainDisplayName))
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
onClosed: destroy()
|
onClosed: destroy()
|
||||||
@ -482,21 +573,22 @@ QtObject {
|
|||||||
Component {
|
Component {
|
||||||
id: removeIDVerificationPopupComponent
|
id: removeIDVerificationPopupComponent
|
||||||
RemoveIDVerificationDialog {
|
RemoveIDVerificationDialog {
|
||||||
|
id: removeIDVerificationPopup
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
rootStore.contactStore.removeTrustVerificationStatus(publicKey)
|
rootStore.contactStore.removeTrustVerificationStatus(removeIDVerificationPopup.publicKey)
|
||||||
|
|
||||||
if (markAsUntrusted && removeContact) {
|
if (removeIDVerificationPopup.markAsUntrusted && removeIDVerificationPopup.removeContact) {
|
||||||
rootStore.contactStore.markUntrustworthy(publicKey)
|
rootStore.contactStore.markUntrustworthy(removeIDVerificationPopup.publicKey)
|
||||||
rootStore.contactStore.removeContact(publicKey)
|
rootStore.contactStore.removeContact(removeIDVerificationPopup.publicKey)
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 ID verification removed, removed from contacts and marked as untrusted").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 ID verification removed, removed from contacts and marked as untrusted").arg(removeIDVerificationPopup.mainDisplayName))
|
||||||
} else if (markAsUntrusted) {
|
} else if (removeIDVerificationPopup.markAsUntrusted) {
|
||||||
rootStore.contactStore.markUntrustworthy(publicKey)
|
rootStore.contactStore.markUntrustworthy(removeIDVerificationPopup.publicKey)
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 ID verification removed and marked as untrusted").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 ID verification removed and marked as untrusted").arg(removeIDVerificationPopup.mainDisplayName))
|
||||||
} else if (removeContact) {
|
} else if (removeIDVerificationPopup.removeContact) {
|
||||||
rootStore.contactStore.removeContact(publicKey)
|
rootStore.contactStore.removeContact(removeIDVerificationPopup.publicKey)
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 ID verification removed and removed from contacts").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 ID verification removed and removed from contacts").arg(removeIDVerificationPopup.mainDisplayName))
|
||||||
} else {
|
} else {
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 ID verification removed").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 ID verification removed").arg(removeIDVerificationPopup.mainDisplayName))
|
||||||
}
|
}
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
@ -526,13 +618,14 @@ QtObject {
|
|||||||
Component {
|
Component {
|
||||||
id: reviewContactRequestPopupComponent
|
id: reviewContactRequestPopupComponent
|
||||||
ReviewContactRequestPopup {
|
ReviewContactRequestPopup {
|
||||||
|
id: reviewContactRequestPopup
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
rootStore.contactStore.acceptContactRequest(publicKey, contactRequestId)
|
rootStore.contactStore.acceptContactRequest(reviewContactRequestPopup.publicKey, reviewContactRequestPopup.contactRequestId)
|
||||||
Global.displaySuccessToastMessage(qsTr("Contact request accepted"))
|
Global.displaySuccessToastMessage(qsTr("Contact request accepted"))
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
onDiscarded: {
|
onDiscarded: {
|
||||||
rootStore.contactStore.dismissContactRequest(publicKey, contactRequestId)
|
rootStore.contactStore.dismissContactRequest(reviewContactRequestPopup.publicKey, reviewContactRequestPopup.contactRequestId)
|
||||||
Global.displaySuccessToastMessage(qsTr("Contact request ignored"))
|
Global.displaySuccessToastMessage(qsTr("Contact request ignored"))
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
@ -648,14 +741,15 @@ QtObject {
|
|||||||
Component {
|
Component {
|
||||||
id: nicknamePopupComponent
|
id: nicknamePopupComponent
|
||||||
NicknamePopup {
|
NicknamePopup {
|
||||||
onEditDone: {
|
id: nicknamePopup
|
||||||
if (nickname !== newNickname) {
|
onEditDone: function(newNickname) {
|
||||||
rootStore.contactStore.changeContactNickname(publicKey, newNickname, optionalDisplayName, !!nickname)
|
if (nicknamePopup.nickname !== newNickname) {
|
||||||
|
rootStore.contactStore.changeContactNickname(nicknamePopup.publicKey, newNickname, nicknamePopup.optionalDisplayName, !!nicknamePopup.nickname)
|
||||||
}
|
}
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
onRemoveNicknameRequested: {
|
onRemoveNicknameRequested: {
|
||||||
rootStore.contactStore.changeContactNickname(publicKey, "", optionalDisplayName, true)
|
rootStore.contactStore.changeContactNickname(nicknamePopup.publicKey, "", nicknamePopup.optionalDisplayName, true)
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
onClosed: destroy()
|
onClosed: destroy()
|
||||||
@ -665,13 +759,14 @@ QtObject {
|
|||||||
Component {
|
Component {
|
||||||
id: markAsUntrustedComponent
|
id: markAsUntrustedComponent
|
||||||
MarkAsUntrustedPopup {
|
MarkAsUntrustedPopup {
|
||||||
|
id: markAsUntrustedPopup
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
rootStore.contactStore.markUntrustworthy(publicKey)
|
rootStore.contactStore.markUntrustworthy(markAsUntrustedPopup.publicKey)
|
||||||
if (removeContact) {
|
if (markAsUntrustedPopup.removeContact) {
|
||||||
rootStore.contactStore.removeContact(publicKey)
|
rootStore.contactStore.removeContact(markAsUntrustedPopup.publicKey)
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 removed from contacts and marked as untrusted").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 removed from contacts and marked as untrusted").arg(markAsUntrustedPopup.mainDisplayName))
|
||||||
} else {
|
} else {
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 marked as untrusted").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 marked as untrusted").arg(markAsUntrustedPopup.mainDisplayName))
|
||||||
}
|
}
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
@ -694,13 +789,14 @@ QtObject {
|
|||||||
Component {
|
Component {
|
||||||
id: blockContactConfirmationComponent
|
id: blockContactConfirmationComponent
|
||||||
BlockContactConfirmationDialog {
|
BlockContactConfirmationDialog {
|
||||||
|
id: blockContactConfirmationComponentView
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
rootStore.contactStore.blockContact(publicKey)
|
rootStore.contactStore.blockContact(blockContactConfirmationComponentView.publicKey)
|
||||||
if (removeIDVerification)
|
if (blockContactConfirmationComponentView.removeIDVerification)
|
||||||
rootStore.contactStore.removeTrustVerificationStatus(publicKey)
|
rootStore.contactStore.removeTrustVerificationStatus(blockContactConfirmationComponentView.publicKey)
|
||||||
if (removeContact)
|
if (blockContactConfirmationComponentView.removeContact)
|
||||||
rootStore.contactStore.removeContact(publicKey)
|
rootStore.contactStore.removeContact(blockContactConfirmationComponentView.publicKey)
|
||||||
Global.displaySuccessToastMessage(qsTr("%1 blocked").arg(mainDisplayName))
|
Global.displaySuccessToastMessage(qsTr("%1 blocked").arg(blockContactConfirmationComponentView.mainDisplayName))
|
||||||
close()
|
close()
|
||||||
}
|
}
|
||||||
onClosed: destroy()
|
onClosed: destroy()
|
||||||
|
@ -15,12 +15,18 @@ CommonContactDialog {
|
|||||||
readonly property bool removeIDVerification: ctrlRemoveIDVerification.checked
|
readonly property bool removeIDVerification: ctrlRemoveIDVerification.checked
|
||||||
readonly property bool removeContact: ctrlRemoveContact.checked
|
readonly property bool removeContact: ctrlRemoveContact.checked
|
||||||
|
|
||||||
|
// New properties to replace contactDetails
|
||||||
|
property bool isContact: false
|
||||||
|
property int outgoingVerificationStatus: Constants.verificationStatus.untrustworthy
|
||||||
|
property int incomingVerificationStatus: Constants.verificationStatus.untrustworthy
|
||||||
|
property int trustStatus: Constants.trustStatus.untrusted
|
||||||
|
|
||||||
title: qsTr("Block user")
|
title: qsTr("Block user")
|
||||||
|
|
||||||
readonly property var d: QtObject {
|
readonly property var d: QtObject {
|
||||||
id: d
|
id: d
|
||||||
readonly property bool isTrusted: contactDetails.outgoingVerificationStatus === Constants.verificationStatus.trusted ||
|
readonly property bool isTrusted: root.outgoingVerificationStatus === Constants.verificationStatus.trusted ||
|
||||||
contactDetails.incomingVerificationStatus === Constants.verificationStatus.trusted
|
root.incomingVerificationStatus === Constants.verificationStatus.trusted
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
@ -49,7 +55,7 @@ CommonContactDialog {
|
|||||||
Layout.topMargin: Style.current.halfPadding
|
Layout.topMargin: Style.current.halfPadding
|
||||||
objectName: "removeContactCheckbox"
|
objectName: "removeContactCheckbox"
|
||||||
id: ctrlRemoveContact
|
id: ctrlRemoveContact
|
||||||
visible: contactDetails.isContact
|
visible: root.isContact
|
||||||
checked: visible
|
checked: visible
|
||||||
enabled: false
|
enabled: false
|
||||||
text: qsTr("Remove contact")
|
text: qsTr("Remove contact")
|
||||||
@ -57,7 +63,7 @@ CommonContactDialog {
|
|||||||
|
|
||||||
StatusCheckBox {
|
StatusCheckBox {
|
||||||
id: ctrlRemoveIDVerification
|
id: ctrlRemoveIDVerification
|
||||||
visible: (contactDetails.isContact && d.isTrusted) || contactDetails.trustStatus === Constants.trustStatus.trusted
|
visible: (root.isContact && d.isTrusted) || root.trustStatus === Constants.trustStatus.trusted
|
||||||
checked: visible
|
checked: visible
|
||||||
enabled: false
|
enabled: false
|
||||||
text: qsTr("Remove ID verification")
|
text: qsTr("Remove ID verification")
|
||||||
|
@ -16,19 +16,32 @@ import shared.controls.chat 1.0
|
|||||||
StatusDialog {
|
StatusDialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property string publicKey
|
property string publicKey: ""
|
||||||
required property var contactDetails
|
// Remove the contactDetails object
|
||||||
property bool loadingContactDetails
|
// required property var contactDetails
|
||||||
|
property bool loadingContactDetails: false
|
||||||
|
|
||||||
|
// Add individual required properties
|
||||||
|
property string localNickname
|
||||||
|
property string name
|
||||||
|
property string displayName
|
||||||
|
property string alias
|
||||||
|
property bool ensVerified
|
||||||
|
property int onlineStatus
|
||||||
|
property string largeImage
|
||||||
|
property bool isContact
|
||||||
|
property int trustStatus
|
||||||
|
property bool isBlocked
|
||||||
|
|
||||||
default property alias content: contentLayout.children
|
default property alias content: contentLayout.children
|
||||||
|
|
||||||
property ObjectModel rightButtons
|
property ObjectModel rightButtons
|
||||||
|
|
||||||
readonly property string mainDisplayName: StatusQUtils.Emoji.parse(
|
readonly property string mainDisplayName: StatusQUtils.Emoji.parse(
|
||||||
ProfileUtils.displayName(contactDetails.localNickname, contactDetails.name,
|
ProfileUtils.displayName(localNickname, name,
|
||||||
contactDetails.displayName, contactDetails.alias))
|
displayName, alias))
|
||||||
readonly property string optionalDisplayName: StatusQUtils.Emoji.parse(
|
readonly property string optionalDisplayName: StatusQUtils.Emoji.parse(
|
||||||
ProfileUtils.displayName("", contactDetails.name, contactDetails.displayName, contactDetails.alias))
|
ProfileUtils.displayName("", name, displayName, alias))
|
||||||
|
|
||||||
width: Math.max(implicitWidth, 480)
|
width: Math.max(implicitWidth, 480)
|
||||||
horizontalPadding: 0
|
horizontalPadding: 0
|
||||||
@ -45,12 +58,12 @@ StatusDialog {
|
|||||||
UserImage {
|
UserImage {
|
||||||
name: root.mainDisplayName
|
name: root.mainDisplayName
|
||||||
pubkey: root.publicKey
|
pubkey: root.publicKey
|
||||||
image: Utils.addTimestampToURL(contactDetails.largeImage)
|
image: Utils.addTimestampToURL(root.largeImage)
|
||||||
interactive: false
|
interactive: false
|
||||||
imageWidth: 60
|
imageWidth: 60
|
||||||
imageHeight: 60
|
imageHeight: 60
|
||||||
ensVerified: contactDetails.ensVerified
|
ensVerified: root.ensVerified
|
||||||
onlineStatus: contactDetails.onlineStatus
|
onlineStatus: root.onlineStatus
|
||||||
loading: root.loadingContactDetails
|
loading: root.loadingContactDetails
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,9 +90,9 @@ StatusDialog {
|
|||||||
anchors.left: contactName.right
|
anchors.left: contactName.right
|
||||||
anchors.leftMargin: Style.current.halfPadding
|
anchors.leftMargin: Style.current.halfPadding
|
||||||
anchors.verticalCenter: contactName.verticalCenter
|
anchors.verticalCenter: contactName.verticalCenter
|
||||||
isContact: contactDetails.isContact
|
isContact: root.isContact
|
||||||
trustIndicator: contactDetails.trustStatus
|
trustIndicator: root.trustStatus
|
||||||
isBlocked: contactDetails.isBlocked
|
isBlocked: root.isBlocked
|
||||||
tiny: false
|
tiny: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -90,7 +103,7 @@ StatusDialog {
|
|||||||
color: Theme.palette.baseColor1
|
color: Theme.palette.baseColor1
|
||||||
font.pixelSize: 13
|
font.pixelSize: 13
|
||||||
text: root.optionalDisplayName
|
text: root.optionalDisplayName
|
||||||
visible: !!contactDetails.localNickname
|
visible: !!root.localNickname
|
||||||
}
|
}
|
||||||
Rectangle {
|
Rectangle {
|
||||||
Layout.preferredWidth: 4
|
Layout.preferredWidth: 4
|
||||||
|
@ -15,7 +15,7 @@ CommonContactDialog {
|
|||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: qsTr("Mark users as ID verified only if you’re 100% sure who they are. Otherwise, it’s safer to send %1 an ID verification request.").arg(mainDisplayName)
|
text: qsTr("Mark users as ID verified only if you’re 100% sure who they are. Otherwise, it’s safer to send %1 an ID verification request.").arg(root.mainDisplayName)
|
||||||
}
|
}
|
||||||
|
|
||||||
rightButtons: ObjectModel {
|
rightButtons: ObjectModel {
|
||||||
|
@ -12,6 +12,12 @@ import utils 1.0
|
|||||||
CommonContactDialog {
|
CommonContactDialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
// New properties to replace contactDetails, with default values
|
||||||
|
property int verificationStatus: Constants.verificationStatus.unverified
|
||||||
|
property int incomingVerificationStatus: Constants.verificationStatus.unverified
|
||||||
|
property bool isContact: false
|
||||||
|
property int trustStatus: Constants.trustStatus.untrusted
|
||||||
|
|
||||||
readonly property bool removeIDVerification: ctrlRemoveIDVerification.checked
|
readonly property bool removeIDVerification: ctrlRemoveIDVerification.checked
|
||||||
readonly property bool removeContact: ctrlRemoveContact.checked
|
readonly property bool removeContact: ctrlRemoveContact.checked
|
||||||
|
|
||||||
@ -19,8 +25,8 @@ CommonContactDialog {
|
|||||||
|
|
||||||
readonly property var d: QtObject {
|
readonly property var d: QtObject {
|
||||||
id: d
|
id: d
|
||||||
readonly property int outgoingVerificationStatus: contactDetails.verificationStatus
|
readonly property int outgoingVerificationStatus: root.verificationStatus
|
||||||
readonly property int incomingVerificationStatus: contactDetails.incomingVerificationStatus
|
readonly property int incomingVerificationStatus: root.incomingVerificationStatus
|
||||||
readonly property bool isTrusted: outgoingVerificationStatus === Constants.verificationStatus.trusted ||
|
readonly property bool isTrusted: outgoingVerificationStatus === Constants.verificationStatus.trusted ||
|
||||||
incomingVerificationStatus === Constants.verificationStatus.trusted
|
incomingVerificationStatus === Constants.verificationStatus.trusted
|
||||||
}
|
}
|
||||||
@ -34,7 +40,7 @@ CommonContactDialog {
|
|||||||
|
|
||||||
StatusCheckBox {
|
StatusCheckBox {
|
||||||
id: ctrlRemoveIDVerification
|
id: ctrlRemoveIDVerification
|
||||||
visible: (contactDetails.isContact && d.isTrusted) || contactDetails.trustStatus === Constants.trustStatus.trusted
|
visible: (root.isContact && d.isTrusted) || root.trustStatus === Constants.trustStatus.trusted
|
||||||
checked: visible
|
checked: visible
|
||||||
enabled: false
|
enabled: false
|
||||||
text: qsTr("Remove ID verification")
|
text: qsTr("Remove ID verification")
|
||||||
@ -42,7 +48,7 @@ CommonContactDialog {
|
|||||||
|
|
||||||
StatusCheckBox {
|
StatusCheckBox {
|
||||||
id: ctrlRemoveContact
|
id: ctrlRemoveContact
|
||||||
visible: contactDetails.isContact
|
visible: root.isContact
|
||||||
text: qsTr("Remove contact")
|
text: qsTr("Remove contact")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@ import utils 1.0
|
|||||||
CommonContactDialog {
|
CommonContactDialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
readonly property string nickname: contactDetails.localNickname
|
property string publicKey: ""
|
||||||
|
property string nickname: ""
|
||||||
|
|
||||||
signal editDone(string newNickname)
|
signal editDone(string newNickname)
|
||||||
signal removeNicknameRequested()
|
signal removeNicknameRequested()
|
||||||
|
@ -20,12 +20,14 @@ CommonContactDialog {
|
|||||||
property string verificationResponseIcon
|
property string verificationResponseIcon
|
||||||
property string verificationRequestedAt
|
property string verificationRequestedAt
|
||||||
property string verificationRepliedAt
|
property string verificationRepliedAt
|
||||||
|
property bool ensVerified
|
||||||
|
|
||||||
readonly property bool hasReply: root.verificationResponse !== ""
|
readonly property bool hasReply: root.verificationResponse !== ""
|
||||||
|
|
||||||
signal verificationRequestCanceled(string publicKey)
|
signal verificationRequestCanceled()
|
||||||
signal untrustworthyVerified(string publicKey)
|
signal untrustworthyVerified()
|
||||||
signal trustedVerified(string publicKey)
|
signal trustedVerified()
|
||||||
|
signal onLinkActivated()
|
||||||
|
|
||||||
title: !hasReply ? qsTr("ID verification pending") : qsTr("Review ID verification reply")
|
title: !hasReply ? qsTr("ID verification pending") : qsTr("Review ID verification reply")
|
||||||
|
|
||||||
@ -36,7 +38,7 @@ CommonContactDialog {
|
|||||||
borderColor: "transparent"
|
borderColor: "transparent"
|
||||||
visible: !root.hasReply
|
visible: !root.hasReply
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.verificationRequestCanceled(root.publicKey)
|
root.verificationRequestCanceled()
|
||||||
root.close()
|
root.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -51,7 +53,7 @@ CommonContactDialog {
|
|||||||
visible: root.hasReply
|
visible: root.hasReply
|
||||||
type: StatusBaseButton.Type.Danger
|
type: StatusBaseButton.Type.Danger
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.untrustworthyVerified(root.publicKey)
|
root.untrustworthyVerified()
|
||||||
root.close()
|
root.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,7 +62,7 @@ CommonContactDialog {
|
|||||||
visible: root.hasReply
|
visible: root.hasReply
|
||||||
type: StatusBaseButton.Type.Success
|
type: StatusBaseButton.Type.Success
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.trustedVerified(root.publicKey)
|
root.trustedVerified()
|
||||||
root.close()
|
root.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -91,7 +93,7 @@ CommonContactDialog {
|
|||||||
messageDetails.sender.profileImage.assetSettings.isImage: true
|
messageDetails.sender.profileImage.assetSettings.isImage: true
|
||||||
messageDetails.sender.profileImage.colorId: Utils.colorIdForPubkey(root.publicKey)
|
messageDetails.sender.profileImage.colorId: Utils.colorIdForPubkey(root.publicKey)
|
||||||
messageDetails.sender.profileImage.colorHash: Utils.getColorHashAsJson(root.publicKey)
|
messageDetails.sender.profileImage.colorHash: Utils.getColorHashAsJson(root.publicKey)
|
||||||
messageDetails.sender.isEnsVerified: contactDetails.ensVerified
|
messageDetails.sender.isEnsVerified: root.ensVerified
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -105,10 +107,6 @@ CommonContactDialog {
|
|||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
textFormat: Text.RichText
|
textFormat: Text.RichText
|
||||||
color: root.hasReply ? Theme.palette.directColor1 : Theme.palette.baseColor1
|
color: root.hasReply ? Theme.palette.directColor1 : Theme.palette.baseColor1
|
||||||
onLinkActivated: {
|
onLinkActivated: root.onLinkActivated()
|
||||||
root.verificationRequestCanceled(root.publicKey)
|
|
||||||
root.close()
|
|
||||||
Global.openSendIDRequestPopup(root.publicKey, root.contactDetails, null)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,10 @@ import utils 1.0
|
|||||||
CommonContactDialog {
|
CommonContactDialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
|
property int outgoingVerificationStatus: Constants.verificationStatus.unverified
|
||||||
|
property int incomingVerificationStatus: Constants.verificationStatus.unverified
|
||||||
|
property int trustStatus: Constants.trustStatus.none
|
||||||
|
|
||||||
readonly property bool removeIDVerification: ctrlRemoveIDVerification.checked
|
readonly property bool removeIDVerification: ctrlRemoveIDVerification.checked
|
||||||
readonly property bool markAsUntrusted: ctrlMarkAsUntrusted.checked
|
readonly property bool markAsUntrusted: ctrlMarkAsUntrusted.checked
|
||||||
|
|
||||||
@ -19,8 +23,8 @@ CommonContactDialog {
|
|||||||
|
|
||||||
readonly property var d: QtObject {
|
readonly property var d: QtObject {
|
||||||
id: d
|
id: d
|
||||||
readonly property bool isTrusted: contactDetails.outgoingVerificationStatus === Constants.verificationStatus.trusted ||
|
readonly property bool isTrusted: root.outgoingVerificationStatus === Constants.verificationStatus.trusted ||
|
||||||
contactDetails.incomingVerificationStatus === Constants.verificationStatus.trusted
|
root.incomingVerificationStatus === Constants.verificationStatus.trusted
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
@ -32,7 +36,7 @@ CommonContactDialog {
|
|||||||
|
|
||||||
StatusCheckBox {
|
StatusCheckBox {
|
||||||
id: ctrlRemoveIDVerification
|
id: ctrlRemoveIDVerification
|
||||||
visible: d.isTrusted || contactDetails.trustStatus === Constants.trustStatus.trusted
|
visible: d.isTrusted || root.trustStatus === Constants.trustStatus.trusted
|
||||||
checked: visible
|
checked: visible
|
||||||
enabled: false
|
enabled: false
|
||||||
text: qsTr("Remove ID verification")
|
text: qsTr("Remove ID verification")
|
||||||
@ -40,7 +44,7 @@ CommonContactDialog {
|
|||||||
|
|
||||||
StatusCheckBox {
|
StatusCheckBox {
|
||||||
id: ctrlMarkAsUntrusted
|
id: ctrlMarkAsUntrusted
|
||||||
visible: contactDetails.trustStatus !== Constants.trustStatus.untrustworthy
|
visible: root.trustStatus !== Constants.trustStatus.untrustworthy
|
||||||
text: qsTr("Mark %1 as untrusted").arg(mainDisplayName)
|
text: qsTr("Mark %1 as untrusted").arg(mainDisplayName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,12 +19,12 @@ CommonContactDialog {
|
|||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.bottomMargin: Style.current.halfPadding
|
Layout.bottomMargin: Style.current.halfPadding
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: qsTr("%1’s identity will no longer be verified. This is only visible to you.").arg(mainDisplayName)
|
text: qsTr("%1’s identity will no longer be verified. This is only visible to you.").arg(root.mainDisplayName)
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusCheckBox {
|
StatusCheckBox {
|
||||||
id: ctrlMarkAsUntrusted
|
id: ctrlMarkAsUntrusted
|
||||||
text: qsTr("Mark %1 as untrusted").arg(mainDisplayName)
|
text: qsTr("Mark %1 as untrusted").arg(root.mainDisplayName)
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusCheckBox {
|
StatusCheckBox {
|
||||||
|
@ -12,11 +12,14 @@ import utils 1.0
|
|||||||
CommonContactDialog {
|
CommonContactDialog {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
// expected roles: id, from, clock, text, contactRequestState
|
property string contactRequestId: ""
|
||||||
required property var crDetails
|
property string fromAddress: ""
|
||||||
|
property int clock: 0
|
||||||
|
property string text: ""
|
||||||
|
property int contactRequestState: 0
|
||||||
|
|
||||||
signal accepted(string contactRequestId)
|
signal accepted()
|
||||||
signal discarded(string contactRequestId)
|
signal discarded()
|
||||||
|
|
||||||
title: qsTr("Review contact request")
|
title: qsTr("Review contact request")
|
||||||
|
|
||||||
@ -35,12 +38,12 @@ CommonContactDialog {
|
|||||||
|
|
||||||
StatusTimeStampLabel {
|
StatusTimeStampLabel {
|
||||||
Layout.maximumWidth: parent.width
|
Layout.maximumWidth: parent.width
|
||||||
timestamp: crDetails.clock
|
timestamp: root.clock
|
||||||
}
|
}
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: crDetails.text
|
text: root.text
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -49,13 +52,13 @@ CommonContactDialog {
|
|||||||
StatusFlatButton {
|
StatusFlatButton {
|
||||||
text: qsTr("Ignore")
|
text: qsTr("Ignore")
|
||||||
objectName: "ignoreButton"
|
objectName: "ignoreButton"
|
||||||
onClicked: root.discarded(crDetails.id ?? "")
|
onClicked: root.discarded()
|
||||||
}
|
}
|
||||||
StatusButton {
|
StatusButton {
|
||||||
text: qsTr("Accept")
|
text: qsTr("Accept")
|
||||||
type: StatusBaseButton.Type.Success
|
type: StatusBaseButton.Type.Success
|
||||||
objectName: "acceptButton"
|
objectName: "acceptButton"
|
||||||
onClicked: root.accepted(crDetails.id ?? "")
|
onClicked: root.accepted()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@ CommonContactDialog {
|
|||||||
objectName: "unblockingText"
|
objectName: "unblockingText"
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
text: qsTr("Unblocking %1 will allow new messages you receive from %1 to reach you.").arg(mainDisplayName)
|
text: qsTr("Unblocking %1 will allow new messages you receive from %1 to reach you.").arg(root.mainDisplayName)
|
||||||
}
|
}
|
||||||
|
|
||||||
rightButtons: ObjectModel {
|
rightButtons: ObjectModel {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user