-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathStatusPreview.qml
74 lines (60 loc) · 1.77 KB
/
StatusPreview.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// SPDX-FileCopyrightText: 2023 Joshua Goins <[email protected]>
// SPDX-License-Identifier: GPL-3.0-or-later
import QtQuick
import org.kde.kirigami 2 as Kirigami
import QtQuick.Controls 2 as QQC2
import QtQuick.Layouts
import org.kde.tokodon
import org.kde.tokodon.private
import "../PostDelegate" as PostDelegate
ColumnLayout {
id: root
required property var post
spacing: Kirigami.Units.largeSpacing
InlineIdentityInfo {
identity: root.post.authorIdentity
secondary: false
Kirigami.Heading {
id: heading
font.pixelSize: Config.defaultFont.pixelSize + 1
text: root.post.relativeTime
verticalAlignment: Text.AlignVCenter
Layout.alignment: Qt.AlignTop
Layout.fillHeight: true
elide: Text.ElideRight
}
}
Loader {
active: post.content.length > 0
visible: active
Layout.fillWidth: true
sourceComponent: PostDelegate.PostContent {
content: post.content
expandedPost: false
secondary: true
shouldOpenInternalLinks: false
}
}
Loader {
active: post.attachments.length > 0
visible: active
Layout.fillWidth: true
sourceComponent: PostDelegate.AttachmentGrid {
expandedPost: false
attachments: root.post.attachments
sensitive: false
secondary: false
inViewPort: true
canHideMedia: false
identity: root.post.authorIdentity
viewportWidth: root.width
forceCrop: true
}
}
Loader {
active: root.post.poll !== null
sourceComponent: PostDelegate.PostPoll {
poll: root.post.poll
}
}
}