bastion 0.55.3
ci / personal-data (push) Successful in 5s
ci / test (push) Successful in 3m51s
ci / fuzz (push) Successful in 2m55s

This commit is contained in:
Privatae
2026-10-25 23:16:45 +00:00
parent 77b7853ae1
commit 8822d5df85
136 changed files with 8638 additions and 1641 deletions
+23
View File
@@ -45,6 +45,29 @@ func openPopupWindow(url string) error {
return openBrowser(url)
}
// approvalsOpener is what a click on an approval notification opens: the
// daemon's own popup, or, in the tray beside a system service, the tray's page
// (tray_pipe_windows.go sets it before the notifier starts).
var approvalsOpener = openApprovalsPopup
// openApprovalsPopup is what the tray's approvals line and a click on the
// approval notification do: open /approvals, signed in, as a small window.
//
// It goes through localUIEntryURLTo exactly as openLocalUI goes through
// localUIEntryURL — a one-use ticket minted against the running daemon — so it
// cannot hand out a link that does not authenticate, and the ticket's redirect
// lands on the page itself rather than on a menu.
func openApprovalsPopup(from string) {
entry, _, err := localUIEntryURLTo(uiApprovalsPath)
if err != nil {
uilogf("%s: %v\n", from, err)
return
}
if err := openPopupWindow(entry); err != nil {
uilogf("%s: %v\n", from, err)
}
}
// findEdge looks where Edge installs: machine-wide under both Program Files
// roots, and per-user under LOCALAPPDATA. "" when it is in none of them.
func findEdge() string {