atmosphere explorer
at main 50 lines 1.7 kB view raw
1export type AtUri = { repo: string; collection: string; rkey: string }; 2type TemplateFn = (uri: AtUri, record?: any) => { label: string; link: string; icon?: string }; 3type TemplateMap = Record<string, TemplateFn>; 4 5export const uriTemplates: TemplateMap = { 6 "app.bsky.actor.profile": (uri) => ({ 7 label: "Bluesky", 8 link: `https://bsky.app/profile/${uri.repo}`, 9 icon: "simple-icons--bluesky text-[#0085ff]", 10 }), 11 "app.bsky.feed.post": (uri) => ({ 12 label: "Bluesky", 13 link: `https://bsky.app/profile/${uri.repo}/post/${uri.rkey}`, 14 icon: "simple-icons--bluesky text-[#0085ff]", 15 }), 16 "app.bsky.graph.list": (uri) => ({ 17 label: "Bluesky", 18 link: `https://bsky.app/profile/${uri.repo}/lists/${uri.rkey}`, 19 icon: "simple-icons--bluesky text-[#0085ff]", 20 }), 21 "app.bsky.feed.generator": (uri) => ({ 22 label: "Bluesky", 23 link: `https://bsky.app/profile/${uri.repo}/feed/${uri.rkey}`, 24 icon: "simple-icons--bluesky text-[#0085ff]", 25 }), 26 "fyi.unravel.frontpage.post": (uri) => ({ 27 label: "Frontpage", 28 link: `https://frontpage.fyi/post/${uri.repo}/${uri.rkey}`, 29 }), 30 "com.shinolabs.pinksea.oekaki": (uri) => ({ 31 label: "PinkSea", 32 link: `https://pinksea.art/${uri.repo}/oekaki/${uri.rkey}`, 33 icon: "i-pinksea", 34 }), 35 "com.shinolabs.pinksea.profile": (uri) => ({ 36 label: "PinkSea", 37 link: `https://pinksea.art/${uri.repo}`, 38 icon: "i-pinksea", 39 }), 40 "sh.tangled.actor.profile": (uri) => ({ 41 label: "Tangled", 42 link: `https://tangled.org/${uri.repo}`, 43 icon: "i-tangled", 44 }), 45 "sh.tangled.repo": (uri, record) => ({ 46 label: "Tangled", 47 link: `https://tangled.org/${uri.repo}/${record.name}`, 48 icon: "i-tangled", 49 }), 50};