2026-05-15 19:10:50 -07:00
|
|
|
|
import QtQuick
|
2026-05-15 19:28:37 -07:00
|
|
|
|
import QtQuick.Layouts
|
2026-05-15 19:10:50 -07:00
|
|
|
|
import qs.Common
|
|
|
|
|
|
import qs.Services
|
|
|
|
|
|
import qs.Widgets
|
|
|
|
|
|
import qs.Modules.Plugins
|
2026-05-18 18:27:41 +00:00
|
|
|
|
import "./lib.js" as TailscaleLib
|
2026-05-15 19:10:50 -07:00
|
|
|
|
|
|
|
|
|
|
PluginComponent {
|
|
|
|
|
|
id: root
|
|
|
|
|
|
|
2026-05-15 19:14:49 -07:00
|
|
|
|
property bool isConnected: false
|
2026-05-15 19:19:01 -07:00
|
|
|
|
property string tailscaleIP: ""
|
|
|
|
|
|
property string currentExitNode: ""
|
2026-05-17 21:59:59 +00:00
|
|
|
|
property var peers: []
|
2026-05-21 06:37:14 +00:00
|
|
|
|
property string _copyText: ""
|
2026-05-22 21:35:07 +00:00
|
|
|
|
property int _copyIndex: 0
|
2026-05-15 19:19:01 -07:00
|
|
|
|
|
2026-07-15 01:11:59 -07:00
|
|
|
|
// Transient coordination for defensive poll-act-poll toggle (not long-term cache).
|
|
|
|
|
|
// Poll for ground truth → act → poll again for verification.
|
|
|
|
|
|
property string _pendingAction: ""
|
|
|
|
|
|
|
|
|
|
|
|
// Single-flight guard: prevent interleaved status/toggle/exit/copy chains (#15/#30 class).
|
|
|
|
|
|
property bool _busy: false
|
|
|
|
|
|
|
2026-05-15 19:28:37 -07:00
|
|
|
|
layerNamespacePlugin: "tailscalectl"
|
|
|
|
|
|
popoutWidth: 360
|
2026-05-17 21:59:59 +00:00
|
|
|
|
popoutHeight: 400
|
2026-05-15 19:28:37 -07:00
|
|
|
|
|
2026-05-18 05:08:15 +00:00
|
|
|
|
Component.onCompleted: {
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
root._runStatusCheck();
|
2026-05-18 05:08:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
function _runStatusCheck() {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
if (root._busy && root._pendingAction === "") {
|
|
|
|
|
|
// A non-toggle status refresh while something is already in flight: skip.
|
|
|
|
|
|
// Toggle path sets _pendingAction first and is allowed to chain after actions clear busy carefully.
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
root._busy = true;
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
Proc.runCommand("tailscale-status", TailscaleLib.getStatusCommand(), (stdout, code) => {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
var statusOk = (code === 0);
|
|
|
|
|
|
if (statusOk) {
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
const state = TailscaleLib.parseStatusResult(stdout);
|
|
|
|
|
|
root.isConnected = state.isConnected;
|
|
|
|
|
|
root.tailscaleIP = state.tailscaleIP;
|
|
|
|
|
|
root.currentExitNode = state.currentExitNode;
|
|
|
|
|
|
root.peers = state.peers;
|
2026-05-21 20:58:47 +00:00
|
|
|
|
} else {
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
root.isConnected = false;
|
|
|
|
|
|
root.tailscaleIP = "";
|
|
|
|
|
|
root.currentExitNode = "";
|
|
|
|
|
|
root.peers = [];
|
|
|
|
|
|
ToastService.showError("tailscalectl", I18n.tr(TailscaleLib.formatError("status")));
|
2026-05-15 19:14:49 -07:00
|
|
|
|
}
|
2026-05-22 06:34:08 +00:00
|
|
|
|
|
2026-07-15 01:11:59 -07:00
|
|
|
|
const cmd = TailscaleLib.commandForPendingAction(root._pendingAction, root.isConnected, statusOk);
|
2026-05-23 04:41:40 +00:00
|
|
|
|
if (cmd) {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
// Fresh poll succeeded; act, then verify with another status poll.
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
Proc.runCommand("tailscale-toggle", cmd, (out, c) => {
|
|
|
|
|
|
if (c !== 0) {
|
|
|
|
|
|
const action = root.isConnected ? "disconnect" : "connect";
|
|
|
|
|
|
ToastService.showError("tailscalectl", I18n.tr(TailscaleLib.formatError(action)));
|
|
|
|
|
|
}
|
|
|
|
|
|
root._pendingAction = "";
|
2026-07-15 01:11:59 -07:00
|
|
|
|
// Keep busy through verification poll: call internal runner that assumes we own the lock.
|
|
|
|
|
|
root._runStatusCheckUnlocked();
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
});
|
|
|
|
|
|
} else {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
// Includes failed status while a toggle was pending: abort rather than invent up/down.
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
root._pendingAction = "";
|
2026-07-15 01:11:59 -07:00
|
|
|
|
root._busy = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Used only as the continuation after toggle action; assumes _busy is already true.
|
|
|
|
|
|
function _runStatusCheckUnlocked() {
|
|
|
|
|
|
Proc.runCommand("tailscale-status", TailscaleLib.getStatusCommand(), (stdout, code) => {
|
|
|
|
|
|
if (code === 0) {
|
|
|
|
|
|
const state = TailscaleLib.parseStatusResult(stdout);
|
|
|
|
|
|
root.isConnected = state.isConnected;
|
|
|
|
|
|
root.tailscaleIP = state.tailscaleIP;
|
|
|
|
|
|
root.currentExitNode = state.currentExitNode;
|
|
|
|
|
|
root.peers = state.peers;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
root.isConnected = false;
|
|
|
|
|
|
root.tailscaleIP = "";
|
|
|
|
|
|
root.currentExitNode = "";
|
|
|
|
|
|
root.peers = [];
|
|
|
|
|
|
ToastService.showError("tailscalectl", I18n.tr(TailscaleLib.formatError("status")));
|
2026-05-22 06:34:08 +00:00
|
|
|
|
}
|
2026-07-15 01:11:59 -07:00
|
|
|
|
root._busy = false;
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
});
|
2026-05-15 19:14:49 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function toggleTailscale() {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
if (root._busy) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
root._pendingAction = TailscaleLib.PendingAction.TOGGLE;
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
root._runStatusCheck();
|
2026-05-23 04:41:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function refreshStatus() {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
if (root._busy) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
root._runStatusCheck();
|
2026-05-15 19:14:49 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-18 18:27:41 +00:00
|
|
|
|
function setExitNode(hostname) {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
if (root._busy) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
const cmd = TailscaleLib.makeExitNodeCommand(hostname);
|
2026-05-22 20:46:37 +00:00
|
|
|
|
if (!cmd) {
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
ToastService.showError("tailscalectl", I18n.tr(TailscaleLib.getStrings().invalidExitNodeHostname));
|
|
|
|
|
|
return;
|
2026-05-22 20:46:37 +00:00
|
|
|
|
}
|
2026-07-15 01:11:59 -07:00
|
|
|
|
root._busy = true;
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
Proc.runCommand("tailscale-exit", cmd, (stdout, code) => {
|
|
|
|
|
|
if (code !== 0) {
|
|
|
|
|
|
ToastService.showError("tailscalectl", I18n.tr(TailscaleLib.formatError("set")));
|
|
|
|
|
|
}
|
2026-07-15 01:11:59 -07:00
|
|
|
|
// Verify via unlocked status continuation (busy already held).
|
|
|
|
|
|
root._runStatusCheckUnlocked();
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
});
|
2026-05-18 18:27:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-17 23:00:22 +00:00
|
|
|
|
function copyToClipboard(text) {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
if (root._busy) {
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
root._copyText = text;
|
|
|
|
|
|
root._copyIndex = 0;
|
2026-07-15 01:11:59 -07:00
|
|
|
|
root._busy = true;
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
root._runNextCopy();
|
2026-05-21 06:37:14 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-22 21:35:07 +00:00
|
|
|
|
function _runNextCopy() {
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
const cmds = TailscaleLib.getClipboardCommands(root._copyText);
|
2026-05-22 21:35:07 +00:00
|
|
|
|
if (root._copyIndex >= cmds.length) {
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
ToastService.showError("tailscalectl", I18n.tr(TailscaleLib.formatError("clipboard")));
|
2026-07-15 01:11:59 -07:00
|
|
|
|
root._busy = false;
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
return;
|
2026-05-20 19:37:08 +00:00
|
|
|
|
}
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
Proc.runCommand("tailscale-copy-" + root._copyIndex, cmds[root._copyIndex], (stdout, code) => {
|
|
|
|
|
|
if (code === 0) {
|
|
|
|
|
|
ToastService.showInfo(I18n.tr(TailscaleLib.getStrings().copied).arg(root._copyText));
|
2026-07-15 01:11:59 -07:00
|
|
|
|
root._busy = false;
|
feat(proc): direct drop-in port from 4x raw Process to Proc singleton (exact poll-act-poll behavior preserved)
- Removed import Quickshell.Io + all 4 Process { toggleProcess, copyProcess, exitNodeProcess, statusCheck }
- All one-shot commands now use Proc.runCommand(id, argv, (stdout, exitCode) => {...})
- _pendingAction moved to clean root property (was hacked onto statusCheck object)
- Introduced _runStatusCheck() helper + updated wrappers (toggleTailscale, refreshStatus, setExitNode, copyToClipboard, _runNextCopy)
- Exact same sequencing and defensive logic:
* toggle: set pending → status poll for truth → decide up/down → act → post-act status verify
* copy retry state machine unchanged (just Proc instead of .command/.running)
* exit-node and generic refresh paths identical
- Added explicit comment documenting why the poll-act-poll exists (defensive, not forbidden state per AGENTS.md)
- stderr detail dropped from action errors (per chosen A strategy; generic messages only)
- All new JS follows repo ; + {} style
- I18n wrappers already in place from prior slice
Written by AI agent working for @jtmorris. Model: grok-build-0.1.
2026-05-24 20:58:31 +00:00
|
|
|
|
} else {
|
|
|
|
|
|
root._copyIndex += 1;
|
|
|
|
|
|
root._runNextCopy();
|
|
|
|
|
|
}
|
|
|
|
|
|
});
|
2026-05-17 23:00:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-15 19:28:37 -07:00
|
|
|
|
popoutContent: Component {
|
|
|
|
|
|
PopoutComponent {
|
2026-05-24 20:57:49 +00:00
|
|
|
|
headerText: I18n.tr(TailscaleLib.getStrings().header)
|
|
|
|
|
|
detailsText: root.isConnected ? I18n.tr(TailscaleLib.getStrings().connected) : I18n.tr(TailscaleLib.getStrings().disconnected)
|
2026-05-15 19:28:37 -07:00
|
|
|
|
showCloseButton: true
|
|
|
|
|
|
|
2026-05-17 21:32:46 +00:00
|
|
|
|
Item {
|
2026-05-17 21:59:59 +00:00
|
|
|
|
id: contentItem
|
2026-05-15 19:28:37 -07:00
|
|
|
|
width: parent.width
|
2026-07-15 01:11:59 -07:00
|
|
|
|
height: Theme.spacingM + statusRow.implicitHeight + Theme.spacingM + peerArea.height + Theme.spacingM
|
2026-05-15 19:28:37 -07:00
|
|
|
|
|
2026-07-15 01:11:59 -07:00
|
|
|
|
RowLayout {
|
2026-05-17 21:32:46 +00:00
|
|
|
|
id: statusRow
|
|
|
|
|
|
y: Theme.spacingM
|
2026-05-15 19:28:37 -07:00
|
|
|
|
width: parent.width
|
|
|
|
|
|
spacing: Theme.spacingS
|
2026-05-17 21:11:14 +00:00
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.leftMargin: Theme.spacingM
|
2026-05-17 21:32:46 +00:00
|
|
|
|
anchors.right: parent.right
|
2026-05-17 21:11:14 +00:00
|
|
|
|
anchors.rightMargin: Theme.spacingM
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
hoverEnabled: true
|
2026-07-15 01:11:59 -07:00
|
|
|
|
Layout.alignment: Qt.AlignVCenter
|
2026-05-17 21:11:14 +00:00
|
|
|
|
width: toggleIcon.implicitWidth
|
|
|
|
|
|
height: toggleIcon.implicitHeight
|
2026-05-17 21:32:46 +00:00
|
|
|
|
onClicked: {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
root.toggleTailscale();
|
2026-05-17 21:32:46 +00:00
|
|
|
|
}
|
2026-05-17 21:11:14 +00:00
|
|
|
|
|
|
|
|
|
|
DankIcon {
|
|
|
|
|
|
id: toggleIcon
|
|
|
|
|
|
name: root.isConnected ? "power" : "power_off"
|
|
|
|
|
|
size: Theme.iconSize
|
|
|
|
|
|
color: Theme.primary
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-05-15 19:28:37 -07:00
|
|
|
|
|
|
|
|
|
|
StyledText {
|
2026-05-17 21:11:14 +00:00
|
|
|
|
text: root.tailscaleIP || "—"
|
|
|
|
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
|
|
|
|
color: Theme.primary
|
2026-07-15 01:11:59 -07:00
|
|
|
|
Layout.alignment: Qt.AlignVCenter
|
2026-05-15 19:28:37 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-15 01:11:59 -07:00
|
|
|
|
Item {
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
height: 1
|
|
|
|
|
|
}
|
2026-05-15 19:28:37 -07:00
|
|
|
|
|
|
|
|
|
|
StyledText {
|
2026-05-24 20:57:49 +00:00
|
|
|
|
text: I18n.tr(TailscaleLib.getStrings().exitNodePrefix) + (root.currentExitNode || I18n.tr(TailscaleLib.getStrings().none))
|
2026-05-15 19:28:37 -07:00
|
|
|
|
font.pixelSize: Theme.fontSizeSmall
|
2026-05-17 21:11:14 +00:00
|
|
|
|
color: Theme.surfaceVariantText
|
2026-07-15 01:11:59 -07:00
|
|
|
|
Layout.alignment: Qt.AlignVCenter
|
2026-05-15 19:28:37 -07:00
|
|
|
|
}
|
2026-05-18 18:27:41 +00:00
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
visible: root.currentExitNode !== ""
|
2026-05-18 18:27:41 +00:00
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
hoverEnabled: true
|
2026-07-15 01:11:59 -07:00
|
|
|
|
Layout.alignment: Qt.AlignVCenter
|
2026-05-18 18:27:41 +00:00
|
|
|
|
width: clearExitNodeText.implicitWidth
|
|
|
|
|
|
height: clearExitNodeText.implicitHeight
|
|
|
|
|
|
onClicked: {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
root.setExitNode("");
|
2026-05-18 18:27:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
|
|
id: clearExitNodeText
|
|
|
|
|
|
text: "×"
|
|
|
|
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
|
|
|
|
color: Theme.surfaceVariantText
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-05-15 19:28:37 -07:00
|
|
|
|
}
|
2026-05-17 21:59:59 +00:00
|
|
|
|
|
2026-07-15 01:11:59 -07:00
|
|
|
|
// Peer list when connected; empty-state hint when not (#55).
|
|
|
|
|
|
Item {
|
|
|
|
|
|
id: peerArea
|
2026-05-17 21:59:59 +00:00
|
|
|
|
y: Theme.spacingM + statusRow.implicitHeight + Theme.spacingM
|
|
|
|
|
|
width: parent.width - Theme.spacingM * 2
|
2026-07-15 01:11:59 -07:00
|
|
|
|
height: root.isConnected
|
|
|
|
|
|
? Math.min(Math.max(root.peers.length, 1) * (Theme.fontSizeSmall + Theme.spacingXS), 200)
|
|
|
|
|
|
: (Theme.fontSizeSmall + Theme.spacingXS)
|
2026-05-17 21:59:59 +00:00
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.leftMargin: Theme.spacingM
|
2026-05-17 23:00:22 +00:00
|
|
|
|
|
2026-07-15 01:11:59 -07:00
|
|
|
|
StyledText {
|
|
|
|
|
|
visible: !root.isConnected
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
text: I18n.tr(TailscaleLib.getStrings().notConnectedHint)
|
|
|
|
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
|
|
|
|
color: Theme.surfaceVariantText
|
|
|
|
|
|
horizontalAlignment: Text.AlignHCenter
|
|
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
|
|
}
|
2026-05-17 21:59:59 +00:00
|
|
|
|
|
2026-07-15 01:11:59 -07:00
|
|
|
|
ListView {
|
|
|
|
|
|
id: peerList
|
|
|
|
|
|
visible: root.isConnected
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
model: root.peers
|
|
|
|
|
|
interactive: true
|
|
|
|
|
|
// Desktop popout: no rubber-band overshoot (#27).
|
|
|
|
|
|
boundsBehavior: Flickable.StopAtBounds
|
|
|
|
|
|
clip: true
|
|
|
|
|
|
|
|
|
|
|
|
delegate: Item {
|
|
|
|
|
|
width: peerList.width
|
|
|
|
|
|
height: Theme.fontSizeSmall + Theme.spacingXS
|
|
|
|
|
|
|
|
|
|
|
|
Row {
|
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
|
anchors.right: parent.right
|
2026-05-17 23:00:22 +00:00
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2026-07-15 01:11:59 -07:00
|
|
|
|
spacing: Theme.spacingS
|
|
|
|
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
width: peerHostnameText.implicitWidth
|
|
|
|
|
|
height: peerHostnameText.implicitHeight
|
|
|
|
|
|
onClicked: {
|
|
|
|
|
|
root.copyToClipboard(modelData.hostname);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
|
|
id: peerHostnameText
|
|
|
|
|
|
text: modelData.hostname
|
|
|
|
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
|
|
|
|
color: modelData.online ? Theme.primary : Theme.surfaceVariantText
|
|
|
|
|
|
}
|
2026-05-17 23:00:22 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-15 01:11:59 -07:00
|
|
|
|
MouseArea {
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
width: peerIpText.implicitWidth
|
|
|
|
|
|
height: peerIpText.implicitHeight
|
|
|
|
|
|
onClicked: {
|
|
|
|
|
|
root.copyToClipboard(modelData.ip);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
|
|
id: peerIpText
|
|
|
|
|
|
text: modelData.ip
|
|
|
|
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
|
|
|
|
color: Theme.surfaceVariantText
|
|
|
|
|
|
}
|
2026-05-18 18:27:41 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-07-15 01:11:59 -07:00
|
|
|
|
MouseArea {
|
|
|
|
|
|
visible: modelData.exitNode
|
|
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
width: exitNodeButton.implicitWidth
|
|
|
|
|
|
height: exitNodeButton.implicitHeight
|
|
|
|
|
|
onClicked: {
|
|
|
|
|
|
root.setExitNode(modelData.hostname);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
StyledText {
|
|
|
|
|
|
id: exitNodeButton
|
|
|
|
|
|
text: "↗"
|
|
|
|
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
|
|
|
|
color: (root.currentExitNode === modelData.hostname) ? Theme.primary : Theme.surfaceVariantText
|
|
|
|
|
|
}
|
2026-05-17 23:00:22 +00:00
|
|
|
|
}
|
2026-05-17 21:59:59 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-05-15 19:28:37 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-17 21:23:01 +00:00
|
|
|
|
MouseArea {
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
acceptedButtons: Qt.RightButton
|
2026-05-17 21:32:46 +00:00
|
|
|
|
onClicked: {
|
2026-07-15 01:11:59 -07:00
|
|
|
|
root.toggleTailscale();
|
2026-05-17 21:32:46 +00:00
|
|
|
|
}
|
2026-05-17 21:23:01 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-05-15 19:10:50 -07:00
|
|
|
|
horizontalBarPill: Component {
|
2026-05-17 21:18:02 +00:00
|
|
|
|
Row {
|
|
|
|
|
|
spacing: Theme.spacingS
|
|
|
|
|
|
|
2026-05-17 21:23:01 +00:00
|
|
|
|
DankIcon {
|
|
|
|
|
|
name: root.isConnected ? "vpn_key" : "vpn_key_off"
|
|
|
|
|
|
size: Theme.iconSize
|
|
|
|
|
|
color: root.isConnected ? Theme.primary : Theme.surfaceText
|
2026-05-15 19:14:49 -07:00
|
|
|
|
}
|
2026-05-15 19:10:50 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
verticalBarPill: Component {
|
2026-05-17 21:18:02 +00:00
|
|
|
|
Column {
|
|
|
|
|
|
spacing: Theme.spacingXS
|
|
|
|
|
|
|
2026-05-17 21:23:01 +00:00
|
|
|
|
DankIcon {
|
|
|
|
|
|
name: root.isConnected ? "vpn_key" : "vpn_key_off"
|
|
|
|
|
|
size: Theme.iconSize
|
|
|
|
|
|
color: root.isConnected ? Theme.primary : Theme.surfaceText
|
2026-05-15 19:14:49 -07:00
|
|
|
|
}
|
2026-05-15 19:10:50 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2026-05-22 20:46:37 +00:00
|
|
|
|
}
|