Skip to content

Commit 608781f

Browse files
jolheisertechknowlogick
authored andcommitted
Fix fork button (#6223)
1 parent 6460cff commit 608781f

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

public/css/index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/less/_repository.less

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,3 +1875,23 @@ tbody.commit-list {
18751875
display: flex;
18761876
align-items: center;
18771877
}
1878+
1879+
.repo-buttons .disabled-repo-button .label {
1880+
opacity: .5;
1881+
}
1882+
1883+
.repo-buttons .disabled-repo-button a.button {
1884+
opacity: .5;
1885+
cursor: not-allowed;
1886+
}
1887+
1888+
.repo-buttons .disabled-repo-button a.button:hover {
1889+
background: none !important;
1890+
color: rgba(0,0,0,.6) !important;
1891+
box-shadow: 0 0 0 1px rgba(34,36,38,.15) inset !important;
1892+
}
1893+
1894+
.repo-buttons .ui.labeled.button > .label {
1895+
border-left: none !important;
1896+
margin: 0 !important;
1897+
}

templates/repo/header.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</a>
3030
</div>
3131
{{if and (not .IsEmpty) ($.Permission.CanRead $.UnitTypeCode)}}
32-
<div class="ui labeled button {{if and (not $.CanSignedUserFork) ($.IsSigned)}}disabled{{end}}" tabindex="0">
32+
<div class="ui labeled button {{if and ($.IsSigned) (not $.CanSignedUserFork)}}disabled-repo-button{{end}}" tabindex="0">
3333
<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">
3434
<i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}}
3535
</a>

0 commit comments

Comments
 (0)