Signed by hanna SSH key fingerprint: SHA256:4g9cWhkAAw8gwqhJUcVbSnGEvdGwklW+1Aa/fMUu59k
crates/web/src/pages.rs +1 −2 crates/web/src/repo.rs +1 −4 crates/web/src/tests.rs +0 −1 crates/web/src/pages.rs +1 −2 Expand 152 hidden lines 153 153 aria-label="Search repositories" ; 154 154 button class="btn btn-primary" type ="submit" { "Search" } 155 155 } 156 - ( repo_card ( "Public repositories" , "No public repositories." , & entries) ) 156 + ( repo_card ( "" , "No public repositories." , & entries) ) 157 157 } ) 158 158 } 159 159 Expand 29 hidden lines 189 189 fn user_card ( users : & [ User ] ) -> Markup { 190 190 html ! { 191 191 section class="listing" { 192 - h2 { "Users" } 193 192 @if users. is_empty ( ) { 194 193 div class="card" { p class="muted" { "No users." } } 195 194 } @else {
crates/web/src/repo.rs +1 −4 Expand 634 hidden lines 635 635 let now = crate :: now_ms ( ) ; 636 636 let body = html ! { 637 637 ( repo_header ( state, & ctx, Tab :: Branches , & ctx. repo. default_branch, & branch_list) ) 638 - h2 { "Branches" } 639 638 ul class="entry-list card" { 640 639 @for b in & branches { 641 640 li class="entry-row" { Expand 39 hidden lines 681 680 let base = format ! ( "/{}/{}" , ctx. owner. username, ctx. repo. path) ; 682 681 let body = html ! { 683 682 ( repo_header ( state, & ctx, Tab :: Tags , & ctx. repo. default_branch, & branches) ) 684 - h2 { "Tags" } 685 683 @if tags. is_empty ( ) { 686 684 div class="card" { p class="muted" { "No tags." } } 687 685 } @else { Expand 74 hidden lines 762 760 let branches = branch_names ( state, & ctx. repo. id) . await ; 763 761 let body = html ! { 764 762 ( repo_header ( state, & ctx, Tab :: Commits , & rev_name, & branches) ) 765 - h2 { "Commits" } 766 763 ul class="entry-list card" { 767 764 @for ( commit, sig) in commits. iter ( ) . zip ( states. iter ( ) ) { 768 765 @let commit_url = format ! ( "{base}/-/commit/{}" , commit. oid) ; Expand 426 hidden lines 1195 1192 pub ( crate ) fn repo_card ( title : & str , empty : & str , entries : & [ RepoEntry ] ) -> Markup { 1196 1193 html ! { 1197 1194 section class="listing" { 1198 - h2 { ( title) } 1195 + @if !title. is_empty ( ) { h2 { ( title) } } 1199 1196 @if entries. is_empty ( ) { 1200 1197 div class="card" { p class="muted" { ( empty) } } 1201 1198 } @else {
crates/web/src/tests.rs +0 −1 Expand 313 hidden lines 314 314 let res = app. oneshot ( get ( "/explore" ) ) . await . unwrap ( ) ; 315 315 assert_eq ! ( res. status ( ) , StatusCode :: OK ) ; 316 316 let html = body_string ( res) . await ; 317 - assert ! ( html. contains ( "Public repositories" ) , "explore heading" ) ; 318 317 assert ! ( html. contains ( "ada/open" ) , "public repo listed" ) ; 319 318 320 319 assert ! ( html. contains ( "/explore/users" ) , "users tab present" ) ;