Warning, /network/tokodon/src/content/ui/StatusComposer/StatusPreview.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
0002 // SPDX-License-Identifier: GPL-3.0-or-later
0003
0004 import QtQuick
0005 import org.kde.kirigami 2 as Kirigami
0006 import QtQuick.Controls 2 as QQC2
0007 import QtQuick.Layouts
0008 import org.kde.tokodon
0009 import org.kde.tokodon.private
0010
0011 import "../StatusDelegate" as StatusDelegate
0012
0013 ColumnLayout {
0014 id: root
0015
0016 required property var post
0017
0018 spacing: Kirigami.Units.largeSpacing
0019
0020 StatusDelegate.InlineIdentityInfo {
0021 identity: root.post.authorIdentity
0022 secondary: false
0023
0024 Kirigami.Heading {
0025 id: heading
0026 font.pixelSize: Config.defaultFont.pixelSize + 1
0027 text: root.post.relativeTime
0028 verticalAlignment: Text.AlignVCenter
0029 Layout.alignment: Qt.AlignTop
0030 Layout.fillHeight: true
0031 elide: Text.ElideRight
0032 }
0033 }
0034
0035 Loader {
0036 active: post.content.length > 0
0037 visible: active
0038
0039 Layout.fillWidth: true
0040
0041 sourceComponent: StatusDelegate.PostContent {
0042 content: post.content
0043 expandedPost: false
0044 secondary: true
0045 shouldOpenInternalLinks: false
0046 }
0047 }
0048
0049 Loader {
0050 active: post.attachments.length > 0
0051 visible: active
0052
0053 Layout.fillWidth: true
0054
0055 sourceComponent: StatusDelegate.AttachmentGrid {
0056 expandedPost: false
0057 attachments: root.post.attachments
0058 sensitive: false
0059 secondary: false
0060 inViewPort: true
0061 canHideMedia: false
0062 identity: root.post.authorIdentity
0063 viewportWidth: root.width
0064 }
0065 }
0066
0067 Loader {
0068 active: root.post.poll !== null
0069 sourceComponent: StatusDelegate.StatusPoll
0070 {
0071 poll: root.post.poll
0072 }
0073 }
0074 }