tangled
alpha
login
or
join now
retr0.id
/
pdsls
forked from
pds.ls/pdsls
1
fork
atom
atproto explorer
1
fork
atom
overview
issues
pulls
pipelines
fix empty properties object
handle.invalid
4 months ago
18e51c93
3d3ca0fc
verified
This commit was signed with the committer's
known signature
.
handle.invalid
SSH Key Fingerprint:
SHA256:mBrT4x0JdzLpbVR95g1hjI1aaErfC02kmLRkPXwsYCk=
+23
-8
1 changed file
expand all
collapse all
unified
split
src
components
lexicon-schema.tsx
+23
-8
src/components/lexicon-schema.tsx
···
83
const isLocalRef = () => props.refType?.startsWith("#");
84
const isExternalRef = () => props.refType && !props.refType.startsWith("#");
85
86
-
const handleClick = async (e: MouseEvent) => {
87
-
e.preventDefault();
88
if (isLocalRef()) {
89
const defName = props.refType!.slice(1);
90
window.history.replaceState(null, "", `#schema:${defName}`);
···
287
props.def.closed ||
288
props.def.items;
289
290
-
const handleHeaderClick = (e: MouseEvent) => {
291
-
e.preventDefault();
292
window.history.replaceState(null, "", `#schema:${props.name}`);
293
const element = document.getElementById(`def-${props.name}`);
294
if (element) {
···
334
</Show>
335
336
{/* Properties (for record/object types) */}
337
-
<Show when={props.def.properties || props.def.record?.properties}>
0
0
338
<div class="flex flex-col gap-2">
339
<h4 class="text-sm font-semibold text-neutral-600 uppercase dark:text-neutral-400">
340
Properties
···
354
</Show>
355
356
{/* Parameters (for query/procedure) */}
357
-
<Show when={props.def.parameters?.properties}>
0
0
0
0
0
358
<div class="flex flex-col gap-2">
359
<h4 class="text-sm font-semibold text-neutral-600 uppercase dark:text-neutral-400">
360
Parameters
···
398
<UnionBadges refs={props.def.input!.schema!.refs!} />
399
</div>
400
</Show>
401
-
<Show when={props.def.input!.schema?.properties}>
0
0
0
0
0
402
<div class="divide-y divide-neutral-200 rounded-lg border border-neutral-200 bg-neutral-50/50 px-3 dark:divide-neutral-700 dark:border-neutral-700 dark:bg-neutral-800/30">
403
<For each={Object.entries(props.def.input!.schema!.properties!)}>
404
{([name, property]) => (
···
440
<UnionBadges refs={props.def.output!.schema!.refs!} />
441
</div>
442
</Show>
443
-
<Show when={props.def.output!.schema?.properties}>
0
0
0
0
0
444
<div class="divide-y divide-neutral-200 rounded-lg border border-neutral-200 bg-neutral-50/50 px-3 dark:divide-neutral-700 dark:border-neutral-700 dark:bg-neutral-800/30">
445
<For each={Object.entries(props.def.output!.schema!.properties!)}>
446
{([name, property]) => (
···
83
const isLocalRef = () => props.refType?.startsWith("#");
84
const isExternalRef = () => props.refType && !props.refType.startsWith("#");
85
86
+
const handleClick = async () => {
0
87
if (isLocalRef()) {
88
const defName = props.refType!.slice(1);
89
window.history.replaceState(null, "", `#schema:${defName}`);
···
286
props.def.closed ||
287
props.def.items;
288
289
+
const handleHeaderClick = () => {
0
290
window.history.replaceState(null, "", `#schema:${props.name}`);
291
const element = document.getElementById(`def-${props.name}`);
292
if (element) {
···
332
</Show>
333
334
{/* Properties (for record/object types) */}
335
+
<Show
336
+
when={Object.keys(props.def.properties || props.def.record?.properties || {}).length > 0}
337
+
>
338
<div class="flex flex-col gap-2">
339
<h4 class="text-sm font-semibold text-neutral-600 uppercase dark:text-neutral-400">
340
Properties
···
354
</Show>
355
356
{/* Parameters (for query/procedure) */}
357
+
<Show
358
+
when={
359
+
props.def.parameters?.properties &&
360
+
Object.keys(props.def.parameters.properties).length > 0
361
+
}
362
+
>
363
<div class="flex flex-col gap-2">
364
<h4 class="text-sm font-semibold text-neutral-600 uppercase dark:text-neutral-400">
365
Parameters
···
403
<UnionBadges refs={props.def.input!.schema!.refs!} />
404
</div>
405
</Show>
406
+
<Show
407
+
when={
408
+
props.def.input!.schema?.properties &&
409
+
Object.keys(props.def.input!.schema.properties).length > 0
410
+
}
411
+
>
412
<div class="divide-y divide-neutral-200 rounded-lg border border-neutral-200 bg-neutral-50/50 px-3 dark:divide-neutral-700 dark:border-neutral-700 dark:bg-neutral-800/30">
413
<For each={Object.entries(props.def.input!.schema!.properties!)}>
414
{([name, property]) => (
···
450
<UnionBadges refs={props.def.output!.schema!.refs!} />
451
</div>
452
</Show>
453
+
<Show
454
+
when={
455
+
props.def.output!.schema?.properties &&
456
+
Object.keys(props.def.output!.schema.properties).length > 0
457
+
}
458
+
>
459
<div class="divide-y divide-neutral-200 rounded-lg border border-neutral-200 bg-neutral-50/50 px-3 dark:divide-neutral-700 dark:border-neutral-700 dark:bg-neutral-800/30">
460
<For each={Object.entries(props.def.output!.schema!.properties!)}>
461
{([name, property]) => (