EditAccount header: match Display name field
This commit is contained in:
parent
c3746fa106
commit
47d30352fa
|
@ -17,10 +17,11 @@ HPage {
|
|||
readonly property var userInfo: users.find(userId)
|
||||
readonly property bool ready: userInfo && ! userInfo.loading
|
||||
|
||||
property string headerName: userInfo ? userInfo.displayName : ""
|
||||
|
||||
hideHeaderUnderHeight: avatarPreferredSize
|
||||
headerLabel.text:
|
||||
qsTr("Account settings for %1").arg(
|
||||
Utils.coloredNameHtml(userInfo ? userInfo.displayName : "", userId)
|
||||
headerLabel.text: qsTr("Account settings for %1").arg(
|
||||
Utils.coloredNameHtml(headerName, userId)
|
||||
)
|
||||
|
||||
HRectangle {
|
||||
|
|
|
@ -15,6 +15,8 @@ HGridLayout {
|
|||
py.callClientCoro(
|
||||
userId, "set_displayname", [nameField.field.text], () => {
|
||||
saveButton.nameChangeRunning = false
|
||||
editAccount.headerName =
|
||||
Qt.binding(() => userInfo.displayName)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
@ -42,6 +44,8 @@ HGridLayout {
|
|||
aliasField.field.text = aliasField.currentAlias
|
||||
fileDialog.selectedFile = ""
|
||||
fileDialog.file = ""
|
||||
|
||||
editAccount.headerName = Qt.binding(() => userInfo.displayName)
|
||||
}
|
||||
|
||||
columns: 2
|
||||
|
@ -127,6 +131,9 @@ HGridLayout {
|
|||
HLabeledTextField {
|
||||
property bool changed: field.text != userInfo.displayName
|
||||
|
||||
property string fText: field.text
|
||||
onFTextChanged: editAccount.headerName = field.text
|
||||
|
||||
id: nameField
|
||||
label.text: qsTr("Display name:")
|
||||
field.text: userInfo.displayName
|
||||
|
|
Loading…
Reference in New Issue
Block a user