Skip to content

Commit

Permalink
Minor UI fixes (#14926)
Browse files Browse the repository at this point in the history
* disable fork button when not signed in

* fix commit body styling on PR page

* fixup! fix commit body styling on PR page
  • Loading branch information
noerw committed Mar 8, 2021
1 parent f061277 commit f4ce10c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion templates/repo/header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</div>
</form>
{{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
<div class="ui labeled button" tabindex="0">
<div class="ui labeled button {{if not $.IsSigned}} disabled{{end}}" tabindex="0">
<a class="ui compact small basic button {{if or (not $.IsSigned) (not $.CanSignedUserFork)}}poping up{{end}}" {{if $.CanSignedUserFork}}href="{{AppSubUrl}}/repo/fork/{{.ID}}"{{else if $.IsSigned}} data-content="{{$.i18n.Tr "repo.fork_from_self"}}" {{ else }} data-content="{{$.i18n.Tr "repo.fork_guest_user" }}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny">
{{svg "octicon-repo-forked"}}{{$.i18n.Tr "repo.fork"}}
</a>
Expand Down
7 changes: 6 additions & 1 deletion web_src/less/_repository.less
Original file line number Diff line number Diff line change
Expand Up @@ -2768,12 +2768,17 @@ tbody.commit-list {

.commit-body {
white-space: pre-wrap;
line-height: initial;
}

.repository:not(.diff) {
.commit-body {
.commit-body { // commit history list
margin: 0;
}

.timeline-item .commit-body { // PR-comment
margin-left: 40px;
}
}

.git-notes.top {
Expand Down

0 comments on commit f4ce10c

Please sign in to comment.