tangled
alpha
login
or
join now
partially.dead.aylac.top
/
pdsls
forked from
pds.ls/pdsls
0
fork
atom
atproto explorer
0
fork
atom
overview
issues
pulls
pipelines
move copy CID to record submenu
handle.invalid
5 months ago
1f59b295
c781ace4
verified
This commit was signed with the committer's
known signature
.
handle.invalid
SSH Key Fingerprint:
SHA256:mBrT4x0JdzLpbVR95g1hjI1aaErfC02kmLRkPXwsYCk=
+4
-7
2 changed files
expand all
collapse all
unified
split
src
components
navbar.tsx
views
record.tsx
-4
src/components/navbar.tsx
···
5
5
import Tooltip from "./tooltip";
6
6
7
7
export const [pds, setPDS] = createSignal<string>();
8
8
-
export const [cid, setCID] = createSignal<string>();
9
8
export const [isLabeler, setIsLabeler] = createSignal(false);
10
9
11
10
const NavBar = (props: { params: Params }) => {
···
60
59
copyContent={`at://${props.params.repo}${props.params.collection ? `/${props.params.collection}` : ""}${props.params.rkey ? `/${props.params.rkey}` : ""}`}
61
60
label="Copy AT URI"
62
61
/>
63
63
-
</Show>
64
64
-
<Show when={props.params.rkey && cid()}>
65
65
-
<CopyMenu copyContent={cid()!} label="Copy CID" />
66
62
</Show>
67
63
</DropdownMenu>
68
64
</MenuProvider>
+4
-3
src/views/record.tsx
···
10
10
import { JSONValue } from "../components/json.jsx";
11
11
import { agent } from "../components/login.jsx";
12
12
import { Modal } from "../components/modal.jsx";
13
13
-
import { pds, setCID } from "../components/navbar.jsx";
13
13
+
import { pds } from "../components/navbar.jsx";
14
14
import Tooltip from "../components/tooltip.jsx";
15
15
import { setNotif } from "../layout.jsx";
16
16
import { didDocCache, resolveLexiconAuthority, resolvePDS } from "../utils/api.js";
···
34
34
let rpc: Client;
35
35
36
36
const fetchRecord = async () => {
37
37
-
setCID(undefined);
38
37
setValidRecord(undefined);
39
38
setValidSchema(undefined);
40
39
setLexiconUri(undefined);
···
52
51
setNotice(res.data.error);
53
52
throw new Error(res.data.error);
54
53
}
55
55
-
setCID(res.data.cid);
56
54
setExternalLink(checkUri(res.data.uri, res.data.value));
57
55
resolveLexicon(params.collection as Nsid);
58
56
verify(res.data);
···
198
196
label="Copy record"
199
197
icon="lucide--copy"
200
198
/>
199
199
+
<Show when={record()?.cid}>
200
200
+
{(cid) => <CopyMenu copyContent={cid()} label="Copy CID" icon="lucide--copy" />}
201
201
+
</Show>
201
202
<Show when={lexiconUri()}>
202
203
<NavMenu
203
204
href={`/${lexiconUri()}`}