90 lines
1.4 KiB
QML
90 lines
1.4 KiB
QML
import QtGraphicalEffects 1.0
|
|
import QtQuick 2.7
|
|
import QtQuick.Controls 2.4
|
|
import QtQuick.Controls.Material 2.0
|
|
import QtQuick.Layouts 1.3
|
|
import QtQuick.Window 2.11
|
|
import QtQuick.Controls 1.4
|
|
|
|
import "../widgets"
|
|
import "../styles"
|
|
|
|
ColumnLayout { // peerSettingsPane
|
|
anchors.fill: parent
|
|
|
|
|
|
StackToolbar {
|
|
id: toolbar
|
|
aux.visible: false
|
|
|
|
|
|
back.onClicked: theStack.pane = theStack.messagePane
|
|
}
|
|
|
|
Column {
|
|
leftPadding: 10
|
|
spacing: 5
|
|
|
|
ScalingLabel {
|
|
text: "Address:"
|
|
}
|
|
|
|
TextField {
|
|
id: txtOnion
|
|
style: CwtchTextFieldStyle{ width: 400 }
|
|
readOnly: true
|
|
}
|
|
|
|
SimpleButton {
|
|
icon: "regular/clipboard"
|
|
text: "copy"
|
|
|
|
onClicked: {
|
|
gcd.popup("copied to clipboard!")
|
|
txtOnion.selectAll()
|
|
txtOnion.copy()
|
|
}
|
|
}
|
|
|
|
ScalingLabel{
|
|
text: "Display name:"
|
|
}
|
|
|
|
TextField {
|
|
id: txtDisplayName
|
|
style: CwtchTextFieldStyle{ width: 400 }
|
|
}
|
|
|
|
SimpleButton {
|
|
text: "Save"
|
|
|
|
onClicked: {
|
|
gcd.savePeerSettings(txtOnion.text, txtDisplayName.text)
|
|
theStack.title = txtDisplayName.text
|
|
theStack.pane = theStack.messagePane
|
|
}
|
|
}
|
|
|
|
SimpleButton {
|
|
icon: "regular/trash-alt"
|
|
text: "delete"
|
|
|
|
onClicked: {
|
|
gcd.setAttribute(txtOnion.text, "deleted", "deleted")
|
|
theStack.pane = theStack.emptyPane
|
|
}
|
|
}
|
|
|
|
}//end of column with padding
|
|
|
|
|
|
Connections {
|
|
target: gcd
|
|
|
|
onSupplyPeerSettings: function(onion, nick) {
|
|
toolbar.text = nick
|
|
txtOnion.text = onion
|
|
txtDisplayName.text = nick
|
|
}
|
|
}
|
|
} |