Drive listing redesign — one panel, column head, whole-row way in
Browse files at this commit6d149b1bad3f58c297eb848978a8a0e20fe9bfa6Parent: 4607f4a- feat
- drive listing redesign — one panel, column head, whole-row way in
3 changed files +247 -49
- crates/in-web/src/drive.rs +71 -31
- crates/in-web/tests/http.rs +8 -5
- style/main.scss +168 -13
crates/in-web/src/drive.rsmodified+71 -31
| @@ -566,7 +566,7 @@ async fn drive(cx: &Cx) -> Result { | |||
| 566 | cx => | 566 | cx => |
| 567 | (topbar(cx, NavPage::Drive, &user, language).await?) | 567 | (topbar(cx, NavPage::Drive, &user, language).await?) |
| 568 | <main class="settings-stage stage-wide"> | 568 | <main class="settings-stage stage-wide"> |
| 569 | - <div class="filterbar"> | 569 | + <div class="filterbar drive-bar"> |
| 570 | if let Some(query) = asked.as_deref() { | 570 | if let Some(query) = asked.as_deref() { |
| 571 | <p class="detail-quiet">(t(language, Key::SearchResults)) (format!(" “{query}”"))</p> | 571 | <p class="detail-quiet">(t(language, Key::SearchResults)) (format!(" “{query}”"))</p> |
| 572 | } else { | 572 | } else { |
| @@ -581,7 +581,6 @@ async fn drive(cx: &Cx) -> Result { | |||
| 581 | } | 581 | } |
| 582 | } | 582 | } |
| 583 | <form class="field-box field-box-search" method="get" action="/drive"> | 583 | <form class="field-box field-box-search" method="get" action="/drive"> |
| 584 | - <span class="field-text">(t(language, Key::NavSearch))</span> | ||
| 585 | <input | 584 | <input |
| 586 | class="dd-search" | 585 | class="dd-search" |
| 587 | type="search" | 586 | type="search" |
| @@ -598,9 +597,7 @@ async fn drive(cx: &Cx) -> Result { | |||
| 598 | <input type="hidden" name="kind" value=(kind.as_str())> | 597 | <input type="hidden" name="kind" value=(kind.as_str())> |
| 599 | } | 598 | } |
| 600 | </form> | 599 | </form> |
| 601 | - <div class="spacer"></div> | ||
| 602 | <form class="field-box field-box-sort" method="get" action="/drive"> | 600 | <form class="field-box field-box-sort" method="get" action="/drive"> |
| 603 | - <span class="field-text">(t(language, Key::Sort))</span> | ||
| 604 | <select class="status-select" name="sort" data-autosubmit="" data-nosearch="" aria-label=(t(language, Key::Sort))> | 601 | <select class="status-select" name="sort" data-autosubmit="" data-nosearch="" aria-label=(t(language, Key::Sort))> |
| 605 | <option value="name:asc" selected=(sort_value == "name:asc")>(t(language, Key::SortNameAZ))</option> | 602 | <option value="name:asc" selected=(sort_value == "name:asc")>(t(language, Key::SortNameAZ))</option> |
| 606 | <option value="name:desc" selected=(sort_value == "name:desc")>(t(language, Key::SortNameZA))</option> | 603 | <option value="name:desc" selected=(sort_value == "name:desc")>(t(language, Key::SortNameZA))</option> |
| @@ -619,7 +616,6 @@ async fn drive(cx: &Cx) -> Result { | |||
| 619 | <button class="quiet" type="submit" aria-label=(t(language, Key::Sort))>"→"</button> | 616 | <button class="quiet" type="submit" aria-label=(t(language, Key::Sort))>"→"</button> |
| 620 | </form> | 617 | </form> |
| 621 | <form class="field-box field-box-sort" method="get" action="/drive"> | 618 | <form class="field-box field-box-sort" method="get" action="/drive"> |
| 622 | - <span class="field-text">(t(language, Key::Kind))</span> | ||
| 623 | <select class="status-select" name="kind" data-autosubmit="" aria-label=(t(language, Key::Kind))> | 619 | <select class="status-select" name="kind" data-autosubmit="" aria-label=(t(language, Key::Kind))> |
| 624 | <option value="all" selected=(kind == KindFilter::All)>(t(language, Key::KindAll))</option> | 620 | <option value="all" selected=(kind == KindFilter::All)>(t(language, Key::KindAll))</option> |
| 625 | <option value="folders" selected=(kind == KindFilter::Folders)>(t(language, Key::KindFolders))</option> | 621 | <option value="folders" selected=(kind == KindFilter::Folders)>(t(language, Key::KindFolders))</option> |
| @@ -633,7 +629,7 @@ async fn drive(cx: &Cx) -> Result { | |||
| 633 | <button class="quiet" type="submit" aria-label=(t(language, Key::Kind))>"→"</button> | 629 | <button class="quiet" type="submit" aria-label=(t(language, Key::Kind))>"→"</button> |
| 634 | </form> | 630 | </form> |
| 635 | <details class="user-menu drive-add"> | 631 | <details class="user-menu drive-add"> |
| 636 | - <summary class="quiet drive-add-trigger" aria-label=(t(language, Key::NewFolder))>"+ "</summary> | 632 | + <summary class="primary drive-add-trigger" aria-label=(t(language, Key::NewFolder))>"+ "</summary> |
| 637 | <div class="user-menu-panel"> | 633 | <div class="user-menu-panel"> |
| 638 | <form class="user-menu-item-form" method="post" action="/api/folder/create"> | 634 | <form class="user-menu-item-form" method="post" action="/api/folder/create"> |
| 639 | <input type="hidden" name="parent_id" value=(current_id.clone())> | 635 | <input type="hidden" name="parent_id" value=(current_id.clone())> |
| @@ -678,32 +674,73 @@ async fn drive(cx: &Cx) -> Result { | |||
| 678 | </div> | 674 | </div> |
| 679 | if let Some(hits) = hits { | 675 | if let Some(hits) = hits { |
| 680 | if hits.folders.is_empty() && hits.files.is_empty() { | 676 | if hits.folders.is_empty() && hits.files.is_empty() { |
| 681 | - <p class="detail-quiet">(t(language, Key::NoResults))</p> | 677 | + <section class="panel drive-panel"> |
| 678 | + <div class="drive-empty"> | ||
| 679 | + <span class="drive-empty-glyph" aria-hidden="true">"▤"</span> | ||
| 680 | + <p class="drive-empty-text">(t(language, Key::NoResults))</p> | ||
| 681 | + </div> | ||
| 682 | + </section> | ||
| 682 | } else { | 683 | } else { |
| 683 | - <section class="panel"> | 684 | + <section class="panel drive-panel"> |
| 684 | - <div class="panel-body"> | 685 | + <div class="drive-head"> |
| 686 | + <span class="drive-cols"> | ||
| 687 | + <span class="drive-col-ico" aria-hidden="true"></span> | ||
| 688 | + <span>(t(language, Key::NameColumn))</span> | ||
| 689 | + <span class="drive-col-num drive-col-size">(t(language, Key::SizeColumn))</span> | ||
| 690 | + <span class="drive-col-date">(t(language, Key::ModifiedColumn))</span> | ||
| 691 | + <span class="drive-col-num drive-col-dl">(t(language, Key::DownloadsLabel))</span> | ||
| 692 | + </span> | ||
| 693 | + <span class="drive-head-options" aria-hidden="true"></span> | ||
| 694 | + </div> | ||
| 695 | + <div class="drive-list"> | ||
| 685 | for folder in &hits.folders { | 696 | for folder in &hits.folders { |
| 686 | - <div class="dep-row"> | 697 | + <div class="drive-row"> |
| 687 | - <a class="dep-link" href=(format!("/drive?folder={}", folder.id))>(folder.name.clone())</a> | 698 | + <a class="drive-open" href=(format!("/drive?folder={}", folder.id))> |
| 699 | + <span class="file-chip file-chip-folder" aria-hidden="true">"▤"</span> | ||
| 700 | + <span class="dep-title">(folder.name.clone())</span> | ||
| 701 | + <span class="drive-meta" aria-hidden="true"></span> | ||
| 702 | + <span class="drive-meta drive-date">(folder.created_at.date().to_string())</span> | ||
| 703 | + <span class="drive-meta" aria-hidden="true"></span> | ||
| 704 | + </a> | ||
| 688 | </div> | 705 | </div> |
| 689 | } | 706 | } |
| 690 | for file in &hits.files { | 707 | for file in &hits.files { |
| 691 | - <div class="dep-row"> | 708 | + <div class="drive-row"> |
| 692 | - <a class="dep-link" href=(format!("/view/{}", file.id))>(file.name.clone())</a> | 709 | + <a class="drive-open" href=(format!("/view/{}", file.id))> |
| 710 | + (crate::files::entry_chip(cx, file).await?) | ||
| 711 | + <span class="dep-title">(file.name.clone())</span> | ||
| 712 | + <span class="drive-meta drive-size">(human_size(file.size_bytes))</span> | ||
| 713 | + <span class="drive-meta drive-date">(file.created_at.date().to_string())</span> | ||
| 714 | + <span class="drive-meta drive-dl">(file.download_count.to_string())</span> | ||
| 715 | + </a> | ||
| 693 | </div> | 716 | </div> |
| 694 | } | 717 | } |
| 695 | </div> | 718 | </div> |
| 696 | </section> | 719 | </section> |
| 697 | } | 720 | } |
| 698 | } else { | 721 | } else { |
| 699 | - <section class="panel"> | 722 | + <section class="panel drive-panel"> |
| 700 | - <div class="panel-body"> | 723 | + if listing.folders.is_empty() && listing.files.is_empty() { |
| 701 | - if listing.folders.is_empty() && listing.files.is_empty() { | 724 | + <div class="drive-empty"> |
| 702 | - <p class="detail-quiet">(t(language, Key::EmptyFolder))</p> | 725 | + <span class="drive-empty-glyph" aria-hidden="true">"▤"</span> |
| 703 | - } | 726 | + <p class="drive-empty-text">(t(language, Key::EmptyFolder))</p> |
| 727 | + </div> | ||
| 728 | + } else { | ||
| 729 | + <div class="drive-head"> | ||
| 730 | + <span class="drive-cols"> | ||
| 731 | + <span class="drive-col-ico" aria-hidden="true"></span> | ||
| 732 | + <span>(t(language, Key::NameColumn))</span> | ||
| 733 | + <span class="drive-col-num drive-col-size">(t(language, Key::SizeColumn))</span> | ||
| 734 | + <span class="drive-col-date">(t(language, Key::ModifiedColumn))</span> | ||
| 735 | + <span class="drive-col-num drive-col-dl">(t(language, Key::DownloadsLabel))</span> | ||
| 736 | + </span> | ||
| 737 | + <span class="drive-head-options" aria-hidden="true"></span> | ||
| 738 | + </div> | ||
| 739 | + <div class="drive-list"> | ||
| 704 | for folder in listing.folders.iter() { | 740 | for folder in listing.folders.iter() { |
| 705 | - <div class="dep-row"> | 741 | + <div class="drive-row"> |
| 706 | if edit_id.as_deref() == Some(folder.id.as_str()) { | 742 | if edit_id.as_deref() == Some(folder.id.as_str()) { |
| 743 | + <span class="file-chip file-chip-folder" aria-hidden="true">"▤"</span> | ||
| 707 | <form class="dep-edit-form" method="post" action="/api/folder/rename"> | 744 | <form class="dep-edit-form" method="post" action="/api/folder/rename"> |
| 708 | <input type="hidden" name="id" value=(folder.id.clone())> | 745 | <input type="hidden" name="id" value=(folder.id.clone())> |
| 709 | <input class="field-input" type="text" name="name" maxlength="255" | 746 | <input class="field-input" type="text" name="name" maxlength="255" |
| @@ -714,13 +751,15 @@ async fn drive(cx: &Cx) -> Result { | |||
| 714 | <a class="quiet" href=(here.clone())>(t(language, Key::Cancel))</a> | 751 | <a class="quiet" href=(here.clone())>(t(language, Key::Cancel))</a> |
| 715 | </form> | 752 | </form> |
| 716 | } else { | 753 | } else { |
| 717 | - <a class="dep-link" href=(format!("/drive?folder={}", folder.id))> | 754 | + <a class="drive-open" href=(format!("/drive?folder={}", folder.id))> |
| 755 | + <span class="file-chip file-chip-folder" aria-hidden="true">"▤"</span> | ||
| 718 | <span class="dep-title">(folder.name.clone())</span> | 756 | <span class="dep-title">(folder.name.clone())</span> |
| 757 | + <span class="drive-meta" aria-hidden="true"></span> | ||
| 758 | + <span class="drive-meta drive-date">(folder.created_at.date().to_string())</span> | ||
| 759 | + <span class="drive-meta" aria-hidden="true"></span> | ||
| 719 | </a> | 760 | </a> |
| 720 | - <span class="dep-note">(t(language, Key::UploadedLabel))" "(folder.created_at.date().to_string())</span> | ||
| 721 | - <div class="spacer"></div> | ||
| 722 | <details class="user-menu entry-options"> | 761 | <details class="user-menu entry-options"> |
| 723 | - <summary class="quiet entry-options-trigger">(t(language, Key::Options))" ▾"</summary> | 762 | + <summary class="quiet entry-options-trigger" aria-label=(t(language, Key::Options))>"⋯"</summary> |
| 724 | <div class="user-menu-panel"> | 763 | <div class="user-menu-panel"> |
| 725 | <a class="user-menu-item" | 764 | <a class="user-menu-item" |
| 726 | href=(format!("{here}{edit_sep}edit={}", folder.id))>(t(language, Key::Rename))</a> | 765 | href=(format!("{here}{edit_sep}edit={}", folder.id))>(t(language, Key::Rename))</a> |
| @@ -738,9 +777,9 @@ async fn drive(cx: &Cx) -> Result { | |||
| 738 | </div> | 777 | </div> |
| 739 | } | 778 | } |
| 740 | for file in listing.files.iter() { | 779 | for file in listing.files.iter() { |
| 741 | - <div class="dep-row"> | 780 | + <div class="drive-row"> |
| 742 | - (crate::files::entry_chip(cx, file).await?) | ||
| 743 | if edit_id.as_deref() == Some(file.id.as_str()) { | 781 | if edit_id.as_deref() == Some(file.id.as_str()) { |
| 782 | + (crate::files::entry_chip(cx, file).await?) | ||
| 744 | <form class="dep-edit-form" method="post" action="/api/file/rename"> | 783 | <form class="dep-edit-form" method="post" action="/api/file/rename"> |
| 745 | <input type="hidden" name="id" value=(file.id.clone())> | 784 | <input type="hidden" name="id" value=(file.id.clone())> |
| 746 | <input class="field-input" type="text" name="name" maxlength="255" | 785 | <input class="field-input" type="text" name="name" maxlength="255" |
| @@ -751,15 +790,15 @@ async fn drive(cx: &Cx) -> Result { | |||
| 751 | <a class="quiet" href=(here.clone())>(t(language, Key::Cancel))</a> | 790 | <a class="quiet" href=(here.clone())>(t(language, Key::Cancel))</a> |
| 752 | </form> | 791 | </form> |
| 753 | } else { | 792 | } else { |
| 754 | - <a class="dep-link" href=(format!("/view/{}", file.id))> | 793 | + <a class="drive-open" href=(format!("/view/{}", file.id))> |
| 794 | + (crate::files::entry_chip(cx, file).await?) | ||
| 755 | <span class="dep-title">(file.name.clone())</span> | 795 | <span class="dep-title">(file.name.clone())</span> |
| 796 | + <span class="drive-meta drive-size">(human_size(file.size_bytes))</span> | ||
| 797 | + <span class="drive-meta drive-date">(file.created_at.date().to_string())</span> | ||
| 798 | + <span class="drive-meta drive-dl">(file.download_count.to_string())</span> | ||
| 756 | </a> | 799 | </a> |
| 757 | - <span class="file-chip-size">(human_size(file.size_bytes))</span> | ||
| 758 | - <span class="file-chip-note">(t(language, Key::UploadedLabel))" "(file.created_at.date().to_string())</span> | ||
| 759 | - <span class="file-chip-note">(t(language, Key::DownloadsLabel))" "(file.download_count.to_string())</span> | ||
| 760 | - <div class="spacer"></div> | ||
| 761 | <details class="user-menu entry-options"> | 800 | <details class="user-menu entry-options"> |
| 762 | - <summary class="quiet entry-options-trigger">(t(language, Key::Options))" ▾"</summary> | 801 | + <summary class="quiet entry-options-trigger" aria-label=(t(language, Key::Options))>"⋯"</summary> |
| 763 | <div class="user-menu-panel"> | 802 | <div class="user-menu-panel"> |
| 764 | <a class="user-menu-item" | 803 | <a class="user-menu-item" |
| 765 | href=(format!("{here}{edit_sep}edit={}", file.id))>(t(language, Key::Rename))</a> | 804 | href=(format!("{here}{edit_sep}edit={}", file.id))>(t(language, Key::Rename))</a> |
| @@ -782,6 +821,7 @@ async fn drive(cx: &Cx) -> Result { | |||
| 782 | </div> | 821 | </div> |
| 783 | } | 822 | } |
| 784 | </div> | 823 | </div> |
| 824 | + } | ||
| 785 | </section> | 825 | </section> |
| 786 | } | 826 | } |
| 787 | </main> | 827 | </main> |
crates/in-web/tests/http.rsmodified+8 -5
| @@ -1902,7 +1902,8 @@ async fn drive_search_results_merge_into_one_panel() { | |||
| 1902 | assert!(folder_at < file_at, "file hit precedes folder hit: {body}"); | 1902 | assert!(folder_at < file_at, "file hit precedes folder hit: {body}"); |
| 1903 | // One panel, no heads or chips. | 1903 | // One panel, no heads or chips. |
| 1904 | assert_eq!( | 1904 | assert_eq!( |
| 1905 | - body.matches("<section class=\"panel\">").count(), | 1905 | + body.matches("<section class=\"panel drive-panel\">") |
| 1906 | + .count(), | ||
| 1906 | 1, | 1907 | 1, |
| 1907 | "{body}" | 1908 | "{body}" |
| 1908 | ); | 1909 | ); |
| @@ -2803,7 +2804,7 @@ async fn drive_search_panel_nests_inside_the_stage() { | |||
| 2803 | assert_eq!(page.status, StatusCode::OK, "{}", page.text()); | 2804 | assert_eq!(page.status, StatusCode::OK, "{}", page.text()); |
| 2804 | assert_stage_nests( | 2805 | assert_stage_nests( |
| 2805 | &page.text(), | 2806 | &page.text(), |
| 2806 | - &["panel-body", "name=\"q\"", "staged-report.txt"], | 2807 | + &["drive-panel", "name=\"q\"", "staged-report.txt"], |
| 2807 | ); | 2808 | ); |
| 2808 | } | 2809 | } |
| 2809 | 2810 | ||
| @@ -2833,7 +2834,7 @@ async fn drive_root_hides_crumbs_while_a_subfolder_shows_them() { | |||
| 2833 | assert!(!page.text().contains("detail-crumbs"), "{}", page.text()); | 2834 | assert!(!page.text().contains("detail-crumbs"), "{}", page.text()); |
| 2834 | // The filterbar itself stays, holding the search box and the create form. | 2835 | // The filterbar itself stays, holding the search box and the create form. |
| 2835 | assert!( | 2836 | assert!( |
| 2836 | - page.text().contains("class=\"filterbar\""), | 2837 | + page.text().contains("class=\"filterbar drive-bar\""), |
| 2837 | "{}", | 2838 | "{}", |
| 2838 | page.text() | 2839 | page.text() |
| 2839 | ); | 2840 | ); |
| @@ -3262,7 +3263,8 @@ async fn drive_lists_folders_before_files_in_one_panel() { | |||
| 3262 | let body = page.text(); | 3263 | let body = page.text(); |
| 3263 | // One panel, no heads or chips — just the merged list. | 3264 | // One panel, no heads or chips — just the merged list. |
| 3264 | assert_eq!( | 3265 | assert_eq!( |
| 3265 | - body.matches("<section class=\"panel\">").count(), | 3266 | + body.matches("<section class=\"panel drive-panel\">") |
| 3267 | + .count(), | ||
| 3266 | 1, | 3268 | 1, |
| 3267 | "{body}" | 3269 | "{body}" |
| 3268 | ); | 3270 | ); |
| @@ -3338,7 +3340,8 @@ async fn an_empty_folder_says_how_to_fill_it() { | |||
| 3338 | "no empty-state hint: {body}" | 3340 | "no empty-state hint: {body}" |
| 3339 | ); | 3341 | ); |
| 3340 | assert_eq!( | 3342 | assert_eq!( |
| 3341 | - body.matches("<section class=\"panel\">").count(), | 3343 | + body.matches("<section class=\"panel drive-panel\">") |
| 3344 | + .count(), | ||
| 3342 | 1, | 3345 | 1, |
| 3343 | "{body}" | 3346 | "{body}" |
| 3344 | ); | 3347 | ); |
style/main.scssmodified+168 -13
| @@ -743,7 +743,7 @@ a { | |||
| 743 | padding: 0; | 743 | padding: 0; |
| 744 | border-top: none; | 744 | border-top: none; |
| 745 | } | 745 | } |
| 746 | -// The drive's + menu trigger is a details summary wearing the quiet button | 746 | +// The drive's + menu trigger is a details summary wearing the primary button |
| 747 | // skin; the disclosure marker stays hidden, the '+' is literal text. The | 747 | // skin; the disclosure marker stays hidden, the '+' is literal text. The |
| 748 | // open panel is the house `.user-menu-panel` — no bar-local rules, no script. | 748 | // open panel is the house `.user-menu-panel` — no bar-local rules, no script. |
| 749 | .drive-add-trigger { | 749 | .drive-add-trigger { |
| @@ -2709,12 +2709,6 @@ img.avatar { | |||
| 2709 | white-space: nowrap; | 2709 | white-space: nowrap; |
| 2710 | } | 2710 | } |
| 2711 | 2711 | ||
| 2712 | -.dep-note { | ||
| 2713 | - flex: none; | ||
| 2714 | - font-size: 11px; | ||
| 2715 | - color: var(--muted-soft); | ||
| 2716 | -} | ||
| 2717 | - | ||
| 2718 | // The dependency row's way in, the subtask row's own shape (`subtask-open`): | 2712 | // The dependency row's way in, the subtask row's own shape (`subtask-open`): |
| 2719 | // tag, key, title and note are one target, so the whole stretch between the | 2713 | // tag, key, title and note are one target, so the whole stretch between the |
| 2720 | // row's edges and the X is one anchor — `flex: 1` keeps the note at the row's | 2714 | // row's edges and the X is one anchor — `flex: 1` keeps the note at the row's |
| @@ -4536,12 +4530,6 @@ input[type="radio"] { | |||
| 4536 | } | 4530 | } |
| 4537 | } | 4531 | } |
| 4538 | 4532 | ||
| 4539 | -// Row details keep the chip-note voice: muted, small, single line. The | ||
| 4540 | -// dep-note never wraps mid-row; the name's ellipsis absorbs the pressure. | ||
| 4541 | -.dep-row > .dep-note { | ||
| 4542 | - white-space: nowrap; | ||
| 4543 | -} | ||
| 4544 | - | ||
| 4545 | // Upload progress rows in the corner stack: name, bar, percent. The track is | 4533 | // Upload progress rows in the corner stack: name, bar, percent. The track is |
| 4546 | // the house upload-progress rule freed of its upload-box geometry (it was | 4534 | // the house upload-progress rule freed of its upload-box geometry (it was |
| 4547 | // absolutely positioned into a box the drive form never renders) — here it | 4535 | // absolutely positioned into a box the drive form never renders) — here it |
| @@ -5047,3 +5035,170 @@ div.member-row + div.member-row { | |||
| 5047 | font-weight: 500; | 5035 | font-weight: 500; |
| 5048 | } | 5036 | } |
| 5049 | .share-expiry { width: 90px; flex: none; } | 5037 | .share-expiry { width: 90px; flex: none; } |
| 5038 | + | ||
| 5039 | +// -- drive listing redesign ---------------------------------------------------- | ||
| 5040 | +// The drive reads as one calm list now, not a stack of cards: a column head, | ||
| 5041 | +// hairline rules between rows, the whole row as the way in, and a quiet ⋯ | ||
| 5042 | +// holding the entry's menu. Everything here is token-painted, so the skins | ||
| 5043 | +// carry it without their own rules. | ||
| 5044 | + | ||
| 5045 | +// The bar: the search field stretches, the sort/kind boxes hug their content, | ||
| 5046 | +// and the + (now `.primary`) is the bar's one loud act. | ||
| 5047 | +.drive-bar { | ||
| 5048 | + gap: 10px; | ||
| 5049 | + | ||
| 5050 | + .field-box-search { | ||
| 5051 | + flex: 1 1 240px; | ||
| 5052 | + max-width: 460px; | ||
| 5053 | + } | ||
| 5054 | + | ||
| 5055 | + .field-box-sort { flex: none; } | ||
| 5056 | +} | ||
| 5057 | + | ||
| 5058 | +// The column head: same grid as the rows beneath it, so the labels sit over | ||
| 5059 | +// their numbers exactly. The trailing spacer mirrors the ⋯ trigger's box. | ||
| 5060 | +.drive-head { | ||
| 5061 | + display: flex; | ||
| 5062 | + align-items: center; | ||
| 5063 | + gap: 10px; | ||
| 5064 | + padding: 8px 16px; | ||
| 5065 | + border-bottom: 1px solid var(--border); | ||
| 5066 | + font-family: var(--font-mono); | ||
| 5067 | + font-size: 10px; | ||
| 5068 | + letter-spacing: 0.08em; | ||
| 5069 | + text-transform: uppercase; | ||
| 5070 | + color: var(--muted-soft); | ||
| 5071 | +} | ||
| 5072 | + | ||
| 5073 | +.drive-cols, | ||
| 5074 | +.drive-open { | ||
| 5075 | + display: grid; | ||
| 5076 | + grid-template-columns: 40px minmax(0, 1fr) 76px 110px 88px; | ||
| 5077 | + gap: 12px; | ||
| 5078 | + align-items: center; | ||
| 5079 | +} | ||
| 5080 | + | ||
| 5081 | +.drive-head .drive-cols > span { | ||
| 5082 | + min-width: 0; | ||
| 5083 | + overflow: hidden; | ||
| 5084 | + text-overflow: ellipsis; | ||
| 5085 | + white-space: nowrap; | ||
| 5086 | +} | ||
| 5087 | + | ||
| 5088 | +.drive-cols { | ||
| 5089 | + flex: 1; | ||
| 5090 | + min-width: 0; | ||
| 5091 | +} | ||
| 5092 | + | ||
| 5093 | +.drive-col-num { text-align: right; } | ||
| 5094 | + | ||
| 5095 | +.drive-head-options { | ||
| 5096 | + flex: none; | ||
| 5097 | + width: 28px; | ||
| 5098 | +} | ||
| 5099 | + | ||
| 5100 | +.drive-list { | ||
| 5101 | + display: flex; | ||
| 5102 | + flex-direction: column; | ||
| 5103 | +} | ||
| 5104 | + | ||
| 5105 | +// One row: hairline underneath, a hover tint, and nothing boxed of its own. | ||
| 5106 | +.drive-row { | ||
| 5107 | + display: flex; | ||
| 5108 | + align-items: center; | ||
| 5109 | + gap: 10px; | ||
| 5110 | + padding: 5px 16px; | ||
| 5111 | + border-bottom: 1px solid var(--border-soft); | ||
| 5112 | + font-size: 13px; | ||
| 5113 | + transition: background-color var(--dur-fast) var(--ease); | ||
| 5114 | + | ||
| 5115 | + &:last-child { border-bottom: none; } | ||
| 5116 | + &:hover { background: var(--row-hover); } | ||
| 5117 | +} | ||
| 5118 | + | ||
| 5119 | +// The row's way in: icon, name and every meta cell inside the anchor, so the | ||
| 5120 | +// full stretch of the row opens the entry instead of just the word. | ||
| 5121 | +.drive-open { | ||
| 5122 | + flex: 1; | ||
| 5123 | + min-width: 0; | ||
| 5124 | + padding: 5px 0; | ||
| 5125 | + color: inherit; | ||
| 5126 | + text-decoration: none; | ||
| 5127 | + | ||
| 5128 | + &:hover .dep-title { text-decoration: underline; } | ||
| 5129 | +} | ||
| 5130 | + | ||
| 5131 | +.drive-meta { | ||
| 5132 | + min-width: 0; | ||
| 5133 | + overflow: hidden; | ||
| 5134 | + text-overflow: ellipsis; | ||
| 5135 | + white-space: nowrap; | ||
| 5136 | + font-family: var(--font-mono); | ||
| 5137 | + font-size: 11px; | ||
| 5138 | + color: var(--muted-soft); | ||
| 5139 | + text-align: right; | ||
| 5140 | +} | ||
| 5141 | + | ||
| 5142 | +// The ⋯ trigger: a small unboxed button that keeps its hover ring. Border and | ||
| 5143 | +// ground come off so a long list is not a column of little rectangles. | ||
| 5144 | +.drive-row .entry-options-trigger { | ||
| 5145 | + width: 28px; | ||
| 5146 | + height: 28px; | ||
| 5147 | + padding: 0; | ||
| 5148 | + justify-content: center; | ||
| 5149 | + background: transparent; | ||
| 5150 | + border-color: transparent; | ||
| 5151 | + font-size: 15px; | ||
| 5152 | + line-height: 1; | ||
| 5153 | + color: var(--muted); | ||
| 5154 | + | ||
| 5155 | + &:hover { | ||
| 5156 | + background: var(--surface); | ||
| 5157 | + border-color: var(--border-strong); | ||
| 5158 | + color: var(--ink); | ||
| 5159 | + } | ||
| 5160 | +} | ||
| 5161 | + | ||
| 5162 | +// An open menu keeps its trigger visible against the tinted row. | ||
| 5163 | +.drive-row .entry-options[open] > .entry-options-trigger { | ||
| 5164 | + background: var(--surface); | ||
| 5165 | + border-color: var(--border-strong); | ||
| 5166 | + color: var(--ink); | ||
| 5167 | +} | ||
| 5168 | + | ||
| 5169 | +// The empty states (empty folder, no search hits): centred, quiet, one glyph. | ||
| 5170 | +.drive-empty { | ||
| 5171 | + display: flex; | ||
| 5172 | + flex-direction: column; | ||
| 5173 | + align-items: center; | ||
| 5174 | + gap: 10px; | ||
| 5175 | + padding: 56px 24px; | ||
| 5176 | + text-align: center; | ||
| 5177 | +} | ||
| 5178 | + | ||
| 5179 | +.drive-empty-glyph { | ||
| 5180 | + font-size: 26px; | ||
| 5181 | + color: var(--muted-soft); | ||
| 5182 | +} | ||
| 5183 | + | ||
| 5184 | +.drive-empty-text { | ||
| 5185 | + margin: 0; | ||
| 5186 | + font-size: 13px; | ||
| 5187 | + color: var(--muted); | ||
| 5188 | +} | ||
| 5189 | + | ||
| 5190 | +// Narrow viewports keep icon, name and size; the date and downloads columns | ||
| 5191 | +// fold away instead of crushing the name. | ||
| 5192 | +@media (max-width: 620px) { | ||
| 5193 | + .drive-cols, | ||
| 5194 | + .drive-open { | ||
| 5195 | + grid-template-columns: 40px minmax(0, 1fr) 72px; | ||
| 5196 | + } | ||
| 5197 | + | ||
| 5198 | + .drive-col-date, | ||
| 5199 | + .drive-col-dl, | ||
| 5200 | + .drive-date, | ||
| 5201 | + .drive-dl { | ||
| 5202 | + display: none; | ||
| 5203 | + } | ||
| 5204 | +} | ||