Fix issues with inconsistent spacing in areas (#32607)

Fix issues with inconsistent spacing in areas where the branch_dropdown
component is used.
before:

![1732238359257](https://github.com/user-attachments/assets/38edda1f-ec4e-419e-9264-68009375d177)

![1732238334410](https://github.com/user-attachments/assets/c4770aea-bc83-477c-9b6a-632f984c0d7d)

after:

![1732238273317](https://github.com/user-attachments/assets/4d05068e-db97-45af-86c4-29442dff1bdf)

![1732238723881](https://github.com/user-attachments/assets/69acd286-f79b-44fe-ad73-2d5fc6dfc98c)

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Kerwin Bryant 2024-11-22 14:12:50 +08:00 committed by GitHub
parent c4e27cb27b
commit bc7d599030
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -4,8 +4,8 @@
<div class="ui container"> <div class="ui container">
{{template "repo/sub_menu" .}} {{template "repo/sub_menu" .}}
<div class="repo-button-row"> <div class="repo-button-row">
<div class="tw-flex tw-items-center"> <div class="repo-button-row-left">
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "tw-mr-1"}} {{template "repo/branch_dropdown" dict "root" .}}
<a href="{{.RepoLink}}/graph" class="ui basic small compact button"> <a href="{{.RepoLink}}/graph" class="ui basic small compact button">
{{svg "octicon-git-branch"}} {{svg "octicon-git-branch"}}
{{ctx.Locale.Tr "repo.commit_graph"}} {{ctx.Locale.Tr "repo.commit_graph"}}

View File

@ -47,7 +47,7 @@
{{$isHomepage := (eq $n 0)}} {{$isHomepage := (eq $n 0)}}
<div class="repo-button-row" data-is-homepage="{{$isHomepage}}"> <div class="repo-button-row" data-is-homepage="{{$isHomepage}}">
<div class="repo-button-row-left"> <div class="repo-button-row-left">
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "tw-mr-1"}} {{template "repo/branch_dropdown" dict "root" .}}
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}} {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
{{$cmpBranch := ""}} {{$cmpBranch := ""}}
{{if ne .Repository.ID .BaseRepo.ID}} {{if ne .Repository.ID .BaseRepo.ID}}