aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-08 23:08:48 -0700
committerAdam Soltys <[email protected]>2026-10-08 23:08:48 -0700
commit6b0dd0d8e908ef147eda4413a2d0f4c412c05243 (patch)
tree85f74a788f1ea7e70e13a8e68fd9147f8989bd99 /src
parentf3545a79caf0f76eeaa0b99a65bbcab1b52506d0 (diff)
downloadcoinosv3-6b0dd0d8e908ef147eda4413a2d0f4c412c05243.tar.gz
coinosv3-6b0dd0d8e908ef147eda4413a2d0f4c412c05243.zip
Asset paths are site-absolute: relative ones resolved against a deep page (/feed/…, /nevent1…) and fetched the app's HTML, which broke the coinos community's logo (and would have broken the QR decoder, signer module and language packs there). Dev server serves the app icons. The live Concord delivery test is gone: it posted "delivery test" messages into the real coinos #general
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/asset-url.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/asset-url.js b/src/asset-url.js
index bd80240..89ad1ea 100644
--- a/src/asset-url.js
+++ b/src/asset-url.js
@@ -1,6 +1,8 @@
// The standalone wallet (standalone.html opened from a disk) has no files
// beside it: punks, the lazy modules and the language packs come from the
-// site instead. Served from anywhere else, paths stay relative.
+// site instead. Served from anywhere else, paths are from the site root:
+// relative ones resolved against a deep page (/feed/…, /nevent1…, /chat)
+// and fetched the app's HTML instead (the coinos community's logo broke).
export const SITE = 'https://v3.coinos.io/';
const fromDisk = () => typeof location !== 'undefined' && location.protocol === 'file:';
-export const assetUrl = (path) => fromDisk() ? SITE + path.replace(/^\//, '') : path;
+export const assetUrl = (path) => (fromDisk() ? SITE : '/') + path.replace(/^\//, '');