mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 11:02:30 -04:00
Style the trusted node details view
This commit is contained in:
parent
fd38129b09
commit
666ae5ecf3
2 changed files with 73 additions and 7 deletions
|
@ -18,6 +18,7 @@
|
|||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.0
|
||||
import "components/."
|
||||
|
||||
Item
|
||||
{
|
||||
|
@ -25,19 +26,48 @@ Item
|
|||
|
||||
property string pgpName
|
||||
property alias pgpId: pgpIdTxt.text
|
||||
property bool isOnline
|
||||
|
||||
property string nodeCert
|
||||
|
||||
property var locations
|
||||
|
||||
|
||||
Image
|
||||
{
|
||||
id: nodeStatusImage
|
||||
source: isOnline?
|
||||
"icons/state-ok.png" :
|
||||
"icons/state-offline.png"
|
||||
|
||||
fillMode: Image.PreserveAspectFit
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 6
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
|
||||
|
||||
|
||||
Column
|
||||
{
|
||||
id: pgpColumn
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.top: nodeStatusImage.bottom
|
||||
width: parent.width
|
||||
|
||||
Text { text: nodeDetailsRoot.pgpName.replace(" (Generated by RetroShare) <>", "") }
|
||||
Text { id: pgpIdTxt }
|
||||
Text
|
||||
{
|
||||
text: nodeDetailsRoot.pgpName.replace(" (Generated by RetroShare) <>", "")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: 20
|
||||
}
|
||||
Text
|
||||
{
|
||||
id: pgpIdTxt
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: "darkslategrey"
|
||||
}
|
||||
}
|
||||
|
||||
JSONListModel
|
||||
|
@ -48,10 +78,36 @@ Item
|
|||
|
||||
ListView
|
||||
{
|
||||
width: parent.width
|
||||
width: parent.width * .75
|
||||
anchors.top: pgpColumn.bottom
|
||||
anchors.topMargin: 5
|
||||
anchors.bottom: buttonsRow.top
|
||||
model: jsonModel.model
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
headerPositioning: ListView.OverlayHeader
|
||||
|
||||
clip: true
|
||||
snapMode: ListView.SnapToItem
|
||||
|
||||
header:Rectangle
|
||||
{
|
||||
color: "aliceblue"
|
||||
width: parent.width
|
||||
z: 2
|
||||
height: headetText.contentHeight + 10
|
||||
radius: 10
|
||||
|
||||
Text
|
||||
{
|
||||
id: headetText
|
||||
text: "Node locations ("+jsonModel.model.count+")"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.italic: true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
delegate: Column
|
||||
{
|
||||
height: 60
|
||||
|
@ -61,8 +117,9 @@ Item
|
|||
|
||||
Row
|
||||
{
|
||||
id: idRow
|
||||
height: 30
|
||||
spacing: 10
|
||||
spacing: 4
|
||||
|
||||
Image
|
||||
{
|
||||
|
@ -83,7 +140,14 @@ Item
|
|||
}
|
||||
}
|
||||
|
||||
Text { text: model.peer_id }
|
||||
TextAndIcon
|
||||
{
|
||||
width: parent.width
|
||||
innerText: model.peer_id
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
iconUrl: "/icons/keyring.svg"
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue