aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/api.js15
-rw-r--r--src/app.js15
-rw-r--r--src/style.css3
3 files changed, 29 insertions, 4 deletions
diff --git a/src/api.js b/src/api.js
index 0135369..a91d94b 100644
--- a/src/api.js
+++ b/src/api.js
@@ -6,9 +6,18 @@
// - a 429 from ANY request immediately backs off ALL subsequent requests
// (global exponential pause), easing back as requests succeed.
-// TEMPORARY: route explorer traffic through a VPS while this IP is rate-limited
-// by mempool.space. Set PROXY = '' to go back to the public explorers directly.
-const PROXY = 'http://51.79.52.200:8088';
+// Explorer endpoint. Defaults to the public explorers (correct for a hosted,
+// multi-user deploy — each visitor uses their own IP). A specific machine whose
+// IP is rate-limited can opt into a proxy at runtime:
+// localStorage.setItem('explorer-proxy', 'http://51.79.52.200:8088')
+// (http proxy only works when the page itself is served over http/localhost).
+const PROXY = (() => {
+ try {
+ return localStorage.getItem('explorer-proxy') || '';
+ } catch {
+ return '';
+ }
+})();
const BACKENDS = PROXY
? {
diff --git a/src/app.js b/src/app.js
index e59b1bd..a017841 100644
--- a/src/app.js
+++ b/src/app.js
@@ -73,8 +73,21 @@ function h(tag, attrs = {}, ...children) {
}
const root = document.getElementById('app');
+function footer() {
+ return h(
+ 'div',
+ { class: 'footer small muted center' },
+ 'made with ',
+ h('span', { style: 'color:#e25555' }, '♥'),
+ ' by ',
+ h('a', { href: 'https://adamsoltys.com', target: '_blank', rel: 'noopener' }, 'Adam Soltys'),
+ h('span', { class: 'faint' }, ' · '),
+ h('a', { href: 'https://github.com/asoltys/cold', target: '_blank', rel: 'noopener' }, 'source available on GitHub')
+ );
+}
+
function render() {
- root.replaceChildren(ui.screen === 'wallet' ? walletScreen() : unlockScreen());
+ root.replaceChildren(ui.screen === 'wallet' ? walletScreen() : unlockScreen(), footer());
}
wallet.subscribe(render);
diff --git a/src/style.css b/src/style.css
index 2d11662..160cca2 100644
--- a/src/style.css
+++ b/src/style.css
@@ -208,6 +208,9 @@ textarea { resize: vertical; min-height: 84px; font-family: var(--mono); font-si
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.words .w.masked .t { color: var(--faint); letter-spacing: 2px; }
+.footer { margin-top: 28px; padding-bottom: 8px; }
+.footer a { color: var(--accent-ink); font-weight: 600; }
+
/* Clickable unit labels (BTC/sats) — look like text, toggle the global unit. */
.unit-tag {
background: none; border: 0; padding: 0; margin: 0; font: inherit; cursor: pointer;