atproto explorer
0
fork

Configure Feed

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

add NSID search

Juliet b89c4a89 d6114b6d

+17 -5
+2 -2
src/components/search.tsx
··· 97 97 }} 98 98 > 99 99 <label for="input" class="hidden"> 100 - PDS URL, AT URI, or handle 100 + PDS URL, AT URI, NSID, DID, or handle 101 101 </label> 102 102 <div class="dark:bg-dark-100 dark:shadow-dark-700 flex items-center gap-2 rounded-lg border-[0.5px] border-neutral-300 bg-white px-2 shadow-xs focus-within:outline-[1px] focus-within:outline-neutral-600 dark:border-neutral-600 dark:focus-within:outline-neutral-400"> 103 103 <label ··· 107 107 <input 108 108 type="text" 109 109 spellcheck={false} 110 - placeholder="PDS URL, AT URI, DID, or handle" 110 + placeholder="PDS URL, AT URI, NSID, DID, or handle" 111 111 ref={searchInput} 112 112 id="input" 113 113 class="grow py-1 select-none placeholder:text-sm focus:outline-none"
+15 -3
src/views/repo.tsx
··· 1 1 import { Client, CredentialManager } from "@atcute/client"; 2 2 import { parsePublicMultikey } from "@atcute/crypto"; 3 3 import { DidDocument } from "@atcute/identity"; 4 - import { ActorIdentifier, Did, Handle } from "@atcute/lexicons"; 4 + import { ActorIdentifier, Did, Handle, Nsid } from "@atcute/lexicons"; 5 5 import { A, useLocation, useNavigate, useParams } from "@solidjs/router"; 6 6 import { 7 7 createResource, ··· 17 17 import { ActionMenu, DropdownMenu, MenuProvider, NavMenu } from "../components/dropdown.jsx"; 18 18 import { TextInput } from "../components/text-input.jsx"; 19 19 import Tooltip from "../components/tooltip.jsx"; 20 - import { didDocCache, resolveHandle, resolvePDS, validateHandle } from "../utils/api.js"; 20 + import { 21 + didDocCache, 22 + resolveHandle, 23 + resolveLexiconAuthority, 24 + resolvePDS, 25 + validateHandle, 26 + } from "../utils/api.js"; 21 27 import { BlobView } from "./blob.jsx"; 22 28 import { PlcLogView } from "./logs.jsx"; 23 29 ··· 62 68 const did = await resolveHandle(params.repo as Handle); 63 69 navigate(location.pathname.replace(params.repo, did)); 64 70 } catch { 65 - navigate(`/${did}`); 71 + try { 72 + const nsid = params.repo as Nsid; 73 + const res = await resolveLexiconAuthority(nsid); 74 + navigate(`/at://${res}/com.atproto.lexicon.schema/${nsid}`); 75 + } catch { 76 + navigate(`/${did}`); 77 + } 66 78 } 67 79 } 68 80 setDidDoc(didDocCache[did] as DidDocument);