2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
2023-01-12 22:39:46 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
2024-10-15 19:26:12 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
2023-01-12 22:39:46 +00:00
|
|
|
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared 1.0
|
|
|
|
import shared.panels 1.0
|
2022-07-12 08:22:53 +00:00
|
|
|
import shared.stores 1.0
|
2021-10-01 15:58:36 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: root
|
2022-02-25 10:42:32 +00:00
|
|
|
|
|
|
|
property int gapFrom: 0
|
|
|
|
property int gapTo: 0
|
|
|
|
|
|
|
|
signal clicked()
|
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
implicitHeight: childrenRect.height + Theme.smallPadding * 2
|
2022-02-25 10:42:32 +00:00
|
|
|
|
2021-10-01 15:58:36 +00:00
|
|
|
Separator {
|
|
|
|
id: sep1
|
|
|
|
}
|
|
|
|
StyledText {
|
|
|
|
id: fetchMoreButton
|
|
|
|
font.weight: Font.Medium
|
2024-10-15 19:26:12 +00:00
|
|
|
font.pixelSize: Theme.primaryTextFontSize
|
|
|
|
color: Theme.palette.primaryColor1
|
2022-07-12 08:22:53 +00:00
|
|
|
text: qsTr("Fetch messages")
|
2021-10-01 15:58:36 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: sep1.bottom
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.smallPadding
|
2021-10-01 15:58:36 +00:00
|
|
|
MouseArea {
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
|
|
|
root.clicked();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
StyledText {
|
|
|
|
id: fetchDate
|
|
|
|
anchors.top: fetchMoreButton.bottom
|
|
|
|
anchors.topMargin: 3
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2022-02-25 10:42:32 +00:00
|
|
|
width: parent.width
|
|
|
|
wrapMode: Text.WordWrap
|
2021-10-01 15:58:36 +00:00
|
|
|
horizontalAlignment: Text.AlignHCenter
|
2024-10-15 19:26:12 +00:00
|
|
|
color: Theme.palette.secondaryText
|
2023-01-12 22:39:46 +00:00
|
|
|
text: qsTr("Between %1 and %2").arg(LocaleUtils.formatDate(root.gapFrom * 1000)).arg(LocaleUtils.formatDate(root.gapTo * 1000))
|
2021-10-01 15:58:36 +00:00
|
|
|
}
|
|
|
|
Separator {
|
|
|
|
anchors.top: fetchDate.bottom
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.smallPadding
|
2021-10-01 15:58:36 +00:00
|
|
|
}
|
|
|
|
}
|