Avatars on FindSomeone/JoinRoom pages

This commit is contained in:
miruka 2019-11-09 15:19:10 -04:00
parent 72c480471a
commit 14ba4b50b5
6 changed files with 29 additions and 9 deletions

View File

@ -116,7 +116,6 @@
- Server selection
- Register/Forgot? for SignIn dialog
- Add room
- Prevent using the composer if no permission (power levels)
- Prevent using an alias if that user is not in the room or no permission
- Spinner when loading past room events
@ -154,6 +153,10 @@
- Opening links with keyboard
- Client improvements
- In room creation, click avatar to set the future room's avatar
- In join room page, show the matching room's avatar when typing
- In find someone page, show the matching user's avatar when typing
- More error details
- Refetch profile after manual profile change, don't wait for a room event

View File

@ -11,6 +11,9 @@ HPage {
property string userId
readonly property var account:
Utils.getItem(modelSources["Account"] || [], "user_id", userId)
HColumnLayout {
Layout.alignment: Qt.AlignCenter

View File

@ -63,18 +63,11 @@ HBox {
Layout.preferredWidth: 128
Layout.preferredHeight: Layout.preferredWidth
HUserAvatar {
CurrentUserAvatar {
anchors.fill: parent
z: 10
opacity: nameField.text ? 0 : 1
visible: opacity > 0
clientUserId: parent.clientUserId
userId: clientUserId
displayName: account ? account.display_name : ""
mxc: account ? account.avatar_url : ""
readonly property var account:
Utils.getItem(modelSources["Account"] || [], "user_id", userId)
Behavior on opacity { HNumberAnimation {} }
}

View File

@ -0,0 +1,9 @@
import QtQuick 2.12
import "../../Base"
HUserAvatar {
clientUserId: addChatPage.userId
userId: clientUserId
displayName: addChatPage.account ? addChatPage.account.display_name : ""
mxc: addChatPage.account ? addChatPage.account.avatar_url : ""
}

View File

@ -53,6 +53,12 @@ HBox {
readonly property string userId: addChatPage.userId
CurrentUserAvatar {
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: 128
Layout.preferredHeight: Layout.preferredWidth
}
HTextField {
id: userField
placeholderText: qsTr("User ID (e.g. @john:matrix.org)")

View File

@ -56,6 +56,12 @@ HBox {
readonly property string userId: addChatPage.userId
CurrentUserAvatar {
Layout.alignment: Qt.AlignCenter
Layout.preferredWidth: 128
Layout.preferredHeight: Layout.preferredWidth
}
HTextField {
id: roomField
placeholderText: qsTr("Alias (e.g. #example:matrix.org), URL or ID")