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
fix queryLabels nonsense idk anymore
handle.invalid
1 year ago
554c0805
7e87b7e3
+21
-12
1 changed file
expand all
collapse all
unified
split
src
views
labels.tsx
+21
-12
src/views/labels.tsx
···
35
35
36
36
const [response, { refetch }] = createResource(uriPatterns, fetchLabels);
37
37
38
38
+
const queryLabels = async () => {
39
39
+
setLabels([]);
40
40
+
setUriPatterns(
41
41
+
(document.getElementById("patterns") as HTMLInputElement).value,
42
42
+
);
43
43
+
};
44
44
+
38
45
return (
39
46
<>
40
47
<div class="z-5 dark:bg-dark-700 sticky top-0 flex w-full flex-col items-center justify-center gap-2 bg-slate-100 py-4">
···
56
63
cols={25}
57
64
class="dark:bg-dark-100 rounded-lg border border-gray-400 px-2 py-1 focus:outline-none focus:ring-1 focus:ring-gray-300"
58
65
/>
59
59
-
<button
60
60
-
onclick={() =>
61
61
-
setUriPatterns(
62
62
-
(document.getElementById("patterns") as HTMLInputElement)
63
63
-
.value,
64
64
-
)
65
65
-
}
66
66
-
type="submit"
67
67
-
class="dark:bg-dark-700 dark:hover:bg-dark-800 rounded-lg border border-gray-400 bg-white px-2.5 py-1.5 text-sm font-bold hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-gray-300"
68
68
-
>
69
69
-
Get
70
70
-
</button>
66
66
+
<div class="flex min-w-[3rem] justify-center">
67
67
+
<Show when={!response.loading}>
68
68
+
<button
69
69
+
onclick={() => queryLabels()}
70
70
+
type="submit"
71
71
+
class="dark:bg-dark-700 dark:hover:bg-dark-800 rounded-lg border border-gray-400 bg-white px-2.5 py-1.5 text-sm font-bold hover:bg-gray-100 focus:outline-none focus:ring-1 focus:ring-gray-300"
72
72
+
>
73
73
+
Get
74
74
+
</button>
75
75
+
</Show>
76
76
+
<Show when={response.loading}>
77
77
+
<div class="i-line-md-loading-twotone-loop text-xl"></div>
78
78
+
</Show>
79
79
+
</div>
71
80
</div>
72
81
</form>
73
82
<div class="flex items-center gap-x-2">