atmosphere explorer
0
fork

Configure Feed

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

add copy link button

+27 -4
+26 -3
src/App.tsx
··· 16 16 useParams, 17 17 } from "@solidjs/router"; 18 18 import { JSONValue } from "./lib/json.jsx"; 19 - import { AiFillGithub, Bluesky, TbMoonStar, TbSun } from "./lib/svg.jsx"; 19 + import { 20 + AiFillGithub, 21 + Bluesky, 22 + BsClipboard, 23 + BsClipboardCheck, 24 + TbMoonStar, 25 + TbSun, 26 + } from "./lib/svg.jsx"; 20 27 21 28 let rpc = new XRPC({ 22 29 handler: new CredentialManager({ service: "https://public.api.bsky.app" }), ··· 308 315 const Home: Component = () => { 309 316 setNotice(""); 310 317 return ( 311 - <div class="flex flex-col break-words font-sans"> 318 + <div class="mt-3 flex flex-col break-words font-sans"> 312 319 <div> 313 320 <span class="font-semibold text-orange-400">PDS URL</span> (https:// 314 321 required): ··· 358 365 "dark" 359 366 : "light", 360 367 ); 368 + const [clip, setClip] = createSignal(false); 361 369 362 370 onMount(async () => { 363 371 setNotice(""); ··· 472 480 <span class="mx-1.5">/</span> 473 481 {params.rkey} 474 482 </Show> 483 + <span 484 + class="ml-1.5 flex cursor-pointer items-center" 485 + onclick={() => 486 + navigator.clipboard.writeText(location.href).then(() => { 487 + setClip(true); 488 + setTimeout(() => { 489 + setClip(false); 490 + }, 3000); 491 + }) 492 + } 493 + > 494 + {clip() ? 495 + <BsClipboardCheck class="size-4" /> 496 + : <BsClipboard class="size-4" />} 497 + </span> 475 498 </div> 476 499 </Show> 477 - <div class="my-1">{notice()}</div> 500 + <div>{notice()}</div> 478 501 <div class="flex max-w-full flex-col space-y-1 font-mono"> 479 502 <Show keyed when={useLocation().pathname}> 480 503 {props.children}
+1 -1
src/lib/json.tsx
··· 63 63 <div class="text-amber-600 dark:text-amber-400"> 64 64 <div 65 65 class="group relative flex size-fit cursor-pointer items-center" 66 - onmouseover={() => setClip(false)} 66 + onmouseleave={() => setClip(false)} 67 67 onclick={() => 68 68 navigator.clipboard 69 69 .writeText(JSON.stringify(value).replace(/^"(.+)"$/, "$1"))