aboutsummaryrefslogtreecommitdiffstats
path: root/src/features/nostrlogin.js
diff options
context:
space:
mode:
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);
},