aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/nostrlogin.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-11-06 23:38:59 -0700
committerAdam Soltys <[email protected]>2026-11-06 23:38:59 -0700
commitc481e5389e801f7b5fc4902a748aebcf79025607 (patch)
tree701370aef413562a67c51ea2db09f39bab6a8dda /src/features/nostrlogin.js
parent5e315005b72a8e9e6670f10b1d30b532763f7fe6 (diff)
downloadcoinosv3-c481e5389e801f7b5fc4902a748aebcf79025607.tar.gz
coinosv3-c481e5389e801f7b5fc4902a748aebcf79025607.zip
Under the "Sign in" heading the ways in just name themselves: Seed phrase, Passkey, Google, Nostr. "I think we can remove 'Sign in' from all the sign in buttons since it's at the top in the heading" (Adam, 2026-11-06). frontDoorSignin takes { short } and the sign-in step asks for it; the coinos.io move page (under "or") and the sign-in sheet in Messages keep the full "Sign in with …" labels, where nothing above says it. "Migrate a coinos account" is unchanged. Tests wait for the list by its last door
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6Ts5Tktega8VbLg31q
Diffstat (limited to 'src/features/nostrlogin.js')
-rw-r--r--src/features/nostrlogin.js13
1 files changed, 7 insertions, 6 deletions
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);
},