|
|
|
@ -114,10 +114,10 @@ Page { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
delegate: Rectangle { |
|
|
|
|
delegate: ItemDelegate { |
|
|
|
|
id: roomItem |
|
|
|
|
|
|
|
|
|
property color background: Nheko.colors.window |
|
|
|
|
property color backgroundColor: Nheko.colors.window |
|
|
|
|
property color importantText: Nheko.colors.text |
|
|
|
|
property color unimportantText: Nheko.colors.buttonText |
|
|
|
|
property color bubbleBackground: Nheko.colors.highlight |
|
|
|
@ -136,20 +136,31 @@ Page { |
|
|
|
|
required property bool isDirect |
|
|
|
|
required property string directChatOtherUserId |
|
|
|
|
|
|
|
|
|
color: background |
|
|
|
|
height: avatarSize + 2 * Nheko.paddingMedium |
|
|
|
|
width: ListView.view.width |
|
|
|
|
state: "normal" |
|
|
|
|
ToolTip.visible: hovered.hovered && collapsed |
|
|
|
|
ToolTip.visible: hovered && collapsed |
|
|
|
|
ToolTip.text: roomName |
|
|
|
|
onClicked: { |
|
|
|
|
console.log("tapped " + roomId); |
|
|
|
|
if (!Rooms.currentRoom || Rooms.currentRoom.roomId !== roomId) |
|
|
|
|
Rooms.setCurrentRoom(roomId); |
|
|
|
|
else |
|
|
|
|
Rooms.resetCurrentRoom(); |
|
|
|
|
} |
|
|
|
|
onPressAndHold: { |
|
|
|
|
if (!isInvite) |
|
|
|
|
roomContextMenu.show(roomId, tags); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
states: [ |
|
|
|
|
State { |
|
|
|
|
name: "highlight" |
|
|
|
|
when: hovered.hovered && !((Rooms.currentRoom && roomId == Rooms.currentRoom.roomId) || Rooms.currentRoomPreview.roomid == roomId) |
|
|
|
|
when: roomItem.hovered && !((Rooms.currentRoom && roomId == Rooms.currentRoom.roomId) || Rooms.currentRoomPreview.roomid == roomId) |
|
|
|
|
|
|
|
|
|
PropertyChanges { |
|
|
|
|
target: roomItem |
|
|
|
|
background: Nheko.colors.dark |
|
|
|
|
backgroundColor: Nheko.colors.dark |
|
|
|
|
importantText: Nheko.colors.brightText |
|
|
|
|
unimportantText: Nheko.colors.brightText |
|
|
|
|
bubbleBackground: Nheko.colors.highlight |
|
|
|
@ -163,7 +174,7 @@ Page { |
|
|
|
|
|
|
|
|
|
PropertyChanges { |
|
|
|
|
target: roomItem |
|
|
|
|
background: Nheko.colors.highlight |
|
|
|
|
backgroundColor: Nheko.colors.highlight |
|
|
|
|
importantText: Nheko.colors.highlightedText |
|
|
|
|
unimportantText: Nheko.colors.highlightedText |
|
|
|
|
bubbleBackground: Nheko.colors.highlightedText |
|
|
|
@ -189,28 +200,6 @@ Page { |
|
|
|
|
acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus | PointerDevice.TouchPad |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
TapHandler { |
|
|
|
|
margin: -Nheko.paddingSmall |
|
|
|
|
onSingleTapped: { |
|
|
|
|
console.log("tapped "+roomId); |
|
|
|
|
if (!Rooms.currentRoom || Rooms.currentRoom.roomId !== roomId) |
|
|
|
|
Rooms.setCurrentRoom(roomId); |
|
|
|
|
else |
|
|
|
|
Rooms.resetCurrentRoom(); |
|
|
|
|
} |
|
|
|
|
onLongPressed: { |
|
|
|
|
if (!isInvite) |
|
|
|
|
roomContextMenu.show(roomId, tags); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
HoverHandler { |
|
|
|
|
id: hovered |
|
|
|
|
|
|
|
|
|
acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus | PointerDevice.TouchPad |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
@ -362,6 +351,10 @@ Page { |
|
|
|
|
visible: hasUnreadMessages |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
background: Rectangle { |
|
|
|
|
color: backgroundColor |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -505,24 +498,28 @@ Page { |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
id: unverifiedStuffBubble |
|
|
|
|
color: Qt.lighter(Nheko.theme.orange, verifyButtonHovered.hovered ? 1.2 : 1.0) |
|
|
|
|
|
|
|
|
|
color: Qt.lighter(Nheko.theme.orange, verifyButtonHovered.hovered ? 1.2 : 1) |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
implicitHeight: explanation.height + Nheko.paddingMedium * 2 |
|
|
|
|
visible: SelfVerificationStatus.status != SelfVerificationStatus.AllVerified |
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
id: unverifiedStuffBubbleContainer |
|
|
|
|
|
|
|
|
|
width: parent.width |
|
|
|
|
height: explanation.height + Nheko.paddingMedium * 2 |
|
|
|
|
spacing: 0 |
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
id: explanation |
|
|
|
|
|
|
|
|
|
Layout.margins: Nheko.paddingMedium |
|
|
|
|
Layout.rightMargin: Nheko.paddingSmall |
|
|
|
|
color: Nheko.colors.buttonText |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
text: switch(SelfVerificationStatus.status) { |
|
|
|
|
text: { |
|
|
|
|
switch (SelfVerificationStatus.status) { |
|
|
|
|
case SelfVerificationStatus.NoMasterKey: |
|
|
|
|
//: Cross-signing setup has not run yet. |
|
|
|
|
return qsTr("Encryption not set up"); |
|
|
|
@ -533,7 +530,8 @@ Page { |
|
|
|
|
//: There are unverified devices signed in to this account. |
|
|
|
|
return qsTr("Please verify your other devices"); |
|
|
|
|
default: |
|
|
|
|
return "" |
|
|
|
|
return ""; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
textFormat: Text.PlainText |
|
|
|
|
wrapMode: Text.Wrap |
|
|
|
@ -558,8 +556,8 @@ Page { |
|
|
|
|
|
|
|
|
|
HoverHandler { |
|
|
|
|
id: verifyButtonHovered |
|
|
|
|
enabled: !closeUnverifiedBubble.hovered |
|
|
|
|
|
|
|
|
|
enabled: !closeUnverifiedBubble.hovered |
|
|
|
|
acceptedDevices: PointerDevice.Mouse | PointerDevice.Stylus | PointerDevice.TouchPad |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -567,13 +565,13 @@ Page { |
|
|
|
|
enabled: !closeUnverifiedBubble.hovered |
|
|
|
|
acceptedButtons: Qt.LeftButton |
|
|
|
|
onSingleTapped: { |
|
|
|
|
if (SelfVerificationStatus.status == SelfVerificationStatus.UnverifiedDevices) { |
|
|
|
|
if (SelfVerificationStatus.status == SelfVerificationStatus.UnverifiedDevices) |
|
|
|
|
SelfVerificationStatus.verifyUnverifiedDevices(); |
|
|
|
|
} else { |
|
|
|
|
else |
|
|
|
|
SelfVerificationStatus.statusChanged(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|