feat(tailscalectl): add popout skeleton with header row
This commit is contained in:
parent
77430ec0d4
commit
c3f63873ac
1 changed files with 27 additions and 15 deletions
|
|
@ -77,7 +77,7 @@ PluginComponent {
|
||||||
PopoutComponent {
|
PopoutComponent {
|
||||||
id: popout
|
id: popout
|
||||||
headerText: "Tailscale"
|
headerText: "Tailscale"
|
||||||
detailsText: root.tailscaleIP ? root.tailscaleIP : "Not connected"
|
detailsText: root.isConnected ? "Connected" : "Disconnected"
|
||||||
showCloseButton: true
|
showCloseButton: true
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
|
|
@ -90,31 +90,43 @@ PluginComponent {
|
||||||
Row {
|
Row {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
spacing: Theme.spacingS
|
spacing: Theme.spacingS
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.leftMargin: Theme.spacingM
|
||||||
|
anchors.rightMargin: Theme.spacingM
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
hoverEnabled: true
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
width: toggleIcon.implicitWidth
|
||||||
|
height: toggleIcon.implicitHeight
|
||||||
|
onClicked: toggleTailscale()
|
||||||
|
|
||||||
|
DankIcon {
|
||||||
|
id: toggleIcon
|
||||||
|
name: root.isConnected ? "power" : "power_off"
|
||||||
|
size: Theme.iconSize
|
||||||
|
color: Theme.primary
|
||||||
|
anchors.centerIn: parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: root.isConnected ? "Connected" : "Disconnected"
|
text: root.tailscaleIP || "—"
|
||||||
font.pixelSize: Theme.fontSizeMedium
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: root.isConnected ? Theme.primary : Theme.surfaceVariantText
|
color: Theme.primary
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
Item { width: 1; height: 1; Layout.fillWidth: true }
|
Item { width: 1; height: 1; Layout.fillWidth: true }
|
||||||
|
|
||||||
StyledText {
|
StyledText {
|
||||||
text: "Toggle"
|
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
|
||||||
color: Theme.surfaceText
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
StyledText {
|
|
||||||
width: parent.width
|
|
||||||
text: "Exit node: " + (root.currentExitNode || "None")
|
text: "Exit node: " + (root.currentExitNode || "None")
|
||||||
font.pixelSize: Theme.fontSizeSmall
|
font.pixelSize: Theme.fontSizeSmall
|
||||||
color: Theme.surfaceVariantText
|
color: Theme.surfaceVariantText
|
||||||
horizontalAlignment: Text.AlignHCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue