ui/qml/panes/PeerSettingsPane.qml

61 lines
944 B
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 "../widgets"
ColumnLayout { // peerSettingsPane
anchors.fill: parent
StackToolbar {
id: toolbar
aux.visible: false
back.onClicked: theStack.pane = theStack.messagePane
}
ScalingLabel {
text: "Address:"
}
TextEdit {
id: txtOnion
width: 100
readOnly: true
}
ScalingLabel{
text: "Display name:"
}
TextEdit {
id: txtDisplayName
width: 200
}
SimpleButton {
text: "Save"
onClicked: {
gcd.savePeerSettings(txtOnion.text, txtDisplayName.text)
theStack.title = txtDisplayName.text
theStack.pane = theStack.messagePane
}
}
Connections {
target: gcd
onSupplyPeerSettings: function(onion, nick) {
toolbar.text = nick
txtOnion.text = onion
txtDisplayName.text = nick
}
}
}