tangled
alpha
login
or
join now
vielle.dev
/
pdsls
forked from
pds.ls/pdsls
0
fork
atom
atproto explorer
0
fork
atom
overview
issues
pulls
pipelines
add x next to info if validation error
handle.invalid
5 months ago
d3954fe5
378e577a
verified
This commit was signed with the committer's
known signature
.
handle.invalid
SSH Key Fingerprint:
SHA256:mBrT4x0JdzLpbVR95g1hjI1aaErfC02kmLRkPXwsYCk=
+22
-13
1 changed file
expand all
collapse all
unified
split
src
views
record.tsx
+22
-13
src/views/record.tsx
···
129
129
return template(parsedUri, record);
130
130
};
131
131
132
132
-
const RecordTab = (props: { tab: "record" | "backlinks" | "info"; label: string }) => (
133
133
-
<A
134
134
-
classList={{
135
135
-
"flex items-center gap-1 border-b-2": true,
136
136
-
"border-transparent hover:border-neutral-400 dark:hover:border-neutral-600":
137
137
-
(!!location.hash && location.hash !== `#${props.tab}`) ||
138
138
-
(!location.hash && props.tab !== "record"),
139
139
-
}}
140
140
-
href={`/at://${did}/${params.collection}/${params.rkey}#${props.tab}`}
141
141
-
>
142
142
-
{props.label}
143
143
-
</A>
132
132
+
const RecordTab = (props: {
133
133
+
tab: "record" | "backlinks" | "info";
134
134
+
label: string;
135
135
+
error?: boolean;
136
136
+
}) => (
137
137
+
<div class="flex items-center gap-0.5">
138
138
+
<A
139
139
+
classList={{
140
140
+
"flex items-center gap-1 border-b-2": true,
141
141
+
"border-transparent hover:border-neutral-400 dark:hover:border-neutral-600":
142
142
+
(!!location.hash && location.hash !== `#${props.tab}`) ||
143
143
+
(!location.hash && props.tab !== "record"),
144
144
+
}}
145
145
+
href={`/at://${did}/${params.collection}/${params.rkey}#${props.tab}`}
146
146
+
>
147
147
+
{props.label}
148
148
+
</A>
149
149
+
<Show when={props.error && (validRecord() === false || validSchema() === false)}>
150
150
+
<span class="iconify lucide--x text-red-500 dark:text-red-400"></span>
151
151
+
</Show>
152
152
+
</div>
144
153
);
145
154
146
155
return (
···
150
159
<div class="flex gap-3">
151
160
<RecordTab tab="record" label="Record" />
152
161
<RecordTab tab="backlinks" label="Backlinks" />
153
153
-
<RecordTab tab="info" label="Info" />
162
162
+
<RecordTab tab="info" label="Info" error />
154
163
</div>
155
164
<div class="flex gap-1">
156
165
<Show when={agent() && agent()?.sub === record()?.uri.split("/")[2]}>