Change server list to joinmatrix.org's

This commit is contained in:
plate
2022-08-29 11:03:32 +00:00
committed by Maze
parent 7e9cc8df50
commit 4869c3b019
3 changed files with 9 additions and 79 deletions

View File

@@ -115,7 +115,6 @@ HBox {
model: [
qsTr("Ping"),
qsTr("Name & location"),
qsTr("Stability"),
qsTr("Site"),
]

View File

@@ -66,44 +66,10 @@ HTile {
}
}
TitleRightInfoLabel {
tile: root
font.pixelSize: theme.fontSize.normal
text:
model.stability === -1 ?
"" :
qsTr("%1%").arg(Math.max(0, parseInt(model.stability, 10)))
color:
model.stability >= 95 ? theme.colors.positiveText :
model.stability >= 85 ? theme.colors.warningText :
theme.colors.errorText
HoverHandler { id: rightInfoHover }
HToolTip {
readonly property var times: JSON.parse(model.downtimes_ms)
readonly property real total: utils.sum(times)
visible: model.stability !== -1 && rightInfoHover.hovered
text:
total === 0 ?
qsTr("No downtimes in the last 30 days") :
qsTr(
"Last 30 days downtimes: %1, average: %2, " +
"longest: %3, total: %4"
).arg(times.length)
.arg(utils.formatRelativeTime(total / times.length))
.arg(utils.formatRelativeTime(Math.max.apply(Math,times)))
.arg(utils.formatRelativeTime(total))
}
}
HButton {
icon.name: "server-visit-website"
backgroundColor: "transparent"
onClicked: Qt.openUrlExternally(model.site_url)
onClicked: Qt.openUrlExternally("https://"+model.site_url)
Layout.fillHeight: true
}