aboutsummaryrefslogtreecommitdiffstats
path: root/src/app.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-06-21 23:27:27 -0700
committerAdam Soltys <[email protected]>2026-06-21 23:27:27 -0700
commit44231703087408884ad3ed31c313fc306d4e90c8 (patch)
tree2a8e6569d54e19a6e8fb5e02f4e15b582ac8d221 /src/app.js
parentd90b930b7c96947a75f39b5dc9d3094aa7f128a8 (diff)
downloadcoinosv3-44231703087408884ad3ed31c313fc306d4e90c8.tar.gz
coinosv3-44231703087408884ad3ed31c313fc306d4e90c8.zip
Trim How it works technical section
- Drop the @scure/@noble crypto paragraph and the passphrase paragraph. - Link mempool.space in the no-backend paragraph; trim its trailing "only your addresses leave the device" clause. - "This page is one static HTML file" (was "The whole thing"). - Remove the cold-storage sentence from the offline paragraph. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'src/app.js')
-rw-r--r--src/app.js25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/app.js b/src/app.js
index e811093..bccb86d 100644
--- a/src/app.js
+++ b/src/app.js
@@ -221,7 +221,7 @@ function howItWorksScreen() {
ui.screen = ui.returnScreen === 'wallet' ? 'wallet' : 'unlock';
render();
};
- const para = (key) => h('p', { class: 'muted', style: 'margin:0' }, t(key));
+ const para = (key) => h('p', { class: 'muted', style: 'margin:0' }, ...linkify(t(key)));
return h(
'div',
{ class: 'col', style: 'gap:16px' },
@@ -242,9 +242,7 @@ function howItWorksScreen() {
{ class: 'col', style: 'gap:12px;margin-top:12px' },
para('hiwTech1'),
para('hiwTech2'),
- para('hiwTech3'),
- para('hiwTech4'),
- para('hiwTech5')
+ para('hiwTech4')
)
)
),
@@ -252,6 +250,25 @@ function howItWorksScreen() {
);
}
+// Turn known tokens (e.g. mempool.space) into links within a plain string,
+// returning an array of text + anchor nodes. Keeps i18n strings link-free.
+const HIW_LINKS = [['mempool.space', 'https://mempool.space']];
+function linkify(text) {
+ const esc = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
+ const re = new RegExp('(' + HIW_LINKS.map(([tok]) => esc(tok)).join('|') + ')', 'g');
+ const out = [];
+ let last = 0;
+ let m;
+ while ((m = re.exec(text))) {
+ if (m.index > last) out.push(text.slice(last, m.index));
+ const href = HIW_LINKS.find(([tok]) => tok === m[0])[1];
+ out.push(h('a', { href, target: '_blank', rel: 'noopener' }, m[0]));
+ last = m.index + m[0].length;
+ }
+ if (last < text.length) out.push(text.slice(last));
+ return out;
+}
+
function tabBtn(label, active, onClick) {
return h('button', { class: active ? 'active' : '', onClick }, label);
}