Commit cf4faf0
feat(ui): clickable sort columns + per-panel filter (#67)
Both panels gain two controls users coming from any file manager expect:
- **Sort columns**: clicking the Name / Size / Modified column header
sorts by that column ascending; clicking it again flips to descending.
A small ▲ / ▼ glyph marks the active column in accent colour. The
"dirs first → files → symlinks" grouping is preserved (file-manager
convention); the chosen column orders WITHIN each group. Sort state
persists across breadcrumb navigation but resets per panel session.
- **Filter row** between the breadcrumb and the filelist: substring
match (case-insensitive) on the entry name. 150 ms debounce so
typing doesn't thrash. Esc clears, × button clears. Filter does NOT
recurse — it operates on the current view only; finding files
deeper still needs the cross-tree comparison via /api/browse/stats.
Filter resets on directory navigation since a stale filter from
another folder is rarely what the user wants.
Selection semantics under filter:
- "Select all" (header checkbox) toggles only the visible/filtered
entries — selecting hidden entries silently would surprise users.
- Selections made before a filter survive while the filter is active
(the underlying selection list isn't pruned), so toggling the filter
off shows them again.
- allSelected() returns true iff every visible entry is in the
selection.
Pure client-side: no API changes, no Java touched. ~150 lines of
browser.js + index.html + style.css across both panels.
Co-authored-by: VirusAlex <alexey.egupov@norse.bh>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3956ceb commit cf4faf0
3 files changed
Lines changed: 203 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
363 | 372 | | |
364 | 373 | | |
365 | 374 | | |
| |||
376 | 385 | | |
377 | 386 | | |
378 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
379 | 399 | | |
380 | 400 | | |
381 | 401 | | |
382 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
383 | 471 | | |
384 | 472 | | |
385 | 473 | | |
| |||
561 | 649 | | |
562 | 650 | | |
563 | 651 | | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
564 | 656 | | |
565 | 657 | | |
566 | 658 | | |
567 | 659 | | |
568 | 660 | | |
569 | 661 | | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
570 | 665 | | |
571 | 666 | | |
572 | 667 | | |
| |||
613 | 708 | | |
614 | 709 | | |
615 | 710 | | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
616 | 716 | | |
617 | | - | |
618 | | - | |
619 | | - | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
620 | 724 | | |
621 | | - | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
622 | 728 | | |
623 | 729 | | |
624 | 730 | | |
625 | 731 | | |
626 | | - | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
627 | 740 | | |
628 | 741 | | |
629 | 742 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
90 | 106 | | |
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
94 | 110 | | |
95 | 111 | | |
96 | 112 | | |
97 | | - | |
98 | | - | |
99 | | - | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
100 | 125 | | |
101 | 126 | | |
102 | 127 | | |
| |||
107 | 132 | | |
108 | 133 | | |
109 | 134 | | |
110 | | - | |
| 135 | + | |
111 | 136 | | |
112 | 137 | | |
113 | 138 | | |
| |||
129 | 154 | | |
130 | 155 | | |
131 | 156 | | |
132 | | - | |
133 | | - | |
| 157 | + | |
| 158 | + | |
134 | 159 | | |
135 | 160 | | |
136 | 161 | | |
| |||
195 | 220 | | |
196 | 221 | | |
197 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
198 | 235 | | |
199 | 236 | | |
200 | 237 | | |
201 | 238 | | |
202 | 239 | | |
203 | 240 | | |
204 | 241 | | |
205 | | - | |
206 | | - | |
207 | | - | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
208 | 254 | | |
209 | 255 | | |
210 | 256 | | |
| |||
215 | 261 | | |
216 | 262 | | |
217 | 263 | | |
218 | | - | |
| 264 | + | |
219 | 265 | | |
220 | 266 | | |
221 | 267 | | |
| |||
237 | 283 | | |
238 | 284 | | |
239 | 285 | | |
240 | | - | |
241 | | - | |
| 286 | + | |
| 287 | + | |
242 | 288 | | |
243 | 289 | | |
244 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
220 | 247 | | |
221 | 248 | | |
222 | 249 | | |
| |||
0 commit comments