Filterbars split — search leads left, listing controls hold right
Browse files at this commit7950776b5b65ae5ec3fd5951f6ef49f930fe5be2Parent: 94f09d0- feat
- filterbars split — search leads left, listing controls hold right
3 changed files +31 -26
- crates/in-web/src/share.rs +13 -13
- crates/in-web/src/trash.rs +13 -13
- style/main.scss +5 -0
crates/in-web/src/share.rsmodified+13 -13
| @@ -998,6 +998,19 @@ async fn shared(cx: &Cx) -> Result { | |||
| 998 | <main class="settings-stage stage-wide"> | 998 | <main class="settings-stage stage-wide"> |
| 999 | <h1 class="settings-title">(t(language, Key::SharedWithMe))</h1> | 999 | <h1 class="settings-title">(t(language, Key::SharedWithMe))</h1> |
| 1000 | <div class="filterbar"> | 1000 | <div class="filterbar"> |
| 1001 | + <form class="field-box field-box-search" method="get" action="/shared"> | ||
| 1002 | + <span class="field-text">(t(language, Key::NavSearch))</span> | ||
| 1003 | + <input | ||
| 1004 | + class="dd-search" | ||
| 1005 | + type="search" | ||
| 1006 | + name="q" | ||
| 1007 | + value=(box_text.clone()) | ||
| 1008 | + placeholder=(t(language, Key::SearchPlaceholder)) | ||
| 1009 | + aria-label=(t(language, Key::SearchPlaceholder)) | ||
| 1010 | + > | ||
| 1011 | + <input type="hidden" name="sort" value=(sort.to_string())> | ||
| 1012 | + <input type="hidden" name="kind" value=(kind.to_string())> | ||
| 1013 | + </form> | ||
| 1001 | <form class="field-box field-box-sort" method="get" action="/shared"> | 1014 | <form class="field-box field-box-sort" method="get" action="/shared"> |
| 1002 | <span class="field-text">(t(language, Key::Sort))</span> | 1015 | <span class="field-text">(t(language, Key::Sort))</span> |
| 1003 | <select class="status-select" name="sort" data-autosubmit="" data-nosearch="" aria-label=(t(language, Key::Sort))> | 1016 | <select class="status-select" name="sort" data-autosubmit="" data-nosearch="" aria-label=(t(language, Key::Sort))> |
| @@ -1023,19 +1036,6 @@ async fn shared(cx: &Cx) -> Result { | |||
| 1023 | <input type="hidden" name="sort" value=(sort.to_string())> | 1036 | <input type="hidden" name="sort" value=(sort.to_string())> |
| 1024 | <input type="hidden" name="q" value=(box_text.clone())> | 1037 | <input type="hidden" name="q" value=(box_text.clone())> |
| 1025 | </form> | 1038 | </form> |
| 1026 | - <form class="field-box field-box-search" method="get" action="/shared"> | ||
| 1027 | - <span class="field-text">(t(language, Key::NavSearch))</span> | ||
| 1028 | - <input | ||
| 1029 | - class="dd-search" | ||
| 1030 | - type="search" | ||
| 1031 | - name="q" | ||
| 1032 | - value=(box_text.clone()) | ||
| 1033 | - placeholder=(t(language, Key::SearchPlaceholder)) | ||
| 1034 | - aria-label=(t(language, Key::SearchPlaceholder)) | ||
| 1035 | - > | ||
| 1036 | - <input type="hidden" name="sort" value=(sort.to_string())> | ||
| 1037 | - <input type="hidden" name="kind" value=(kind.to_string())> | ||
| 1038 | - </form> | ||
| 1039 | </div> | 1039 | </div> |
| 1040 | <section class="panel"> | 1040 | <section class="panel"> |
| 1041 | <div class="panel-head"> | 1041 | <div class="panel-head"> |
crates/in-web/src/trash.rsmodified+13 -13
| @@ -326,6 +326,19 @@ async fn trash(cx: &Cx) -> Result { | |||
| 326 | <main class="settings-stage stage-wide"> | 326 | <main class="settings-stage stage-wide"> |
| 327 | <h1 class="settings-title">(t(language, Key::Trash))</h1> | 327 | <h1 class="settings-title">(t(language, Key::Trash))</h1> |
| 328 | <div class="filterbar"> | 328 | <div class="filterbar"> |
| 329 | + <form class="field-box field-box-search" method="get" action="/trash"> | ||
| 330 | + <span class="field-text">(t(language, Key::NavSearch))</span> | ||
| 331 | + <input | ||
| 332 | + class="dd-search" | ||
| 333 | + type="search" | ||
| 334 | + name="q" | ||
| 335 | + value=(box_text.clone()) | ||
| 336 | + placeholder=(t(language, Key::SearchPlaceholder)) | ||
| 337 | + aria-label=(t(language, Key::SearchPlaceholder)) | ||
| 338 | + > | ||
| 339 | + <input type="hidden" name="sort" value=(sort_value.clone())> | ||
| 340 | + <input type="hidden" name="kind" value=(kind.to_string())> | ||
| 341 | + </form> | ||
| 329 | <form class="field-box field-box-sort" method="get" action="/trash"> | 342 | <form class="field-box field-box-sort" method="get" action="/trash"> |
| 330 | <span class="field-text">(t(language, Key::Sort))</span> | 343 | <span class="field-text">(t(language, Key::Sort))</span> |
| 331 | <select class="status-select" name="sort" data-autosubmit="" data-nosearch="" aria-label=(t(language, Key::Sort))> | 344 | <select class="status-select" name="sort" data-autosubmit="" data-nosearch="" aria-label=(t(language, Key::Sort))> |
| @@ -351,19 +364,6 @@ async fn trash(cx: &Cx) -> Result { | |||
| 351 | <input type="hidden" name="sort" value=(sort_value.clone())> | 364 | <input type="hidden" name="sort" value=(sort_value.clone())> |
| 352 | <input type="hidden" name="q" value=(box_text.clone())> | 365 | <input type="hidden" name="q" value=(box_text.clone())> |
| 353 | </form> | 366 | </form> |
| 354 | - <form class="field-box field-box-search" method="get" action="/trash"> | ||
| 355 | - <span class="field-text">(t(language, Key::NavSearch))</span> | ||
| 356 | - <input | ||
| 357 | - class="dd-search" | ||
| 358 | - type="search" | ||
| 359 | - name="q" | ||
| 360 | - value=(box_text.clone()) | ||
| 361 | - placeholder=(t(language, Key::SearchPlaceholder)) | ||
| 362 | - aria-label=(t(language, Key::SearchPlaceholder)) | ||
| 363 | - > | ||
| 364 | - <input type="hidden" name="sort" value=(sort_value.clone())> | ||
| 365 | - <input type="hidden" name="kind" value=(kind.to_string())> | ||
| 366 | - </form> | ||
| 367 | </div> | 367 | </div> |
| 368 | (refusal_banner(cx, language, &["restore", "purge", "empty"]).await?) | 368 | (refusal_banner(cx, language, &["restore", "purge", "empty"]).await?) |
| 369 | if !nothing_trashed { | 369 | if !nothing_trashed { |
style/main.scssmodified+5 -0
| @@ -5034,6 +5034,11 @@ div.member-row + div.member-row { | |||
| 5034 | // holding the entry's menu. Everything here is token-painted, so the skins | 5034 | // holding the entry's menu. Everything here is token-painted, so the skins |
| 5035 | // carry it without their own rules. | 5035 | // carry it without their own rules. |
| 5036 | 5036 | ||
| 5037 | +// The bar's halves: the search field leads from the left and the listing | ||
| 5038 | +// controls hold the right edge — the search carries the spring. Shared by | ||
| 5039 | +// the drive, trash and shared bars, which all lead with the search form. | ||
| 5040 | +.filterbar .field-box-search { margin-right: auto; } | ||
| 5041 | + | ||
| 5037 | // The bar: the search field stretches, the sort/kind boxes hug their content, | 5042 | // The bar: the search field stretches, the sort/kind boxes hug their content, |
| 5038 | // and the + (now `.primary`) is the bar's one loud act. | 5043 | // and the + (now `.primary`) is the bar's one loud act. |
| 5039 | .drive-bar { | 5044 | .drive-bar { |