Avatars on FindSomeone/JoinRoom pages
This commit is contained in:
parent
72c480471a
commit
14ba4b50b5
5
TODO.md
5
TODO.md
|
@ -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
|
||||
|
||||
|
|
|
@ -11,6 +11,9 @@ HPage {
|
|||
|
||||
property string userId
|
||||
|
||||
readonly property var account:
|
||||
Utils.getItem(modelSources["Account"] || [], "user_id", userId)
|
||||
|
||||
|
||||
HColumnLayout {
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
|
|
|
@ -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 {} }
|
||||
}
|
||||
|
|
9
src/qml/Pages/AddChat/CurrentUserAvatar.qml
Normal file
9
src/qml/Pages/AddChat/CurrentUserAvatar.qml
Normal 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 : ""
|
||||
}
|
|
@ -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)")
|
||||
|
|
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue
Block a user