forked from cwtch.im/ui
82 lines
1.2 KiB
QML
82 lines
1.2 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 "../widgets"
|
|
|
|
ColumnLayout { // groupSettingsPane
|
|
anchors.fill: parent
|
|
property string groupID
|
|
|
|
|
|
StackToolbar {
|
|
id: toolbar
|
|
aux.visible: false
|
|
}
|
|
|
|
ScalingLabel {
|
|
text: "Server:"
|
|
}
|
|
|
|
TextEdit {
|
|
id: txtServer
|
|
width: 100
|
|
readOnly: true
|
|
}
|
|
|
|
ScalingLabel {
|
|
text: "Invitation:"
|
|
}
|
|
|
|
TextEdit {
|
|
id: txtInvitation
|
|
width: 200
|
|
readOnly: true
|
|
}
|
|
|
|
SimpleButton {
|
|
icon: "regular/clipboard"
|
|
text: "copy"
|
|
|
|
onClicked: {
|
|
gcd.popup("copied to clipboard!")
|
|
txtInvitation.selectAll()
|
|
txtInvitation.copy()
|
|
}
|
|
}
|
|
|
|
ScalingLabel{
|
|
text: "Group name:"
|
|
}
|
|
|
|
TextEdit {
|
|
id: txtGroupName
|
|
width: 100
|
|
}
|
|
|
|
SimpleButton {
|
|
text: "Save"
|
|
|
|
onClicked: {
|
|
gcd.saveGroupSettings(groupID, txtGroupName.text)
|
|
theStack.title = txtGroupName.text
|
|
theStack.pane = theStack.messagePane
|
|
}
|
|
}
|
|
|
|
|
|
Connections {
|
|
target: gcd
|
|
|
|
onSupplyGroupSettings: function(gid, name, server, invite) {
|
|
groupID = gid
|
|
toolbar.text = name
|
|
txtGroupName.text = name
|
|
txtServer.text = server
|
|
txtInvitation.text = invite
|
|
}
|
|
}
|
|
} |