aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-26 22:34:42 -0700
committerAdam Soltys <[email protected]>2026-08-26 22:34:42 -0700
commitb11e3b50483ae254caccebe220275863eb762a47 (patch)
tree6a13aed3aa26c3904088b69bb4e0dceb274bfff2 /src
parent742f4c3d9fad94d0dbb86889351d0ff506d00699 (diff)
downloadcoinosv3-b11e3b50483ae254caccebe220275863eb762a47.tar.gz
coinosv3-b11e3b50483ae254caccebe220275863eb762a47.zip
The Google button keeps its own counsel: no flickering narration beneath it — just a quiet spinner in place of the label while the popup does the talking
Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_019eA8JRq9Wr7z2fRQk99HLi
Diffstat (limited to 'src')
-rw-r--r--src/features/nostrlogin.js19
-rw-r--r--src/i18n.js4
2 files changed, 10 insertions, 13 deletions
diff --git a/src/features/nostrlogin.js b/src/features/nostrlogin.js
index ac991c8..981491e 100644
--- a/src/features/nostrlogin.js
+++ b/src/features/nostrlogin.js
@@ -221,18 +221,20 @@ export function nostrLoginFeature(ctx) {
async function googleLogin(run) {
const popup = window.open('about:blank', 'OAuth', 'width=600,height=600');
ui.nostrLoginError = '';
+ // no status narration — a quiet spinner on the button itself is the whole
+ // story (the popup is where anything needing the user's eyes happens)
+ ui.nostrLoginVia = 'google';
+ busy(true);
try {
const pome = await import('../pomegranate.js');
- const { uri } = await pome.loginWithGoogle(popup, {
- onStatus: (s) => { ui.nostrLoginStatus = t('nlGoogleStatus_' + s); render(); },
- });
- ui.nostrLoginStatus = '';
+ const { uri } = await pome.loginWithGoogle(popup);
await run(() => bunkerSigner(uri, { onAuth: (url) => { ui.nostrLoginAuthUrl = url; render(); } }));
} catch (e) {
try { popup && popup.close(); } catch {}
- ui.nostrLoginStatus = '';
ui.nostrLoginError = e.message;
- render();
+ } finally {
+ ui.nostrLoginVia = null;
+ busy(false);
}
}
@@ -281,9 +283,8 @@ export function nostrLoginFeature(ctx) {
const pad = big ? 'padding:14px' : '';
return [
h('button', { class: 'btn-block', style: pad, disabled: ui.nostrLoginBusy,
- onClick: () => googleLogin(run) }, markedLabel(GOOGLE_MARK, t('nlGoogle'))),
- ui.nostrLoginStatus ? h('div', { class: 'row gap6', style: 'align-items:center;justify-content:center' },
- h('span', { class: 'spinner sm' }), h('span', { class: 'small muted' }, ui.nostrLoginStatus)) : null,
+ onClick: () => googleLogin(run) },
+ ui.nostrLoginVia === 'google' ? h('span', { class: 'spinner sm' }) : markedLabel(GOOGLE_MARK, t('nlGoogle'))),
hasPasskey
? h('button', { class: 'btn-block', style: pad, disabled: ui.nostrLoginBusy,
onClick: () => passkeyLogin(run) }, markedLabel(PASSKEY_MARK, t('nlPasskey')))
diff --git a/src/i18n.js b/src/i18n.js
index ab3315d..2409c13 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -628,10 +628,6 @@ const STR = {
nlDesc: 'Open the same wallet on any device — with Google, a passkey, or your Nostr account.',
nlExtension: 'Use browser extension',
nlGoogle: 'Sign in with Google',
- nlGoogleStatus_checking: 'Checking your account…',
- nlGoogleStatus_splitting: 'Creating your key (split across signers)…',
- nlGoogleStatus_registering: 'Registering with signers…',
- nlGoogleStatus_connecting: 'Connecting…',
nlPasskey: 'Sign in with a passkey',
nlPasskeyNone: 'No passkey was used. Create one for this wallet?',
nlPasskeyCreate: 'Create passkey',