From 83ad00a39863bb6a61e15977202fe2feea2ca696 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 1 Aug 2026 23:07:02 -0700 Subject: Drop npub-locked gifts; collapse Nostr login behind a button Gifts are plain bearer links again: the recipient-npub field, the one-time claim code, the DM delivery, the /lg/ claim route and the NIP-07 in-place decrypt are all gone, along with the crypto that only they used. Unclaimed gifts remain reclaimable by the sender, so nothing can be stranded by the removal. The unlock screen shows a single 'Sign in with Nostr' button that reveals the login options when tapped, instead of the full card competing with create/import. Co-Authored-By: Claude Fable 5 --- src/features/nostrlogin.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/features/nostrlogin.js') diff --git a/src/features/nostrlogin.js b/src/features/nostrlogin.js index 7d4bdc1..d6b73e8 100644 --- a/src/features/nostrlogin.js +++ b/src/features/nostrlogin.js @@ -16,6 +16,9 @@ import { walletForSigner, publishWalletBackup, } from '../nostr-login.js'; +// The nostr ostrich, in the brand's monochrome. +const OSTRICH = ''; + export function nostrLoginFeature(ctx) { const { h, ui, render, wallet, toast } = ctx; @@ -149,8 +152,17 @@ export function nostrLoginFeature(ctx) { h('button', { class: 'btn-primary grow', disabled: ui.nostrLoginBusy, onClick: createForSigner }, ui.nostrLoginBusy ? h('span', { class: 'spinner' }) : t('nlCreateBtn')))); } + // Collapsed by default: one button, expanded only when asked for. + if (!ui.nostrLoginOpen) { + return h('button', { + class: 'btn-block row gap6', style: 'align-items:center;justify-content:center', + onClick: () => { ui.nostrLoginOpen = true; ui.nostrLoginError = ''; render(); }, + }, h('span', { html: OSTRICH }), t('nlSignIn')); + } return h('div', { class: 'card col', style: 'gap:10px' }, - h('h3', { style: 'margin:0' }, t('nlTitle')), + h('div', { class: 'row between' }, + h('h3', { style: 'margin:0' }, t('nlTitle')), + h('span', { class: 'linklike small', onClick: () => { ui.nostrLoginOpen = false; render(); } }, t('cancel'))), h('p', { class: 'small muted', style: 'margin:0' }, t('nlDesc')), signerButtons(loginWith)); } -- cgit v1.2.3