diff --git a/TODO.md b/TODO.md index 75fc4890..ab6cc911 100644 --- a/TODO.md +++ b/TODO.md @@ -4,7 +4,7 @@ - Handle upload errors: non existent path, path is a dir, file too big, etc - 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 - Generate video thumbnails @@ -34,7 +34,6 @@ - When qml syntax highlighting supports ES6 string interpolation, use that - Fixes - - General way to show pages as loading until account is ready - `code` not colored in room subtitle - In the "Leave me" room, "join > Hi > left" aren't combined - Event delegates changing height don't scroll the list diff --git a/src/qml/Pages/EditAccount/EditAccount.qml b/src/qml/Pages/AccountSettings/AccountSettings.qml similarity index 98% rename from src/qml/Pages/EditAccount/EditAccount.qml rename to src/qml/Pages/AccountSettings/AccountSettings.qml index 6672ed1c..ea732343 100644 --- a/src/qml/Pages/EditAccount/EditAccount.qml +++ b/src/qml/Pages/AccountSettings/AccountSettings.qml @@ -5,7 +5,7 @@ import "../../Base" import "../../utils.js" as Utils HPage { - id: editAccount + id: accountSettings property int avatarPreferredSize: 256 diff --git a/src/qml/Pages/EditAccount/Encryption.qml b/src/qml/Pages/AccountSettings/Encryption.qml similarity index 100% rename from src/qml/Pages/EditAccount/Encryption.qml rename to src/qml/Pages/AccountSettings/Encryption.qml diff --git a/src/qml/Pages/EditAccount/ImportError.qml b/src/qml/Pages/AccountSettings/ImportError.qml similarity index 100% rename from src/qml/Pages/EditAccount/ImportError.qml rename to src/qml/Pages/AccountSettings/ImportError.qml diff --git a/src/qml/Pages/EditAccount/ImportExportKeys.qml b/src/qml/Pages/AccountSettings/ImportExportKeys.qml similarity index 87% rename from src/qml/Pages/EditAccount/ImportExportKeys.qml rename to src/qml/Pages/AccountSettings/ImportExportKeys.qml index 278ebeba..f4cab581 100644 --- a/src/qml/Pages/EditAccount/ImportExportKeys.qml +++ b/src/qml/Pages/AccountSettings/ImportExportKeys.qml @@ -16,8 +16,8 @@ HBox { export: button => { Utils.makeObject( "Dialogs/ExportKeys.qml", - editAccount, - { userId: editAccount.userId }, + accountSettings, + { userId: accountSettings.userId }, obj => { button.loading = Qt.binding(() => obj.exporting) obj.dialog.open() @@ -27,8 +27,8 @@ HBox { import: button => { Utils.makeObject( "Dialogs/ImportKeys.qml", - editAccount, - { userId: editAccount.userId }, + accountSettings, + { userId: accountSettings.userId }, obj => { obj.dialog.open() } ) }, diff --git a/src/qml/Pages/EditAccount/ImportingKeys.qml b/src/qml/Pages/AccountSettings/ImportingKeys.qml similarity index 100% rename from src/qml/Pages/EditAccount/ImportingKeys.qml rename to src/qml/Pages/AccountSettings/ImportingKeys.qml diff --git a/src/qml/Pages/EditAccount/Profile.qml b/src/qml/Pages/AccountSettings/Profile.qml similarity index 95% rename from src/qml/Pages/EditAccount/Profile.qml rename to src/qml/Pages/AccountSettings/Profile.qml index 288732f3..12c8d7bd 100644 --- a/src/qml/Pages/EditAccount/Profile.qml +++ b/src/qml/Pages/AccountSettings/Profile.qml @@ -13,7 +13,7 @@ HGridLayout { py.callClientCoro( userId, "set_displayname", [nameField.field.text], () => { saveButton.nameChangeRunning = false - editAccount.headerName = + accountSettings.headerName = Qt.binding(() => accountInfo.display_name) } ) @@ -45,7 +45,7 @@ HGridLayout { fileDialog.selectedFile = "" fileDialog.file = "" - editAccount.headerName = Qt.binding(() => accountInfo.display_name) + accountSettings.headerName = Qt.binding(() => accountInfo.display_name) } columns: 2 @@ -58,8 +58,8 @@ HGridLayout { property bool changed: Boolean(sourceOverride) id: avatar - clientUserId: editAccount.userId - userId: editAccount.userId + clientUserId: accountSettings.userId + userId: accountSettings.userId displayName: nameField.field.text mxc: accountInfo.avatar_url toolTipMxc: "" @@ -151,7 +151,7 @@ HGridLayout { property bool changed: field.text != accountInfo.display_name readonly property string fText: field.text - onFTextChanged: editAccount.headerName = field.text + onFTextChanged: accountSettings.headerName = field.text id: nameField label.text: qsTr("Display name:") diff --git a/src/qml/Pages/SignIn.qml b/src/qml/Pages/SignIn.qml index 84b28588..c09c0ff3 100644 --- a/src/qml/Pages/SignIn.qml +++ b/src/qml/Pages/SignIn.qml @@ -47,7 +47,7 @@ HPage { [data] ) pageLoader.showPage( - "EditAccount/EditAccount", {userId: data} + "AccountSettings/AccountSettings", {userId: data} ) errorMessage.text = "" diff --git a/src/qml/SidePane/AccountDelegate.qml b/src/qml/SidePane/AccountDelegate.qml index 187ad696..639ad7f8 100644 --- a/src/qml/SidePane/AccountDelegate.qml +++ b/src/qml/SidePane/AccountDelegate.qml @@ -13,7 +13,7 @@ HTileDelegate { theme.sidePane.account.collapsedOpacity : 1 shouldBeCurrent: - window.uiState.page == "Pages/EditAccount/EditAccount.qml" && + window.uiState.page == "Pages/AccountSettings/AccountSettings.qml" && window.uiState.pageProperties.userId == model.data.user_id setCurrentTimer.running: @@ -34,7 +34,7 @@ HTileDelegate { onActivated: if (! disconnecting) { pageLoader.showPage( - "EditAccount/EditAccount", { "userId": model.data.user_id } + "AccountSettings/AccountSettings", { "userId": model.data.user_id } ) } diff --git a/src/qml/SidePane/SidePaneList.qml b/src/qml/SidePane/SidePaneList.qml index b9b4a821..77149f8a 100644 --- a/src/qml/SidePane/SidePaneList.qml +++ b/src/qml/SidePane/SidePaneList.qml @@ -76,7 +76,7 @@ HListView { if (! currentItem) incrementCurrentIndex() pageLoader.showPage( - "EditAccount/EditAccount", + "AccountSettings/AccountSettings", {userId: currentItem.item.delegateModel.user_id}, ) }