2021-10-01 15:58:36 +00:00
|
|
|
import QtQuick 2.13
|
2023-01-12 22:39:46 +00:00
|
|
|
|
|
|
|
import StatusQ.Core 0.1
|
|
|
|
|
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()
|
|
|
|
|
2022-07-05 10:12:27 +00:00
|
|
|
implicitHeight: childrenRect.height + Style.current.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
|
|
|
|
font.pixelSize: Style.current.primaryTextFontSize
|
|
|
|
color: Style.current.blue
|
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
|
|
|
|
anchors.topMargin: Style.current.smallPadding
|
|
|
|
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
|
|
|
|
color: Style.current.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
|
|
|
|
anchors.topMargin: Style.current.smallPadding
|
|
|
|
}
|
|
|
|
}
|