|
6 | 6 | Circle, |
7 | 7 | Code, |
8 | 8 | ExternalLink, |
| 9 | + Filter, |
9 | 10 | GitCommit, |
10 | 11 | GitPullRequest, |
11 | 12 | Globe, |
@@ -142,6 +143,7 @@ export const ClaudePrototype = () => { |
142 | 143 | const [privateOnlyFilter, setPrivateOnlyFilter] = useState(false) |
143 | 144 | const [searchQuery, setSearchQuery] = useState('') |
144 | 145 | const [sortBy, setSortBy] = useState('edited-newest') |
| 146 | + const [showFilters, setShowFilters] = useState(false) |
145 | 147 |
|
146 | 148 | const filteredDrafts = useMemo(() => { |
147 | 149 | let filtered = [...drafts] |
@@ -307,24 +309,6 @@ export const ClaudePrototype = () => { |
307 | 309 | {/* Header controls */} |
308 | 310 | <div className='p-3 border-b'> |
309 | 311 | <div className='flex flex-wrap gap-3 items-center'> |
310 | | - <label className='flex items-center gap-2 cursor-pointer'> |
311 | | - <input |
312 | | - type='checkbox' |
313 | | - checked={hasCodeFilter} |
314 | | - onChange={(e) => setHasCodeFilter(e.target.checked)} |
315 | | - className='rounded' |
316 | | - /> |
317 | | - <span className='text-sm'>Has code</span> |
318 | | - </label> |
319 | | - <label className='flex items-center gap-2 cursor-pointer'> |
320 | | - <input |
321 | | - type='checkbox' |
322 | | - checked={privateOnlyFilter} |
323 | | - onChange={(e) => setPrivateOnlyFilter(e.target.checked)} |
324 | | - className='rounded' |
325 | | - /> |
326 | | - <span className='text-sm'>Private only</span> |
327 | | - </label> |
328 | 312 | </div> |
329 | 313 |
|
330 | 314 | {/* Bulk actions bar */} |
@@ -372,14 +356,50 @@ export const ClaudePrototype = () => { |
372 | 356 | className='px-3 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider' |
373 | 357 | > |
374 | 358 | <div className='relative'> |
375 | | - <Search className='absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400' /> |
376 | | - <input |
377 | | - type='text' |
378 | | - placeholder='Search drafts...' |
379 | | - value={searchQuery} |
380 | | - onChange={(e) => setSearchQuery(e.target.value)} |
381 | | - className='w-full pl-9 pr-3 py-1.5 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500' |
382 | | - /> |
| 359 | + <div className='flex items-center gap-1'> |
| 360 | + <div className='relative flex-1'> |
| 361 | + <Search className='absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400' /> |
| 362 | + <input |
| 363 | + type='text' |
| 364 | + placeholder='Search drafts...' |
| 365 | + value={searchQuery} |
| 366 | + onChange={(e) => setSearchQuery(e.target.value)} |
| 367 | + className='w-full pl-9 pr-3 py-1.5 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500' |
| 368 | + /> |
| 369 | + </div> |
| 370 | + <button |
| 371 | + type='button' |
| 372 | + onClick={() => setShowFilters(!showFilters)} |
| 373 | + className='p-1.5 hover:bg-gray-100 rounded' |
| 374 | + title='Filter options' |
| 375 | + > |
| 376 | + <Filter className='w-4 h-4 text-gray-600' /> |
| 377 | + </button> |
| 378 | + </div> |
| 379 | + {showFilters && ( |
| 380 | + <div className='absolute top-full left-0 mt-1 p-3 bg-white border border-gray-300 rounded-md shadow-lg z-10 min-w-48'> |
| 381 | + <div className='space-y-2'> |
| 382 | + <label className='flex items-center gap-2 cursor-pointer'> |
| 383 | + <input |
| 384 | + type='checkbox' |
| 385 | + checked={hasCodeFilter} |
| 386 | + onChange={(e) => setHasCodeFilter(e.target.checked)} |
| 387 | + className='rounded' |
| 388 | + /> |
| 389 | + <span className='text-sm'>Has code</span> |
| 390 | + </label> |
| 391 | + <label className='flex items-center gap-2 cursor-pointer'> |
| 392 | + <input |
| 393 | + type='checkbox' |
| 394 | + checked={privateOnlyFilter} |
| 395 | + onChange={(e) => setPrivateOnlyFilter(e.target.checked)} |
| 396 | + className='rounded' |
| 397 | + /> |
| 398 | + <span className='text-sm'>Private only</span> |
| 399 | + </label> |
| 400 | + </div> |
| 401 | + </div> |
| 402 | + )} |
383 | 403 | </div> |
384 | 404 | </th> |
385 | 405 | <th |
|
0 commit comments