Skip to content

Commit

Permalink
Re-enable listing of forks when logged out
Browse files Browse the repository at this point in the history
  • Loading branch information
CL-Jeremy committed Mar 14, 2021
1 parent f5aaa74 commit 26d5028
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/repo/header.tmpl
Expand Up @@ -83,8 +83,8 @@
</div>
</form>
{{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
<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">
<div class="ui labeled button{{if not $.IsSigned}} disabled{{end}}" tabindex="0">
<a class="ui compact small basic button{{if 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"}}"{{end}} data-position="top center" data-variation="tiny">
{{svg "octicon-repo-forked"}}{{$.i18n.Tr "repo.fork"}}
</a>
<a class="ui basic label" href="{{.Link}}/forks">
Expand Down
1 change: 1 addition & 0 deletions web_src/less/_base.less
Expand Up @@ -1585,6 +1585,7 @@ a.ui.label:hover {
border-left: none;
}

.ui.labeled.button.disabled > .button:hover,
.ui.basic.buttons .button,
.ui.basic.button {
color: var(--color-text-light);
Expand Down
4 changes: 4 additions & 0 deletions web_src/less/_repository.less
Expand Up @@ -2861,6 +2861,10 @@ tbody.commit-list {
opacity: var(--opacity-disabled);
}

.repo-buttons .ui.labeled.button.disabled {
pointer-events: inherit !important;
}

.repo-buttons .ui.labeled.button > .label {
border-left: 0 !important;
margin: 0 !important;
Expand Down

0 comments on commit 26d5028

Please sign in to comment.