72 lines
1.5 KiB
QML
72 lines
1.5 KiB
QML
// SPDX-FileCopyrightText: 2024 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
import QtQuick
|
|
import QtQuick.Controls as QQC2
|
|
import QtQuick.Layouts
|
|
|
|
import org.kde.kirigami as Kirigami
|
|
import com.redstrate.sukai
|
|
|
|
QQC2.ItemDelegate {
|
|
id: root
|
|
|
|
required property string uri
|
|
required property string content
|
|
required property Author account
|
|
required property var mediaUrls
|
|
required property var createdAt
|
|
|
|
padding: 0
|
|
topPadding: Kirigami.Units.largeSpacing
|
|
bottomPadding: Kirigami.Units.largeSpacing
|
|
leftPadding: Kirigami.Units.largeSpacing
|
|
rightPadding: Kirigami.Units.largeSpacing
|
|
|
|
topInset: 0
|
|
leftInset: 0
|
|
rightInset: 0
|
|
bottomInset: 0
|
|
|
|
highlighted: false
|
|
hoverEnabled: false
|
|
|
|
onClicked: Navigation.openThread(uri)
|
|
|
|
background: Rectangle {
|
|
color: Kirigami.Theme.backgroundColor
|
|
|
|
Kirigami.Separator {
|
|
width: flexColumn.innerWidth
|
|
anchors {
|
|
horizontalCenter: parent.horizontalCenter
|
|
bottom: parent.bottom
|
|
}
|
|
}
|
|
}
|
|
|
|
contentItem: PostLayout {
|
|
id: flexColumn
|
|
|
|
StatusInfoBar {
|
|
id: infoBar
|
|
|
|
account: root.account
|
|
createdAt: root.createdAt
|
|
|
|
Layout.fillWidth: true
|
|
}
|
|
|
|
StatusContent {
|
|
text: root.content
|
|
|
|
Layout.fillWidth: true
|
|
}
|
|
|
|
StatusEmbed {
|
|
mediaUrls: root.mediaUrls
|
|
|
|
Layout.maximumHeight: 512
|
|
}
|
|
}
|
|
}
|