aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/app.js4
-rw-r--r--src/features/nostrlogin.js13
-rw-r--r--src/i18n.js5
-rw-r--r--tools/onboard-backup-test.js6
-rw-r--r--tools/onboard-migrate-door-test.js4
5 files changed, 18 insertions, 14 deletions
diff --git a/src/app.js b/src/app.js
index 33a47c1..9ce7190 100644
--- a/src/app.js
+++ b/src/app.js
@@ -4197,7 +4197,7 @@ function onboardScreen() {
};
// All the sign-in doors (Google, passkey, Nostr) — the feature supplies
// them; the single-button fallback keeps builds without it working.
- const signinDoors = () => featureHook('frontDoorSignin')
+ const signinDoors = (opts) => featureHook('frontDoorSignin', opts)
|| h('button', { class: 'btn-block', style: 'padding:14px', onClick: () => {
o.step = 'signin';
ui.nostrLoginOpen = true;
@@ -4246,7 +4246,7 @@ function onboardScreen() {
o.step = 'seed';
render();
} }, t('onbRestoreDoor')),
- signinDoors(),
+ signinDoors({ short: true }),
// The move from the original coinos.io: it stashes the intent the
// /migrate link stashes (the move needs a wallet and a payment address
// first) and explains that before any twelve words appear.
diff --git a/src/features/nostrlogin.js b/src/features/nostrlogin.js
index a4cfa24..4a811fc 100644
--- a/src/features/nostrlogin.js
+++ b/src/features/nostrlogin.js
@@ -429,20 +429,21 @@ export function nostrLoginFeature(ctx) {
}
// passkeyFirst: the front door lists the passkey right under the seed
// phrase, before Google (Adam, 2026-11-06)
- function externalButtons(run, big = false, passkeyFirst = false) {
+ // short: under a "Sign in" heading the buttons just name the way in
+ function externalButtons(run, big = false, passkeyFirst = false, short = false) {
const hasPasskey = typeof window !== 'undefined' && !!window.PublicKeyCredential && !!navigator.credentials;
const pad = big ? 'padding:14px' : '';
const google = [
h('button', { class: 'btn-block', style: pad, disabled: ui.nostrLoginBusy,
onClick: () => googleLogin(run) },
- markedLabel(GOOGLE_MARK, t('nlGoogle'), ui.nostrLoginVia === 'google')),
+ markedLabel(GOOGLE_MARK, t(short ? 'doorGoogle' : 'nlGoogle'), ui.nostrLoginVia === 'google')),
GOOGLE_CENTRAL !== GOOGLE_LEGACY
? h('button', { class: 'linklike small', style: 'align-self:center', disabled: ui.nostrLoginBusy, onClick: () => googleLogin(run, GOOGLE_LEGACY) }, t('nlGooglePrev'))
: null,
];
const passkey = hasPasskey
? h('button', { class: 'btn-block', style: pad, disabled: ui.nostrLoginBusy,
- onClick: () => passkeyLogin(run) }, markedLabel(PASSKEY_MARK, t('nlPasskey'), ui.nostrLoginVia === 'passkey'))
+ onClick: () => passkeyLogin(run) }, markedLabel(PASSKEY_MARK, t(short ? 'doorPasskey' : 'nlPasskey'), ui.nostrLoginVia === 'passkey'))
: null;
return passkeyFirst ? [passkey, ...google] : [...google, passkey];
}
@@ -863,9 +864,9 @@ export function nostrLoginFeature(ctx) {
// The front door's ways in, loose: the page spaces them evenly with the
// seed-phrase and coinos.io doors around them (a wrapper of their own
// put 8px between these and 20px between them and the rest).
- frontDoorSignin() {
+ frontDoorSignin({ short = false } = {}) {
return [
- ...externalButtons(loginWith, true, true),
+ ...externalButtons(loginWith, true, true, short),
h('button', { class: 'btn-block', style: 'padding:14px', onClick: () => {
if (ui.onb) ui.onb.step = 'signin';
ui.nostrLoginOpen = true;
@@ -873,7 +874,7 @@ export function nostrLoginFeature(ctx) {
render();
} }, h('span', { style: 'display:flex;align-items:center;justify-content:center;gap:8px' },
h('span', { style: 'display:flex;flex-shrink:0', html: OSTRICH }),
- t('nlSignInNostr'))),
+ t(short ? 'doorNostr' : 'nlSignInNostr'))),
ui.nostrLoginError ? h('div', { class: 'notice err' }, ui.nostrLoginError) : null,
].filter(Boolean);
},
diff --git a/src/i18n.js b/src/i18n.js
index ecf0363..e45fa49 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -1405,7 +1405,10 @@ const STR = {
backupReminderGo: 'Write it down',
onbSeedTitle: 'Set up your wallet',
onbRestoreTitle: 'Enter seed phrase',
- onbRestoreDoor: 'Sign in with seed phrase',
+ onbRestoreDoor: 'Seed phrase',
+ doorPasskey: 'Passkey',
+ doorGoogle: 'Google',
+ doorNostr: 'Nostr',
onbSignInExisting: 'Sign in to an existing account',
onbSigninTitle: 'Sign in',
onbLegacyTitle: 'Move your coinos.io account',
diff --git a/tools/onboard-backup-test.js b/tools/onboard-backup-test.js
index c7221fd..3eefb02 100644
--- a/tools/onboard-backup-test.js
+++ b/tools/onboard-backup-test.js
@@ -47,10 +47,10 @@ async function signIn() {
// sign-in ways are one step in
await waitText(page, 'sign in to an existing account');
await page.evaluate(() => document.getElementById('onb-signin')?.click());
- await waitText(page, 'sign in with nostr');
+ await waitText(page, 'migrate a coinos account');
const sk = generateSecretKey();
const nsec = bech32.encode('nsec', bech32.toWords(sk), 1000);
- await click(page, 'sign in with nostr');
+ await click(page, 'nostr');
await waitText(page, 'log in with nostr');
await page.waitForSelector('input[placeholder*="nsec" i], textarea[placeholder*="nsec" i]', { timeout: 15000 });
await page.type('input[placeholder*="nsec" i], textarea[placeholder*="nsec" i]', nsec);
@@ -107,7 +107,7 @@ try {
await page.reload({ waitUntil: 'domcontentloaded' });
await waitText(page, 'sign in to an existing account');
await page.evaluate(() => document.getElementById('onb-signin')?.click());
- await waitText(page, 'sign in with nostr');
+ await waitText(page, 'migrate a coinos account');
const door = await page.evaluate(() => {
const btns = [...document.querySelectorAll('button')].filter((b) => b.offsetParent && b.textContent.trim());
const b = document.getElementById('onb-restore');
diff --git a/tools/onboard-migrate-door-test.js b/tools/onboard-migrate-door-test.js
index 6328919..ac2252c 100644
--- a/tools/onboard-migrate-door-test.js
+++ b/tools/onboard-migrate-door-test.js
@@ -31,7 +31,7 @@ try {
check('the front door paints', await waitText(page, 'create a new wallet'));
// the sign-in ways (migrating included) wait behind "Sign in to an existing account"
await page.click('#onb-signin');
- await waitText(page, 'sign in with seed phrase', 5000);
+ await waitText(page, 'migrate a coinos account', 5000);
const btns = await visible(page);
const iMigrate = btns.findIndex((b) => b.id === 'onb-migrate');
const iLastSignin = btns.map((b) => /sign in/i.test(b.text)).lastIndexOf(true);
@@ -47,7 +47,7 @@ try {
doors.map((b) => b.text).join(' | '));
await page.reload({ waitUntil: 'domcontentloaded' });
check('a refresh stays on the move page', await waitText(page, 'move your coinos.io account', 8000));
- check('Back returns to the sign-in choices', await clickText(page, 'back') && await waitText(page, 'sign in with seed phrase', 5000));
+ check('Back returns to the sign-in choices', await clickText(page, 'back') && await waitText(page, 'migrate a coinos account', 5000));
const forgot = await page.evaluate(() => !localStorage.getItem('btc-wallet-migrate-link'));
check('…and forgets the intent', forgot);
await page.click('#onb-migrate');