···
81
+
const options: Record<string, { status: RepoStatus; label: string }> = {
83
+
status: RepoStatus.DELETED,
87
+
status: RepoStatus.DEACTIVATED,
88
+
label: "Deactivated",
91
+
status: RepoStatus.SUSPENDED,
95
+
status: RepoStatus.BLOCKEDBY,
96
+
label: "Blocked By",
99
+
status: RepoStatus.BLOCKING,
<Show when={followRecords.length}>
<div class="flex flex-row flex-wrap gap-x-5 gap-y-2">
85
-
<div class="flex h-6 items-center">
89
-
class="h-4 w-4 rounded border-gray-400 text-indigo-600 focus:ring-indigo-600"
91
-
selectRecords(RepoStatus.DELETED, e.currentTarget.checked)
94
-
<label for="deleted" class="ml-2 select-none">
98
-
<div class="flex h-6 items-center">
102
-
class="h-4 w-4 rounded border-gray-400 text-indigo-600 focus:ring-indigo-600"
104
-
selectRecords(RepoStatus.DEACTIVATED, e.currentTarget.checked)
107
-
<label for="deactivated" class="ml-2 select-none">
111
-
<div class="flex h-6 items-center">
115
-
class="h-4 w-4 rounded border-gray-400 text-indigo-600 focus:ring-indigo-600"
117
-
selectRecords(RepoStatus.SUSPENDED, e.currentTarget.checked)
120
-
<label for="suspended" class="ml-2 select-none">
124
-
<div class="flex h-6 items-center">
128
-
class="h-4 w-4 rounded border-gray-400 text-indigo-600 focus:ring-indigo-600"
130
-
selectRecords(RepoStatus.BLOCKEDBY, e.currentTarget.checked)
133
-
<label for="blockedby" class="ml-2 select-none">
137
-
<div class="flex h-6 items-center">
141
-
class="h-4 w-4 rounded border-gray-400 text-indigo-600 focus:ring-indigo-600"
143
-
selectRecords(RepoStatus.BLOCKING, e.currentTarget.checked)
146
-
<label for="blocking" class="ml-2 select-none">
108
+
<For each={Object.keys(options)}>
110
+
<div class="flex h-6 items-center">
114
+
class="h-4 w-4 rounded border-gray-400 text-indigo-600 focus:ring-indigo-600"
117
+
options[option].status,
118
+
e.currentTarget.checked,
122
+
<label for={option} class="ml-2 select-none">
123
+
{options[option].label}