From 23f18ff13e0a8c612d04727de2ccfadf2d13ff7c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 1 Oct 2026 22:48:11 -0700 Subject: Shared note links open on the post, with names and faces The server renders /nevent1 and /note1 pages with the thread inlined (post, root, replies, kind 0s) and Open Graph tags; the client seeds its thread cache from it and opens the thread on the first paint. Without it, a pending frame holds the screen instead of the front door. Profile lookups ask our relays and the profile indexes at once, streamed, instead of one after the other behind five-second waits. A thread opened straight from a link has no Back button. Co-Authored-By: Claude Opus 5.5 --- src/app.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/app.js') diff --git a/src/app.js b/src/app.js index 7131476..64564be 100644 --- a/src/app.js +++ b/src/app.js @@ -1014,6 +1014,9 @@ function goBack(toParent) { if (navIndex > 0) history.back(); else { toParent(); render(); } } +// Whether an in-app Back has anywhere of ours to go. A page opened straight +// from a link has nothing under it; its Back would invent a parent. +const canGoBack = () => navIndex > 0; // ---------------------------------------------------------------- utilities let toastTimer; @@ -5710,7 +5713,7 @@ async function importSnapshotFile(e) { // sits just before boot so every helper it captures is defined; the hooks are // only invoked at runtime (first render happens after loadLocale below). const ctx = { - h, ui, render, wallet, toast, copy, copyBtn, pasteBtn, blankSend, goBack, goHome, openExternal, showSend, + h, ui, render, wallet, toast, copy, copyBtn, pasteBtn, blankSend, goBack, canGoBack, goHome, openExternal, showSend, fmtAmount, unitLabel, unitTag, getUnit: () => unit, toggleUnit, download, // in fiat the typed figure is money, so it needs today's price to become sats parseAmount: (v, u) => parseAmount(v, u, rateNow()), -- cgit v1.2.3