Add info pop-up explaining how to get a BCP auth token
The token field's purpose was clear but not how to obtain one; add a "?" button that opens a modal with the DevTools Network-tab steps. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MRS5Lvcig4TNpPyviUooGa
This commit is contained in:
@@ -34,8 +34,16 @@
|
||||
|
||||
<!-- Optional: BCP auth token for backfilling missing faction/disposition from submitted lists -->
|
||||
<details class="mb-6 bg-base-200 rounded-box">
|
||||
<summary class="cursor-pointer px-4 py-2 text-sm opacity-70 select-none">
|
||||
Have a BCP subscription? Add your auth token to backfill missing faction/disposition data
|
||||
<summary class="cursor-pointer px-4 py-2 text-sm opacity-70 select-none flex items-center gap-2">
|
||||
<span>Have a BCP subscription? Add your auth token to backfill missing faction/disposition data</span>
|
||||
<button
|
||||
id="bcp-token-help-btn"
|
||||
type="button"
|
||||
class="btn btn-circle btn-ghost btn-xs shrink-0"
|
||||
aria-label="How do I get my BCP auth token?"
|
||||
title="How do I get my BCP auth token?"
|
||||
onclick="event.preventDefault()"
|
||||
>?</button>
|
||||
</summary>
|
||||
<div class="px-4 pb-2 flex gap-2 items-center flex-wrap">
|
||||
<input
|
||||
@@ -55,6 +63,33 @@
|
||||
<p class="px-4 pb-3 text-xs" id="bcp-token-status"></p>
|
||||
</details>
|
||||
|
||||
<!-- How-to-get-a-BCP-token dialog, opened by the "?" button above -->
|
||||
<dialog id="bcp-token-help-modal" class="modal">
|
||||
<div class="modal-box">
|
||||
<h3 class="font-bold text-lg">Getting your BCP auth token</h3>
|
||||
<ol class="list-decimal list-inside text-sm space-y-2 mt-3">
|
||||
<li>Log in at <span class="font-mono">bestcoastpairings.com</span> in this browser (must have an active subscription).</li>
|
||||
<li>Open your browser's developer tools (<kbd class="kbd kbd-sm">F12</kbd>, or right-click → Inspect) and switch to the <span class="font-semibold">Network</span> tab.</li>
|
||||
<li>Back on BCP, open any event or your profile so the page makes a new request — refreshing the page works.</li>
|
||||
<li>In the Network tab, click any request to <span class="font-mono">newprod-api.bestcoastpairings.com</span>.</li>
|
||||
<li>Find the <span class="font-mono">authorization</span> request header. Copy everything after <span class="font-mono">Bearer </span> — that's your token.</li>
|
||||
<li>Paste it into the field above and click <span class="font-semibold">Save</span>.</li>
|
||||
</ol>
|
||||
<p class="text-xs opacity-50 mt-3">
|
||||
Tokens are short-lived (about an hour), so you'll need to repeat this occasionally.
|
||||
The token never leaves your browser except in requests it makes directly to BCP's own API.
|
||||
</p>
|
||||
<div class="modal-action">
|
||||
<form method="dialog">
|
||||
<button class="btn btn-sm">Got it</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<form method="dialog" class="modal-backdrop">
|
||||
<button>close</button>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<!-- Banner (warnings / errors) -->
|
||||
<div class="alert mb-6 hidden" id="banner"></div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user