Rename EditAccount to AccountSettings

This commit is contained in:
miruka 2019-11-10 09:07:35 -04:00
parent e3165d0a7c
commit 484e9e595d
10 changed files with 15 additions and 16 deletions

View File

@ -4,7 +4,7 @@
- Handle upload errors: non existent path, path is a dir, file too big, etc - Handle upload errors: non existent path, path is a dir, file too big, etc
- Show real progression for mxc thumbnail loadings, uploads and downloads - Show real progression for mxc thumbnail loadings, uploads and downloads
- Login: use new exception python/qml mechanism - Login & upload: use new exception python/qml mechanism
- Support m.file thumbnails - Support m.file thumbnails
- Generate video thumbnails - Generate video thumbnails
@ -34,7 +34,6 @@
- When qml syntax highlighting supports ES6 string interpolation, use that - When qml syntax highlighting supports ES6 string interpolation, use that
- Fixes - Fixes
- General way to show pages as loading until account is ready
- `code` not colored in room subtitle - `code` not colored in room subtitle
- In the "Leave me" room, "join > Hi > left" aren't combined - In the "Leave me" room, "join > Hi > left" aren't combined
- Event delegates changing height don't scroll the list - Event delegates changing height don't scroll the list

View File

@ -5,7 +5,7 @@ import "../../Base"
import "../../utils.js" as Utils import "../../utils.js" as Utils
HPage { HPage {
id: editAccount id: accountSettings
property int avatarPreferredSize: 256 property int avatarPreferredSize: 256

View File

@ -16,8 +16,8 @@ HBox {
export: button => { export: button => {
Utils.makeObject( Utils.makeObject(
"Dialogs/ExportKeys.qml", "Dialogs/ExportKeys.qml",
editAccount, accountSettings,
{ userId: editAccount.userId }, { userId: accountSettings.userId },
obj => { obj => {
button.loading = Qt.binding(() => obj.exporting) button.loading = Qt.binding(() => obj.exporting)
obj.dialog.open() obj.dialog.open()
@ -27,8 +27,8 @@ HBox {
import: button => { import: button => {
Utils.makeObject( Utils.makeObject(
"Dialogs/ImportKeys.qml", "Dialogs/ImportKeys.qml",
editAccount, accountSettings,
{ userId: editAccount.userId }, { userId: accountSettings.userId },
obj => { obj.dialog.open() } obj => { obj.dialog.open() }
) )
}, },

View File

@ -13,7 +13,7 @@ HGridLayout {
py.callClientCoro( py.callClientCoro(
userId, "set_displayname", [nameField.field.text], () => { userId, "set_displayname", [nameField.field.text], () => {
saveButton.nameChangeRunning = false saveButton.nameChangeRunning = false
editAccount.headerName = accountSettings.headerName =
Qt.binding(() => accountInfo.display_name) Qt.binding(() => accountInfo.display_name)
} }
) )
@ -45,7 +45,7 @@ HGridLayout {
fileDialog.selectedFile = "" fileDialog.selectedFile = ""
fileDialog.file = "" fileDialog.file = ""
editAccount.headerName = Qt.binding(() => accountInfo.display_name) accountSettings.headerName = Qt.binding(() => accountInfo.display_name)
} }
columns: 2 columns: 2
@ -58,8 +58,8 @@ HGridLayout {
property bool changed: Boolean(sourceOverride) property bool changed: Boolean(sourceOverride)
id: avatar id: avatar
clientUserId: editAccount.userId clientUserId: accountSettings.userId
userId: editAccount.userId userId: accountSettings.userId
displayName: nameField.field.text displayName: nameField.field.text
mxc: accountInfo.avatar_url mxc: accountInfo.avatar_url
toolTipMxc: "" toolTipMxc: ""
@ -151,7 +151,7 @@ HGridLayout {
property bool changed: field.text != accountInfo.display_name property bool changed: field.text != accountInfo.display_name
readonly property string fText: field.text readonly property string fText: field.text
onFTextChanged: editAccount.headerName = field.text onFTextChanged: accountSettings.headerName = field.text
id: nameField id: nameField
label.text: qsTr("Display name:") label.text: qsTr("Display name:")

View File

@ -47,7 +47,7 @@ HPage {
[data] [data]
) )
pageLoader.showPage( pageLoader.showPage(
"EditAccount/EditAccount", {userId: data} "AccountSettings/AccountSettings", {userId: data}
) )
errorMessage.text = "" errorMessage.text = ""

View File

@ -13,7 +13,7 @@ HTileDelegate {
theme.sidePane.account.collapsedOpacity : 1 theme.sidePane.account.collapsedOpacity : 1
shouldBeCurrent: shouldBeCurrent:
window.uiState.page == "Pages/EditAccount/EditAccount.qml" && window.uiState.page == "Pages/AccountSettings/AccountSettings.qml" &&
window.uiState.pageProperties.userId == model.data.user_id window.uiState.pageProperties.userId == model.data.user_id
setCurrentTimer.running: setCurrentTimer.running:
@ -34,7 +34,7 @@ HTileDelegate {
onActivated: if (! disconnecting) { onActivated: if (! disconnecting) {
pageLoader.showPage( pageLoader.showPage(
"EditAccount/EditAccount", { "userId": model.data.user_id } "AccountSettings/AccountSettings", { "userId": model.data.user_id }
) )
} }

View File

@ -76,7 +76,7 @@ HListView {
if (! currentItem) incrementCurrentIndex() if (! currentItem) incrementCurrentIndex()
pageLoader.showPage( pageLoader.showPage(
"EditAccount/EditAccount", "AccountSettings/AccountSettings",
{userId: currentItem.item.delegateModel.user_id}, {userId: currentItem.item.delegateModel.user_id},
) )
} }