From b52c9194f5a25e4b372d2c16cfdd4c9bce2a6a9d Mon Sep 17 00:00:00 2001 From: Burrowdev Date: Fri, 23 Oct 2026 07:04:45 +0300 Subject: [PATCH] feat: burrow:// links sign the account page in The account page's "Sign in with the Burrow client" opens burrow://account?n=. The copy already running takes the link (a copy started with one gives way at once); it uses the account being played, or the one remembered for its server (a choice when there are several), gets a ticket from the server and opens it in the browser. Installed copies register the protocol when they start; the Windows installer, the Linux packages and the macOS app declare it too. --- app/index.html | 87 ++++++++++++++++++++++++++++++++----- app/main.js | 60 ++++++++++++++++++++++++- app/preload.js | 2 + installer/builder.config.js | 4 ++ installer/burrow.nsi | 7 +++ tools/build-mac.sh | 5 +++ 6 files changed, 154 insertions(+), 11 deletions(-) diff --git a/app/index.html b/app/index.html index 672a061..81ca874 100644 --- a/app/index.html +++ b/app/index.html @@ -168,11 +168,11 @@ a { color: inherit; text-underline-offset: 3px; } a:hover { color: var(--text); } - #ban-popup, #rename-popup { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, 0.85); } - #rename-box { width: 100%; max-width: 400px; padding: 28px 28px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; } - #rename-box h2 { margin: 0 0 16px; font-size: 22px; font-weight: 700; } - #rename-box .buttons { display: flex; gap: 10px; margin-top: 6px; } - #rename-box .buttons button { flex: 1; margin: 0; padding: 10px 16px 11px; font-size: 16px; } + #ban-popup, #rename-popup, #link-popup { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, 0.85); } + #rename-box, #link-box { width: 100%; max-width: 400px; padding: 28px 28px 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; } + #rename-box h2, #link-box h2 { margin: 0 0 16px; font-size: 22px; font-weight: 700; } + #rename-box .buttons, #link-box .buttons { display: flex; gap: 10px; margin-top: 6px; } + #rename-box .buttons button, #link-box .buttons button { flex: 1; margin: 0; padding: 10px 16px 11px; font-size: 16px; } #ban-box { width: 100%; max-width: 480px; max-height: 100%; overflow-y: auto; padding: 30px 30px 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; } #ban-head { display: flex; align-items: center; gap: 14px; } #ban-head img { flex: none; width: 48px; height: 48px; } @@ -193,8 +193,9 @@ #ban-buttons button { flex: 1; margin: 0; padding: 10px 16px 11px; font-size: 16px; } #saved { margin: 0 0 16px; padding: 0; list-style: none; } - #saved li { display: flex; gap: 6px; margin: 0 0 6px; } - #saved .account { + #saved li, #link-accounts li { display: flex; gap: 6px; margin: 0 0 6px; } + #link-accounts { margin: 0 0 16px; padding: 0; list-style: none; } + #saved .account, #link-accounts .account { flex: 1; min-width: 0; display: flex; @@ -204,10 +205,10 @@ text-align: left; font-weight: 700; } - #saved .account::after { content: "→"; margin-left: auto; color: var(--muted); font-weight: 400; } - #saved .account:hover { background: var(--text); border-color: var(--text); color: #000; } + #saved .account::after, #link-accounts .account::after { content: "→"; margin-left: auto; color: var(--muted); font-weight: 400; } + #saved .account:hover, #link-accounts .account:hover { background: var(--text); border-color: var(--text); color: #000; } #saved .account:hover::after, #saved .account:hover .where { color: #000; } - #saved .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + #saved .name, #link-accounts .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #saved .where { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; } #saved .forget { flex: none; width: 40px; padding: 0; border-color: transparent; color: var(--muted); font-size: 18px; } #saved .forget:hover { color: var(--text); border-color: var(--line); } @@ -440,6 +441,16 @@ + +