From 8ae354d5033283ec8c6176a0488c0b9255611aaf Mon Sep 17 00:00:00 2001 From: gilesb Date: Thu, 8 Jan 2026 18:57:00 +0000 Subject: [PATCH] Add IPFS info display to L2 asset detail page - Add IPFS_GATEWAY_URL config - Show IPFS CID on asset detail page - Add gateway links (local, ipfs.io, dweb.link) Co-Authored-By: Claude Opus 4.5 --- server.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/server.py b/server.py index b31fd47..c545439 100644 --- a/server.py +++ b/server.py @@ -38,6 +38,7 @@ DOMAIN = os.environ.get("ARTDAG_DOMAIN", "artdag.rose-ash.com") DATA_DIR = Path(os.environ.get("ARTDAG_DATA", str(Path.home() / ".artdag" / "l2"))) L1_PUBLIC_URL = os.environ.get("L1_PUBLIC_URL", "https://celery-artdag.rose-ash.com") EFFECTS_REPO_URL = os.environ.get("EFFECTS_REPO_URL", "https://git.rose-ash.com/art-dag/effects") +IPFS_GATEWAY_URL = os.environ.get("IPFS_GATEWAY_URL", "") # Cookie domain for sharing auth across subdomains (e.g., ".rose-ash.com") # If not set, derives from DOMAIN (strips first subdomain, adds leading dot) @@ -738,6 +739,7 @@ async def ui_asset_detail(name: str, request: Request): asset = assets[name] owner = asset.get("owner", "unknown") content_hash = asset.get("content_hash", "") + ipfs_cid = asset.get("ipfs_cid", "") asset_type = asset.get("asset_type", "") tags = asset.get("tags", []) description = asset.get("description", "") @@ -936,6 +938,16 @@ async def ui_asset_detail(name: str, request: Request): {content_hash} +
+

IPFS

+ {f'''{ipfs_cid} +
+ {f'Local' if IPFS_GATEWAY_URL else ''} + ipfs.io + dweb.link +
''' if ipfs_cid else 'Not on IPFS'} +
+

Created

{created_at}