Compare commits
No commits in common. "fdad635b10a41ab9ccf7e4591e6949ae67cbfa96" and "5523738dc5248bb370fa803aba0983b67f5f83a6" have entirely different histories.
fdad635b10
...
5523738dc5
3 changed files with 7 additions and 7 deletions
|
|
@ -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 {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
acceptedButtons: Qt.RightButton
|
acceptedButtons: Qt.RightButton
|
||||||
|
propagateComposedEvents: true
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.toggleTailscale()
|
root.toggleTailscale()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
function parsePeers(peerMap) {
|
function parsePeers(peerMap) {
|
||||||
if (!peerMap) return []
|
if (!peerMap) return []
|
||||||
return Object.keys(peerMap).map(function (key) {
|
return Object.keys(peerMap).map(function (key) {
|
||||||
if (!Object.prototype.hasOwnProperty.call(peerMap, key)) return null
|
|
||||||
var p = peerMap[key]
|
var p = peerMap[key]
|
||||||
return {
|
return {
|
||||||
hostname: p.HostName || key,
|
hostname: p.HostName || key,
|
||||||
|
|
@ -9,20 +8,16 @@ function parsePeers(peerMap) {
|
||||||
online: p.Online || false,
|
online: p.Online || false,
|
||||||
exitNode: p.ExitNodeOption || false
|
exitNode: p.ExitNodeOption || false
|
||||||
}
|
}
|
||||||
}).filter(function (peer) { return peer !== null })
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function makeExitNodeCommand(hostname) {
|
function makeExitNodeCommand(hostname) {
|
||||||
if (hostname === "") {
|
|
||||||
return ["tailscale", "set", "--exit-node="]
|
|
||||||
}
|
|
||||||
return ["tailscale", "set", "--exit-node=" + hostname]
|
return ["tailscale", "set", "--exit-node=" + hostname]
|
||||||
}
|
}
|
||||||
|
|
||||||
function findActiveExitNode(peerMap) {
|
function findActiveExitNode(peerMap) {
|
||||||
if (!peerMap) return ""
|
if (!peerMap) return ""
|
||||||
for (const key in peerMap) {
|
for (const key in peerMap) {
|
||||||
if (!Object.prototype.hasOwnProperty.call(peerMap, key)) continue
|
|
||||||
const p = peerMap[key]
|
const p = peerMap[key]
|
||||||
if (p.ExitNode) {
|
if (p.ExitNode) {
|
||||||
return p.HostName || key
|
return p.HostName || key
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"name": "Tailscale",
|
"name": "Tailscale",
|
||||||
"description": "Tailscale status and controls on the Dank Bar",
|
"description": "Tailscale status and controls on the Dank Bar",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"author": "John Morris",
|
"author": "John Morris & Vybe (AI Slop... er... Coding Assistant)",
|
||||||
"icon": "vpn_key",
|
"icon": "vpn_key",
|
||||||
"type": "widget",
|
"type": "widget",
|
||||||
"component": "./TailscaleWidget.qml",
|
"component": "./TailscaleWidget.qml",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue