Compare commits

..

No commits in common. "fdad635b10a41ab9ccf7e4591e6949ae67cbfa96" and "5523738dc5248bb370fa803aba0983b67f5f83a6" have entirely different histories.

3 changed files with 7 additions and 7 deletions

View file

@ -321,9 +321,14 @@ 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()
}

View file

@ -1,7 +1,6 @@
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,
@ -9,20 +8,16 @@ 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

View file

@ -3,7 +3,7 @@
"name": "Tailscale",
"description": "Tailscale status and controls on the Dank Bar",
"version": "0.1.0",
"author": "John Morris",
"author": "John Morris & Vybe (AI Slop... er... Coding Assistant)",
"icon": "vpn_key",
"type": "widget",
"component": "./TailscaleWidget.qml",