aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-09-21 12:16:17 -0700
committerAdam Soltys <[email protected]>2026-09-21 12:16:17 -0700
commit8dbbe74b2bf9714370197816928c93fe3a34cbd4 (patch)
treed87182c0c85d2cbdc08215c99d1ad676ecfd37f1 /src/features
parent5c84bced9f4577352f9377551991747f529193c2 (diff)
downloadcoinosv3-8dbbe74b2bf9714370197816928c93fe3a34cbd4.tar.gz
coinosv3-8dbbe74b2bf9714370197816928c93fe3a34cbd4.zip
Seed words read down each column; the Google central is a parameter with a door to the previous one.
Word grids flow down a column then the next, with the row count from the word count — on a phone the first column is 1–6, the way a hand copies a list. pomegranate.js takes the central as an option (CENTRALS.coinos is auth.coinos.io, now deployed; the default stays auth.njump.me until its Google client is live), and the sign-in card grows a "previous server" line once the default moves, so accounts made under njump keep working. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01Tmfg8k5f3TbNJS34qiqHAp
Diffstat (limited to 'src/features')
-rw-r--r--src/features/gifts.js2
-rw-r--r--src/features/nostrlogin.js13
2 files changed, 12 insertions, 3 deletions
diff --git a/src/features/gifts.js b/src/features/gifts.js
index 20b192c..052a107 100644
--- a/src/features/gifts.js
+++ b/src/features/gifts.js
@@ -209,7 +209,7 @@ export function giftsFeature(ctx) {
h('div', { class: 'card col' },
h('h3', {}, t('recoveryPhrase')),
h('div', { class: 'warn-box' }, t('writeDownWarn')),
- h('div', { class: 'words' },
+ h('div', { class: 'words', style: '--rows-3:' + Math.ceil(words.length / 3) + ';--rows-2:' + Math.ceil(words.length / 2) },
words.map((w, i) => h('div', { class: 'w' }, h('span', { class: 'n' }, i + 1), h('span', { class: 't' }, w)))
),
h('div', { class: 'row gap6' }, copyBtn(wallet.mnemonic, t('copyPhrase'))),
diff --git a/src/features/nostrlogin.js b/src/features/nostrlogin.js
index 503384f..1d78b39 100644
--- a/src/features/nostrlogin.js
+++ b/src/features/nostrlogin.js
@@ -311,7 +311,7 @@ export function nostrLoginFeature(ctx) {
// "Sign in with Google" — pomegranate: the code (and its FROST dealer)
// rides in a lazy chunk, so the popup must open HERE, inside the click's
// user activation, and the module navigates it once loaded.
- async function googleLogin(run) {
+ async function googleLogin(run, central = null) {
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
@@ -320,7 +320,7 @@ export function nostrLoginFeature(ctx) {
busy(true);
try {
const pome = await import('../pomegranate.js');
- const { uri } = await pome.loginWithGoogle(popup);
+ const { uri } = await pome.loginWithGoogle(popup, { central });
await run(() => bunkerSigner(uri, { onAuth: (url) => { ui.nostrLoginAuthUrl = url; render(); } }));
} catch (e) {
try { popup && popup.close(); } catch {}
@@ -375,6 +375,12 @@ export function nostrLoginFeature(ctx) {
// Google + passkey, with their transient status rows — shared between the
// collapsed front-door card and the expanded signer list.
+ // Google accounts live per pomegranate central. coinos runs its own
+ // (auth.coinos.io); whoever signed in while auth.njump.me was the default
+ // still has a door to it. Mirrors pomegranate.js's CENTRALS (that module
+ // is a lazy chunk, so the two strings live here too).
+ const GOOGLE_CENTRAL = 'https://auth.njump.me'; // flip to auth.coinos.io with pomegranate.js DEFAULT_CENTRAL
+ const GOOGLE_LEGACY = 'https://auth.njump.me';
function externalButtons(run, big = false) {
const hasPasskey = typeof window !== 'undefined' && !!window.PublicKeyCredential && !!navigator.credentials;
const pad = big ? 'padding:14px' : '';
@@ -382,6 +388,9 @@ export function nostrLoginFeature(ctx) {
h('button', { class: 'btn-block', style: pad, disabled: ui.nostrLoginBusy,
onClick: () => googleLogin(run) },
markedLabel(GOOGLE_MARK, t('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,
hasPasskey
? h('button', { class: 'btn-block', style: pad, disabled: ui.nostrLoginBusy,
onClick: () => passkeyLogin(run) }, markedLabel(PASSKEY_MARK, t('nlPasskey'), ui.nostrLoginVia === 'passkey'))