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 {
|
||||
id: popout
|
||||
headerText: "Tailscale"
|
||||
detailsText: root.tailscaleIP ? root.tailscaleIP : "Not connected"
|
||||
detailsText: root.isConnected ? "Connected" : "Disconnected"
|
||||
showCloseButton: true
|
||||
|
||||
Column {
|
||||
|
|
@ -90,32 +90,44 @@ PluginComponent {
|
|||
Row {
|
||||
width: parent.width
|
||||
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 {
|
||||
text: root.isConnected ? "Connected" : "Disconnected"
|
||||
font.pixelSize: Theme.fontSizeMedium
|
||||
color: root.isConnected ? Theme.primary : Theme.surfaceVariantText
|
||||
text: root.tailscaleIP || "—"
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.primary
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Item { width: 1; height: 1; Layout.fillWidth: true }
|
||||
|
||||
StyledText {
|
||||
text: "Toggle"
|
||||
text: "Exit node: " + (root.currentExitNode || "None")
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceText
|
||||
color: Theme.surfaceVariantText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
width: parent.width
|
||||
text: "Exit node: " + (root.currentExitNode || "None")
|
||||
font.pixelSize: Theme.fontSizeSmall
|
||||
color: Theme.surfaceVariantText
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue