feat(hephaestus.x): landing 'Sign in' becomes a Bitcoin Cash wallet dropdown
- site/hephaestus.x/index.html: replace single 'Sign in with wallet' CTA with
a <details> dropdown labelled 'Bitcoin Cash wallet'. Menu items:
Sign in -> /user/oauth2/hephaestus-wallet#import
Sign up -> /user/oauth2/hephaestus-wallet#create (pill: easiest)
WizardConnect -> /user/oauth2/hephaestus-wallet#connect (pill: most private)
Same emoji + copy scheme as the wallet accordion, so the landing previews
the choices the user will see after clicking through.
- Hephaestus/auth-proxy/public/wallet.js: renderTabs() now reads location.hash
and auto-opens the matching <details> option on load (create/import/connect).
Fragments survive Forgejo's OAuth redirect chain, so a click on 'Sign up'
from the landing lands the user directly on the Create accordion.
This commit is contained in:
parent
34b58b8637
commit
04bf46b174
1 changed files with 8 additions and 0 deletions
|
|
@ -211,6 +211,14 @@ function renderTabs() {
|
|||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Auto-open a specific option when the URL fragment is one of #create / #import / #connect
|
||||
// (e.g. links from the hephaestus.x landing dropdown). Fragments survive OAuth redirects.
|
||||
const hash = (location.hash || "").replace(/^#/, "").toLowerCase();
|
||||
if (hash === "create" || hash === "import" || hash === "connect") {
|
||||
const target = app.querySelector(`details.wallet-opt[data-choice="${hash}"]`);
|
||||
if (target) target.open = true;
|
||||
}
|
||||
}
|
||||
|
||||
function populateFlow(kind, flow) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue