Add encryption check box to FindSomeone page
This commit is contained in:
parent
793024434f
commit
72c480471a
|
@ -103,17 +103,8 @@ HBox {
|
||||||
Layout.maximumWidth: parent.width
|
Layout.maximumWidth: parent.width
|
||||||
}
|
}
|
||||||
|
|
||||||
HCheckBox {
|
EncryptCheckBox {
|
||||||
id: encryptCheckBox
|
id: encryptCheckBox
|
||||||
text: qsTr("Encrypt messages")
|
|
||||||
subtitle.text:
|
|
||||||
qsTr("Protect the room against eavesdropper. Only you " +
|
|
||||||
"and those you trust can read the conversation.") +
|
|
||||||
"<br><font color='" + theme.colors.middleBackground + "'>" +
|
|
||||||
qsTr("Cannot be disabled later!") +
|
|
||||||
"</font>"
|
|
||||||
subtitle.textFormat: Text.StyledText
|
|
||||||
spacing: addChatBox.horizontalSpacing
|
|
||||||
|
|
||||||
Layout.maximumWidth: parent.width
|
Layout.maximumWidth: parent.width
|
||||||
}
|
}
|
||||||
|
|
14
src/qml/Pages/AddChat/EncryptCheckBox.qml
Normal file
14
src/qml/Pages/AddChat/EncryptCheckBox.qml
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
import QtQuick 2.12
|
||||||
|
import "../../Base"
|
||||||
|
|
||||||
|
HCheckBox {
|
||||||
|
text: qsTr("Encrypt messages")
|
||||||
|
subtitle.text:
|
||||||
|
qsTr("Protect the room against eavesdropper. Only you " +
|
||||||
|
"and those you trust can read the conversation.") +
|
||||||
|
"<br><font color='" + theme.colors.middleBackground + "'>" +
|
||||||
|
qsTr("Cannot be disabled later!") +
|
||||||
|
"</font>"
|
||||||
|
subtitle.textFormat: Text.StyledText
|
||||||
|
spacing: addChatBox.horizontalSpacing
|
||||||
|
}
|
|
@ -20,7 +20,7 @@ HBox {
|
||||||
button.loading = true
|
button.loading = true
|
||||||
errorMessage.text = ""
|
errorMessage.text = ""
|
||||||
|
|
||||||
let args = [userField.text]
|
let args = [userField.text, encryptCheckBox.checked]
|
||||||
|
|
||||||
py.callClientCoro(userId, "new_direct_chat", args, roomId => {
|
py.callClientCoro(userId, "new_direct_chat", args, roomId => {
|
||||||
button.loading = false
|
button.loading = false
|
||||||
|
@ -61,6 +61,12 @@ HBox {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EncryptCheckBox {
|
||||||
|
id: encryptCheckBox
|
||||||
|
|
||||||
|
Layout.maximumWidth: parent.width
|
||||||
|
}
|
||||||
|
|
||||||
HLabel {
|
HLabel {
|
||||||
id: errorMessage
|
id: errorMessage
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
|
|
Loading…
Reference in New Issue
Block a user