Compare commits
2 commits
5523738dc5
...
fdad635b10
| Author | SHA1 | Date | |
|---|---|---|---|
| fdad635b10 | |||
| 299a2dcf85 |
3 changed files with 7 additions and 7 deletions
|
|
@ -321,14 +321,9 @@ PluginComponent {
|
|||
}
|
||||
}
|
||||
|
||||
// propagateComposedEvents: true so that right-clicks both trigger our context menu
|
||||
// *and* bubble to any parent MouseArea (e.g. for shell-level drag handling).
|
||||
// Documented because the default (false) is far more common and this choice
|
||||
// frequently surprises future maintainers.
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.RightButton
|
||||
propagateComposedEvents: true
|
||||
onClicked: {
|
||||
root.toggleTailscale()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
function parsePeers(peerMap) {
|
||||
if (!peerMap) return []
|
||||
return Object.keys(peerMap).map(function (key) {
|
||||
if (!Object.prototype.hasOwnProperty.call(peerMap, key)) return null
|
||||
var p = peerMap[key]
|
||||
return {
|
||||
hostname: p.HostName || key,
|
||||
|
|
@ -8,16 +9,20 @@ function parsePeers(peerMap) {
|
|||
online: p.Online || false,
|
||||
exitNode: p.ExitNodeOption || false
|
||||
}
|
||||
})
|
||||
}).filter(function (peer) { return peer !== null })
|
||||
}
|
||||
|
||||
function makeExitNodeCommand(hostname) {
|
||||
if (hostname === "") {
|
||||
return ["tailscale", "set", "--exit-node="]
|
||||
}
|
||||
return ["tailscale", "set", "--exit-node=" + hostname]
|
||||
}
|
||||
|
||||
function findActiveExitNode(peerMap) {
|
||||
if (!peerMap) return ""
|
||||
for (const key in peerMap) {
|
||||
if (!Object.prototype.hasOwnProperty.call(peerMap, key)) continue
|
||||
const p = peerMap[key]
|
||||
if (p.ExitNode) {
|
||||
return p.HostName || key
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Tailscale",
|
||||
"description": "Tailscale status and controls on the Dank Bar",
|
||||
"version": "0.1.0",
|
||||
"author": "John Morris & Vybe (AI Slop... er... Coding Assistant)",
|
||||
"author": "John Morris",
|
||||
"icon": "vpn_key",
|
||||
"type": "widget",
|
||||
"component": "./TailscaleWidget.qml",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue