shadok-ai 0.15.25 → 0.15.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/public/index.html +36 -2
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -2400,9 +2400,14 @@
|
|
|
2400
2400
|
<div id="authOverlay" class="overlay" hidden>
|
|
2401
2401
|
<div id="authPanel" class="sec-panel">
|
|
2402
2402
|
<div class="sec-head">
|
|
2403
|
-
<strong>Sign in to Claude</strong>
|
|
2403
|
+
<strong id="authTitle">Sign in to Claude</strong>
|
|
2404
|
+
<!-- Shown only for a VOLUNTARY re-login (opened from the panel / banner
|
|
2405
|
+
while already signed in): that card is optional, so it must close.
|
|
2406
|
+
The signed-OUT card has no ✕ on purpose — signing in is the only way
|
|
2407
|
+
to make the instance usable, so it stays a funnel. -->
|
|
2408
|
+
<button id="authClose" type="button" title="Cancel" hidden aria-label="Cancel">✕</button>
|
|
2404
2409
|
</div>
|
|
2405
|
-
<p class="sec-note">This instance isn't signed in to Claude, so it can't start any agent.</p>
|
|
2410
|
+
<p class="sec-note" id="authNote">This instance isn't signed in to Claude, so it can't start any agent.</p>
|
|
2406
2411
|
<div class="field">
|
|
2407
2412
|
<span class="label">1 — Open this link and authorise</span>
|
|
2408
2413
|
<a id="authLink" target="_blank" rel="noopener">starting…</a>
|
|
@@ -7671,6 +7676,8 @@
|
|
|
7671
7676
|
if (!$("setupOverlay").hidden) { closeSetup(); e.preventDefault(); return; }
|
|
7672
7677
|
if (!$("cronOverlay").hidden) { $("cronOverlay").hidden = true; e.preventDefault(); return; }
|
|
7673
7678
|
if (!$("telegramOverlay").hidden) { $("telegramOverlay").hidden = true; e.preventDefault(); return; }
|
|
7679
|
+
// Only a voluntary (dismissable) re-login card; the signed-out funnel ignores Escape.
|
|
7680
|
+
if (!$("authOverlay").hidden && authDismissable) { closeAuthCard(); e.preventDefault(); return; }
|
|
7674
7681
|
if ($("diffpanel").classList.contains("open")) { $("diffpanel").classList.remove("open"); e.preventDefault(); return; }
|
|
7675
7682
|
// 2. A clickable dialog awaiting an answer → do nothing.
|
|
7676
7683
|
if (active && active.dialogBubble) return;
|
|
@@ -9137,8 +9144,31 @@
|
|
|
9137
9144
|
// button and the expiry banner). Without it the server short-circuits to
|
|
9138
9145
|
// {alreadySignedIn} and the card closes doing nothing — which is exactly the
|
|
9139
9146
|
// no-op the signed-in re-login affordances would otherwise be.
|
|
9147
|
+
// A voluntary re-login (force) is dismissable; the signed-out funnel is not.
|
|
9148
|
+
// Tracked so Escape and a backdrop click only close the card they should.
|
|
9149
|
+
let authDismissable = false;
|
|
9150
|
+
|
|
9151
|
+
// Close a VOLUNTARY re-login card, cancelling the pending `claude auth login`
|
|
9152
|
+
// child on the server so it is not left waiting on stdin (DELETE /auth/login
|
|
9153
|
+
// → cancelLogin). Never the way out of the signed-out funnel.
|
|
9154
|
+
function closeAuthCard() {
|
|
9155
|
+
if (!authDismissable) return;
|
|
9156
|
+
fetch("/auth/login", { method: "DELETE" }).catch(() => {});
|
|
9157
|
+
authDismissable = false;
|
|
9158
|
+
$("authClose").hidden = true;
|
|
9159
|
+
$("authOverlay").hidden = true;
|
|
9160
|
+
}
|
|
9161
|
+
|
|
9140
9162
|
async function openAuthCard(force = false) {
|
|
9141
9163
|
if (!$("authOverlay").hidden) return; // a flow is already on screen
|
|
9164
|
+
authDismissable = force;
|
|
9165
|
+
$("authClose").hidden = !force;
|
|
9166
|
+
// A forced re-login comes from a SIGNED-IN instance, so the "not signed in"
|
|
9167
|
+
// copy would be wrong there; say what the card actually does.
|
|
9168
|
+
$("authTitle").textContent = force ? "Re-login to Claude" : "Sign in to Claude";
|
|
9169
|
+
$("authNote").textContent = force
|
|
9170
|
+
? "Renew this instance's Claude sign-in. Your agents keep running in the meantime."
|
|
9171
|
+
: "This instance isn't signed in to Claude, so it can't start any agent.";
|
|
9142
9172
|
$("authOverlay").hidden = false;
|
|
9143
9173
|
$("authMsg").hidden = true;
|
|
9144
9174
|
const link = $("authLink");
|
|
@@ -9199,6 +9229,10 @@
|
|
|
9199
9229
|
}
|
|
9200
9230
|
});
|
|
9201
9231
|
|
|
9232
|
+
$("authClose").addEventListener("click", closeAuthCard);
|
|
9233
|
+
// Backdrop click closes a dismissable (voluntary) card; the panel itself does not.
|
|
9234
|
+
$("authOverlay").addEventListener("click", (e) => { if (e.target === $("authOverlay")) closeAuthCard(); });
|
|
9235
|
+
|
|
9202
9236
|
$("tgUnbind").addEventListener("click", () => { if (confirm("Unbind the current board group? You'll need to /setup a group again in Telegram.")) putTelegram({ unbindGroup: true }); });
|
|
9203
9237
|
$("telegramBtn").addEventListener("click", () => { $("telegramOverlay").hidden = false; loadTelegram(); });
|
|
9204
9238
|
$("telegramClose").addEventListener("click", () => { $("telegramOverlay").hidden = true; });
|