From 5e3f5136557b83ee964d6c0cfa4fed422330728d Mon Sep 17 00:00:00 2001 From: Jedi18 Date: Wed, 27 Jan 2021 11:03:08 +0530 Subject: update room specific username from userprofile --- resources/qml/UserProfile.qml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'resources/qml/UserProfile.qml') 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 -- cgit 1.5.1