File tree Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Expand file tree Collapse file tree 2 files changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,10 @@ export default function ACLSelector({
129
129
( e ) => ! selectedACLS . includes ( e ) ,
130
130
)
131
131
132
+ const filteredACLs = acls . filter ( ( e ) =>
133
+ e . toLowerCase ( ) . includes ( query . toLowerCase ( ) ) ,
134
+ )
135
+
132
136
return (
133
137
< Combobox
134
138
as = "div"
@@ -157,15 +161,7 @@ export default function ACLSelector({
157
161
transition
158
162
className = "absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg outline outline-black/5 data-leave:transition data-leave:duration-100 data-leave:ease-in data-closed:data-leave:opacity-0 sm:text-sm dark:bg-gray-800 dark:shadow-none dark:-outline-offset-1 dark:outline-white/10"
159
163
>
160
- { query . length > 0 && (
161
- < ComboboxOption
162
- value = { { id : null , name : query } }
163
- className = "cursor-default px-3 py-2 text-gray-900 select-none data-focus:bg-blue-600 data-focus:text-white data-focus:outline-hidden dark:text-gray-300 dark:data-focus:bg-blue-500"
164
- >
165
- { query }
166
- </ ComboboxOption >
167
- ) }
168
- { acls . map ( ( acl ) => (
164
+ { filteredACLs . map ( ( acl ) => (
169
165
< ComboboxOption
170
166
key = { acl }
171
167
value = { acl }
@@ -174,6 +170,14 @@ export default function ACLSelector({
174
170
< span className = "block truncate" > { acl } </ span >
175
171
</ ComboboxOption >
176
172
) ) }
173
+ { query . length > 0 && (
174
+ < ComboboxOption
175
+ value = { query }
176
+ className = "cursor-default px-3 py-2 text-gray-900 select-none data-focus:bg-blue-600 data-focus:text-white data-focus:outline-hidden dark:text-gray-300 dark:data-focus:bg-blue-500"
177
+ >
178
+ Override add "{ query } "
179
+ </ ComboboxOption >
180
+ ) }
177
181
</ ComboboxOptions >
178
182
</ div >
179
183
</ Combobox >
Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ export default function PayloadGenerator() {
35
35
< div >
36
36
< h3 > Payload Generator</ h3 >
37
37
< p >
38
- If you don't want to mess around with JavaScript consoles, you can use
39
- this UI tool to generate your payload.
38
+ If you don't want to mess around with JavaScript consoles, you
39
+ can use this UI tool to generate your payload.
40
40
</ p >
41
41
< div className = "not-prose grid grid-cols-3" >
42
42
< div className = "col-span-2 space-y-2 border-r border-zinc-300 pr-4 dark:border-zinc-700" >
@@ -102,9 +102,8 @@ export default function PayloadGenerator() {
102
102
</ span >
103
103
</ div >
104
104
105
- < div className = 'flex flex-row items-center gap-2 flex-wrap' >
106
- { acls . map ( ( acl ) => (
107
- < >
105
+ < div className = "flex flex-row flex-wrap items-center gap-2" >
106
+ { acls . map ( ( acl ) => (
108
107
< span
109
108
key = { acl }
110
109
className = "inline-flex items-center gap-x-0.5 rounded-md bg-blue-50 px-2 py-1 text-xs font-medium text-blue-700 inset-ring inset-ring-blue-700/10 dark:bg-blue-400/10 dark:text-blue-400 dark:inset-ring-blue-400/30"
@@ -125,8 +124,7 @@ export default function PayloadGenerator() {
125
124
< span className = "absolute -inset-1" />
126
125
</ button >
127
126
</ span >
128
- </ >
129
- ) ) }
127
+ ) ) }
130
128
</ div >
131
129
132
130
< ACLSelector mode = { mode } addACL = { addACL } selectedACLS = { acls } />
You can’t perform that action at this time.
0 commit comments