Browse Source

Fix fork button (#6223)

master
John Olheiser techknowlogick 6 years ago
parent
commit
608781f880
3 changed files with 22 additions and 2 deletions
  1. +1
    -1
      public/css/index.css
  2. +20
    -0
      public/less/_repository.less
  3. +1
    -1
      templates/repo/header.tmpl

+ 1
- 1
public/css/index.css
File diff suppressed because it is too large
View File


+ 20
- 0
public/less/_repository.less View File

@@ -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;
}

+ 1
- 1
templates/repo/header.tmpl View File

@@ -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>


Loading…
Cancel
Save