Click on user icon to open user detail dialog.
This commit is contained in:
@@ -11,6 +11,7 @@ import Spectral.Setting 0.1
|
|||||||
import Spectral.Component 2.0
|
import Spectral.Component 2.0
|
||||||
import Spectral.Dialog 2.0
|
import Spectral.Dialog 2.0
|
||||||
import Spectral.Font 0.1
|
import Spectral.Font 0.1
|
||||||
|
import Spectral.Effect 2.0
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
readonly property bool avatarVisible: !sentByMe && (aboveAuthor !== author || aboveSection !== section || aboveEventType === "state" || aboveEventType === "emote" || aboveEventType === "other")
|
readonly property bool avatarVisible: !sentByMe && (aboveAuthor !== author || aboveSection !== section || aboveEventType === "state" || aboveEventType === "emote" || aboveEventType === "other")
|
||||||
@@ -53,6 +54,20 @@ ColumnLayout {
|
|||||||
visible: avatarVisible
|
visible: avatarVisible
|
||||||
hint: author.displayName
|
hint: author.displayName
|
||||||
source: author.avatarMediaId
|
source: author.avatarMediaId
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: userDetailDialog
|
||||||
|
|
||||||
|
UserDetailDialog {}
|
||||||
|
}
|
||||||
|
|
||||||
|
RippleEffect {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
circular: true
|
||||||
|
|
||||||
|
onClicked: userDetailDialog.createObject(ApplicationWindow.overlay, {"room": currentRoom, "user": author}).open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
@@ -54,6 +54,20 @@ ColumnLayout {
|
|||||||
visible: avatarVisible
|
visible: avatarVisible
|
||||||
hint: author.displayName
|
hint: author.displayName
|
||||||
source: author.avatarMediaId
|
source: author.avatarMediaId
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: userDetailDialog
|
||||||
|
|
||||||
|
UserDetailDialog {}
|
||||||
|
}
|
||||||
|
|
||||||
|
RippleEffect {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
circular: true
|
||||||
|
|
||||||
|
onClicked: userDetailDialog.createObject(ApplicationWindow.overlay, {"room": currentRoom, "user": author}).open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
@@ -50,6 +50,20 @@ ColumnLayout {
|
|||||||
visible: avatarVisible
|
visible: avatarVisible
|
||||||
hint: author.displayName
|
hint: author.displayName
|
||||||
source: author.avatarMediaId
|
source: author.avatarMediaId
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: userDetailDialog
|
||||||
|
|
||||||
|
UserDetailDialog {}
|
||||||
|
}
|
||||||
|
|
||||||
|
RippleEffect {
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
circular: true
|
||||||
|
|
||||||
|
onClicked: userDetailDialog.createObject(ApplicationWindow.overlay, {"room": currentRoom, "user": author}).open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
|||||||
@@ -39,7 +39,9 @@ Dialog {
|
|||||||
|
|
||||||
font.pixelSize: 18
|
font.pixelSize: 18
|
||||||
font.bold: true
|
font.bold: true
|
||||||
wrapMode: Label.Wrap
|
|
||||||
|
elide: Text.ElideRight
|
||||||
|
wrapMode: Text.NoWrap
|
||||||
text: user ? user.displayName : "No Name"
|
text: user ? user.displayName : "No Name"
|
||||||
color: MPalette.foreground
|
color: MPalette.foreground
|
||||||
}
|
}
|
||||||
@@ -47,7 +49,6 @@ Dialog {
|
|||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
wrapMode: Label.Wrap
|
|
||||||
text: "Online"
|
text: "Online"
|
||||||
color: MPalette.lighter
|
color: MPalette.lighter
|
||||||
}
|
}
|
||||||
@@ -78,7 +79,8 @@ Dialog {
|
|||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
wrapMode: Label.Wrap
|
elide: Text.ElideRight
|
||||||
|
wrapMode: Text.NoWrap
|
||||||
text: user ? user.id : "No ID"
|
text: user ? user.id : "No ID"
|
||||||
color: MPalette.accent
|
color: MPalette.accent
|
||||||
}
|
}
|
||||||
@@ -122,8 +124,8 @@ Dialog {
|
|||||||
|
|
||||||
background: RippleEffect {
|
background: RippleEffect {
|
||||||
onPrimaryClicked: {
|
onPrimaryClicked: {
|
||||||
room.connection.isIgnored(user) ? room.connection.removeFromIgnoredUsers(user) : room.connection.addToIgnoredUsers(user)
|
|
||||||
root.close()
|
root.close()
|
||||||
|
room.connection.isIgnored(user) ? room.connection.removeFromIgnoredUsers(user) : room.connection.addToIgnoredUsers(user)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user