Skip to content

Commit

Permalink
Fix fork button (#6223)
Browse files Browse the repository at this point in the history
  • Loading branch information
jolheiser authored and techknowlogick committed Mar 6, 2019
1 parent 6460cff commit 608781f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/css/index.css

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions public/less/_repository.less
Original file line number Diff line number Diff line change
Expand Up @@ -1875,3 +1875,23 @@ tbody.commit-list {
display: flex;
align-items: center;
}

.repo-buttons .disabled-repo-button .label {
opacity: .5;
}

.repo-buttons .disabled-repo-button a.button {
opacity: .5;
cursor: not-allowed;
}

.repo-buttons .disabled-repo-button a.button:hover {
background: none !important;
color: rgba(0,0,0,.6) !important;
box-shadow: 0 0 0 1px rgba(34,36,38,.15) inset !important;
}

.repo-buttons .ui.labeled.button > .label {
border-left: none !important;
margin: 0 !important;
}
2 changes: 1 addition & 1 deletion templates/repo/header.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</a>
</div>
{{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
<div class="ui labeled button {{if and (not $.CanSignedUserFork) ($.IsSigned)}}disabled{{end}}" tabindex="0">
<div class="ui labeled button {{if and ($.IsSigned) (not $.CanSignedUserFork)}}disabled-repo-button{{end}}" tabindex="0">
<a class="ui compact 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" }}" href="{{AppSubUrl}}/user/login?redirect_to={{AppSubUrl}}/repo/fork/{{.ID}}" {{end}} data-position="top center" data-variation="tiny">
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
</a>
Expand Down

0 comments on commit 608781f

Please sign in to comment.