atproto pds in zig pds.zat.dev
pds atproto
24

Configure Feed

Select the types of activity you want to include in your feed.

Fix landing profile links

zzstoatzz (May 24, 2026, 2:23 PM -0500) 6693ee16 0906b8d7

+9 -9
+7 -7
src/http/landing/assets.zig
··· 127 127 \\(function() { 128 128 \\ var key = 'zds.preferredClient'; 129 129 \\ var clients = [ 130 - \\ { value: 'bsky', label: 'Bluesky', icon: 'https://web-cdn.bsky.app/static/apple-touch-icon.png', url: function(id) { return 'https://bsky.app/profile/' + encodeURIComponent(id); } }, 131 - \\ { value: 'blacksky', label: 'Blacksky', icon: 'https://blacksky.community/static/apple-touch-icon.png', url: function(id) { return 'https://blacksky.community/profile/' + encodeURIComponent(id); } }, 132 - \\ { value: 'witchsky', label: 'Witchsky', icon: 'https://witchsky.app/favicon.ico', url: function(id) { return 'https://witchsky.app/profile/' + encodeURIComponent(id); } }, 133 - \\ { value: 'reddwarf', label: 'Red Dwarf', icon: 'https://reddwarf.app/redstar.png', url: function(id) { return 'https://reddwarf.app/profile/' + encodeURIComponent(id); } }, 134 - \\ { value: 'pdsls', label: 'PDSls', icon: 'https://pdsls.dev/favicon.ico', url: function(id) { return 'https://pdsls.dev/at/' + id; } } 130 + \\ { value: 'bsky', label: 'Bluesky', icon: 'https://web-cdn.bsky.app/static/apple-touch-icon.png', url: function(handle, did) { return 'https://bsky.app/profile/' + handle; } }, 131 + \\ { value: 'blacksky', label: 'Blacksky', icon: 'https://blacksky.community/static/apple-touch-icon.png', url: function(handle, did) { return 'https://blacksky.community/profile/' + handle; } }, 132 + \\ { value: 'witchsky', label: 'Witchsky', icon: 'https://witchsky.app/favicon.ico', url: function(handle, did) { return 'https://witchsky.app/profile/' + handle; } }, 133 + \\ { value: 'reddwarf', label: 'Red Dwarf', icon: 'https://reddwarf.app/redstar.png', url: function(handle, did) { return 'https://reddwarf.app/profile/' + handle; } }, 134 + \\ { value: 'pdsls', label: 'PDSls', icon: 'https://pdsls.dev/favicon.ico', url: function(handle, did) { return 'https://pdsls.dev/at/' + did + '/app.bsky.actor.profile/self'; } } 135 135 \\ ]; 136 136 \\ function read() { try { return localStorage.getItem(key); } catch (_) { return null; } } 137 137 \\ function write(value) { try { localStorage.setItem(key, value); } catch (_) {} } 138 138 \\ function preferred() { var value = read(); return clients.find(function(c) { return c.value === value; }) || clients[0]; } 139 139 \\ function syncLinks() { 140 140 \\ var client = preferred(); 141 - \\ document.querySelectorAll('[data-profile]').forEach(function(a) { 142 - \\ a.href = client.url(a.getAttribute('data-profile')); 141 + \\ document.querySelectorAll('[data-profile-handle]').forEach(function(a) { 142 + \\ a.href = client.url(a.getAttribute('data-profile-handle'), a.getAttribute('data-profile-did')); 143 143 \\ a.title = 'open in ' + client.label; 144 144 \\ }); 145 145 \\ document.querySelectorAll('.client').forEach(function(btn) { btn.classList.toggle('active', btn.dataset.client === client.value); });
+2 -2
src/http/landing/mod.zig
··· 46 46 const status = if (resident.active) "active" else "paused"; 47 47 try accounts.writer.print( 48 48 \\<li class="resident"> 49 - \\ <a href="https://bsky.app/profile/{s}" data-profile={f} rel="me"> 49 + \\ <a href="https://bsky.app/profile/{s}" data-profile-handle={f} data-profile-did={f} rel="me"> 50 50 \\ {s} 51 51 \\ <span class="who"> 52 52 \\ <span class="handle">{s}</span> ··· 55 55 \\ <span class="meta"><span>{s}</span><span>{d} records</span></span> 56 56 \\ </a> 57 57 \\</li> 58 - , .{ resident.did, std.json.fmt(resident.did, .{}), avatar, handle, did, status, resident.record_count }); 58 + , .{ handle, std.json.fmt(resident.handle, .{}), std.json.fmt(resident.did, .{}), avatar, handle, did, status, resident.record_count }); 59 59 } 60 60 } 61 61