Signed by hanna SSH key fingerprint: SHA256:4g9cWhkAAw8gwqhJUcVbSnGEvdGwklW+1Aa/fMUu59k
assets/base.css +11 −0 crates/web/src/repo.rs +9 −19 assets/base.css +11 −0 Expand 270 hidden lines 271 271 border-color : var ( --fb-danger ) ; 272 272 } 273 273 274 + 275 + . settings-actions { 276 + display : flex ; 277 + align-items : center ; 278 + gap : 0.6rem ; 279 + margin-top : 1.25rem ; 280 + } 281 + . settings-actions form { 282 + display : inline ; 283 + } 284 + 274 285 275 286 . danger-zone { 276 287 border-color : var ( --fb-danger ) ;
crates/web/src/repo.rs +9 −19 Expand 740 hidden lines 741 741 section class="listing" { 742 742 h2 { "General" } 743 743 div class="card" { 744 - form method="post" action=( format ! ( "/repo-settings/{id}/general" ) ) { 744 + form id="repo-general" method="post" action=( format ! ( "/repo-settings/{id}/general" ) ) { 745 745 input type ="hidden" name="_csrf" value=( chrome. csrf) ; 746 746 label for ="name" { "Repository name" } 747 747 input type ="text" id="name" name="name" value=( ctx. repo. name) required; Expand 3 hidden lines 751 751 ( vis_option ( Visibility :: Internal , "Internal — any signed-in user" ) ) 752 752 ( vis_option ( Visibility :: Private , "Private — only you and collaborators" ) ) 753 753 } 754 - button class="btn btn-primary" type ="submit" { "Save changes" } 755 754 } 756 - } 757 - } 758 - ( collaborators_section ( id, & chrome. csrf, & collaborators) ) 759 - section class="listing" { 760 - h2 { "Archive" } 761 - div class="card" { 762 - @if ctx. repo. archived_at. is_some ( ) { 763 - p class="muted" { "This repository is archived (read-only). Unarchiving restores pushing." } 755 + div class="settings-actions" { 756 + button class="btn btn-primary" type ="submit" form="repo-general" { "Save changes" } 757 + @let archived = ctx. repo. archived_at. is_some ( ) ; 764 758 form method="post" action=( format ! ( "/repo-settings/{id}/archive" ) ) { 765 759 input type ="hidden" name="_csrf" value=( chrome. csrf) ; 766 - input type ="hidden" name="archived" value="false" ; 767 - button class="btn btn-primary" type ="submit" { "Unarchive repository" } 768 - } 769 - } @else { 770 - p class="muted" { "Archiving makes the repository read-only; pushes are refused until it is unarchived." } 771 - form method="post" action=( format ! ( "/repo-settings/{id}/archive" ) ) { 772 - input type ="hidden" name="_csrf" value=( chrome. csrf) ; 773 - input type ="hidden" name="archived" value="true" ; 774 - button class="btn" type ="submit" { "Archive repository" } 760 + input type ="hidden" name="archived" value=( if archived { "false" } else { "true" } ) ; 761 + button class="btn inline-btn" type ="submit" { 762 + ( if archived { "Unarchive" } else { "Archive" } ) 763 + } 775 764 } 776 765 } 777 766 } 778 767 } 768 + ( collaborators_section ( id, & chrome. csrf, & collaborators) ) 779 769 section class="listing" { 780 770 h2 { "Danger zone" } 781 771 div class="card danger-zone" {