Skip to content

Commit 26d5028

Browse files
committed
Re-enable listing of forks when logged out
1 parent f5aaa74 commit 26d5028

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

templates/repo/header.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
</div>
8484
</form>
8585
{{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
86-
<div class="ui labeled button {{if not $.IsSigned}} disabled{{end}}" tabindex="0">
87-
<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">
86+
<div class="ui labeled button{{if not $.IsSigned}} disabled{{end}}" tabindex="0">
87+
<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">
8888
{{svg "octicon-repo-forked"}}{{$.i18n.Tr "repo.fork"}}
8989
</a>
9090
<a class="ui basic label" href="{{.Link}}/forks">

web_src/less/_base.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1585,6 +1585,7 @@ a.ui.label:hover {
15851585
border-left: none;
15861586
}
15871587

1588+
.ui.labeled.button.disabled > .button:hover,
15881589
.ui.basic.buttons .button,
15891590
.ui.basic.button {
15901591
color: var(--color-text-light);

web_src/less/_repository.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2861,6 +2861,10 @@ tbody.commit-list {
28612861
opacity: var(--opacity-disabled);
28622862
}
28632863

2864+
.repo-buttons .ui.labeled.button.disabled {
2865+
pointer-events: inherit !important;
2866+
}
2867+
28642868
.repo-buttons .ui.labeled.button > .label {
28652869
border-left: 0 !important;
28662870
margin: 0 !important;

0 commit comments

Comments
 (0)