From 1860c787e167d1c08e71b15de41ebe7a6b5d0c29 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 22 May 2021 15:23:16 +0300 Subject: Add HTML view for messages --- qml/Message.qml | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'qml/Message.qml') diff --git a/qml/Message.qml b/qml/Message.qml index 492c5cb..fdd895a 100644 --- a/qml/Message.qml +++ b/qml/Message.qml @@ -169,12 +169,29 @@ RowLayout { wrapMode: Text.Wrap font.pixelSize: 14 } - Label { - Layout.fillWidth: true - text: messageObject.message.state == 26 ? "✓" - : messageObject.message.state == 28 ? "✓✓" - : messageObject.message.state == 24 ? "✗" - : ""; + Row { + HtmlViewSheet { + id: htmlSheet + subject: "" + html: "" + } + + Button { + text: "Show full message" + visible: messageObject.message.hasHtml + onPressed: { + htmlSheet.subject = messageObject.message.subject + htmlSheet.html = messageObject.context.getMessageHtml(messageObject.message.id) + htmlSheet.open() + } + } + Label { + Layout.fillWidth: true + text: messageObject.message.state == 26 ? "✓" + : messageObject.message.state == 28 ? "✓✓" + : messageObject.message.state == 24 ? "✗" + : ""; + } } } } -- cgit v1.2.3-70-g09d2