summary refs log tree commit diff
path: root/resources/qml/UserProfile.qml
diff options
context:
space:
mode:
authorJedi18 <targetakhil@gmail.com>2021-01-27 11:03:08 +0530
committerJedi18 <targetakhil@gmail.com>2021-01-27 11:03:08 +0530
commit5e3f5136557b83ee964d6c0cfa4fed422330728d (patch)
tree1b94d5d41571f83ffbaecff2a8dffda42ccc0b91 /resources/qml/UserProfile.qml
parentMerge pull request #419 from LorenDB/master (diff)
downloadnheko-5e3f5136557b83ee964d6c0cfa4fed422330728d.tar.xz
update room specific username from userprofile
Diffstat (limited to 'resources/qml/UserProfile.qml')
-rw-r--r--resources/qml/UserProfile.qml34
1 files changed, 34 insertions, 0 deletions
diff --git a/resources/qml/UserProfile.qml b/resources/qml/UserProfile.qml

index 8328f4a5..2a06b955 100644 --- a/resources/qml/UserProfile.qml +++ b/resources/qml/UserProfile.qml
@@ -58,6 +58,40 @@ ApplicationWindow { onClicked: profile.verify() } + Button { + id: changeUsername + + text: (profile.roomid_ == "") ? qsTr("Change global username") : qsTr("Change room username") + Layout.alignment: Qt.AlignHCenter + enabled : profile.isSelf + visible: profile.isSelf + onClicked: changeUsernameDialog.open() + + Dialog { + id: changeUsernameDialog + modal: true + title: (profile.roomid_ == "") ? qsTr("Change global username") : qsTr("Change room username") + onAccepted: profile.changeUsername(usernameEdit.text) + + Column { + anchors.fill: parent + + Text { + text: "New Username" + anchors.horizontalCenter: parent.horizontalCenter + } + TextField { + id: usernameEdit + focus: true + wrapMode: TextEdit.Wrap + anchors.horizontalCenter: parent.horizontalCenter + } + } + + standardButtons: Dialog.Ok | Dialog.Cancel + } + } + Image { Layout.preferredHeight: 16 Layout.preferredWidth: 16