Skip to content

Commit a12dd1d

Browse files
committed
Merge remote-tracking branch 'origin/master' into fix-13175-switch-to-report-errors-on-checking-exists
2 parents ede0dd2 + 7bc0c8c commit a12dd1d

21 files changed

+288
-313
lines changed

templates/admin/navbar.tmpl

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
11
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
2-
<a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
3-
{{.i18n.Tr "admin.dashboard"}}
4-
</a>
5-
<a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
6-
{{.i18n.Tr "admin.users"}}
7-
</a>
8-
<a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
9-
{{.i18n.Tr "admin.organizations"}}
10-
</a>
11-
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
12-
{{.i18n.Tr "admin.repositories"}}
13-
</a>
14-
<a class="{{if .PageIsAdminHooks}}active{{end}} item" href="{{AppSubUrl}}/admin/hooks">
15-
{{.i18n.Tr "admin.hooks"}}
16-
</a>
17-
<a class="{{if .PageIsAdminSystemHooks}}active{{end}} item" href="{{AppSubUrl}}/admin/system-hooks">
18-
{{.i18n.Tr "admin.systemhooks"}}
19-
</a>
20-
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
21-
{{.i18n.Tr "admin.authentication"}}
22-
</a>
23-
<a class="{{if .PageIsAdminEmails}}active{{end}} item" href="{{AppSubUrl}}/admin/emails">
24-
{{.i18n.Tr "admin.emails"}}
25-
</a>
26-
<a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
27-
{{.i18n.Tr "admin.config"}}
28-
</a>
29-
<a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
30-
{{.i18n.Tr "admin.notices"}}
31-
</a>
32-
<a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
33-
{{.i18n.Tr "admin.monitor"}}
34-
</a>
2+
<div class="new-menu-inner">
3+
<a class="{{if .PageIsAdminDashboard}}active{{end}} item" href="{{AppSubUrl}}/admin">
4+
{{.i18n.Tr "admin.dashboard"}}
5+
</a>
6+
<a class="{{if .PageIsAdminUsers}}active{{end}} item" href="{{AppSubUrl}}/admin/users">
7+
{{.i18n.Tr "admin.users"}}
8+
</a>
9+
<a class="{{if .PageIsAdminOrganizations}}active{{end}} item" href="{{AppSubUrl}}/admin/orgs">
10+
{{.i18n.Tr "admin.organizations"}}
11+
</a>
12+
<a class="{{if .PageIsAdminRepositories}}active{{end}} item" href="{{AppSubUrl}}/admin/repos">
13+
{{.i18n.Tr "admin.repositories"}}
14+
</a>
15+
<a class="{{if .PageIsAdminHooks}}active{{end}} item" href="{{AppSubUrl}}/admin/hooks">
16+
{{.i18n.Tr "admin.hooks"}}
17+
</a>
18+
<a class="{{if .PageIsAdminSystemHooks}}active{{end}} item" href="{{AppSubUrl}}/admin/system-hooks">
19+
{{.i18n.Tr "admin.systemhooks"}}
20+
</a>
21+
<a class="{{if .PageIsAdminAuthentications}}active{{end}} item" href="{{AppSubUrl}}/admin/auths">
22+
{{.i18n.Tr "admin.authentication"}}
23+
</a>
24+
<a class="{{if .PageIsAdminEmails}}active{{end}} item" href="{{AppSubUrl}}/admin/emails">
25+
{{.i18n.Tr "admin.emails"}}
26+
</a>
27+
<a class="{{if .PageIsAdminConfig}}active{{end}} item" href="{{AppSubUrl}}/admin/config">
28+
{{.i18n.Tr "admin.config"}}
29+
</a>
30+
<a class="{{if .PageIsAdminNotices}}active{{end}} item" href="{{AppSubUrl}}/admin/notices">
31+
{{.i18n.Tr "admin.notices"}}
32+
</a>
33+
<a class="{{if .PageIsAdminMonitor}}active{{end}} item" href="{{AppSubUrl}}/admin/monitor">
34+
{{.i18n.Tr "admin.monitor"}}
35+
</a>
36+
</div>
3537
</div>

templates/repo/editor/commit_form.tmpl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
<img width="48" height="48" class="ui image commit-avatar" src="{{.SignedUser.RelAvatarLink}}">
33
<div class="commit-form">
44
<h3>{{- if .CanCommitToBranch.WillSign}}
5-
<i title="{{.i18n.Tr "repo.signing.will_sign" .CanCommitToBranch.SigningKey}}" class="lock green icon"></i>{{.i18n.Tr "repo.editor.commit_signed_changes"}}
5+
<span title="{{.i18n.Tr "repo.signing.will_sign" .CanCommitToBranch.SigningKey}}">{{svg "octicon-lock" 24}}</span>
6+
{{.i18n.Tr "repo.editor.commit_signed_changes"}}
67
{{- else}}
7-
<i title="{{.i18n.Tr (printf "repo.signing.wont_sign.%s" .CanCommitToBranch.WontSignReason)}}" class="unlock grey icon"></i>{{.i18n.Tr "repo.editor.commit_changes"}}
8+
<span title="{{.i18n.Tr (printf "repo.signing.wont_sign.%s" .CanCommitToBranch.WontSignReason)}}">{{svg "octicon-unlock" 24}}</span>
9+
{{.i18n.Tr "repo.editor.commit_changes"}}
810
{{- end}}</h3>
911
<div class="field">
1012
<input name="commit_summary" placeholder="{{if .PageIsDelete}}{{.i18n.Tr "repo.editor.delete" .TreePath}}{{else if .PageIsUpload}}{{.i18n.Tr "repo.editor.upload_files_to_dir" .TreePath}}{{else if .IsNewFile}}{{.i18n.Tr "repo.editor.add_tmpl"}}{{else}}{{.i18n.Tr "repo.editor.update" .TreePath}}{{end}}" value="{{.commit_summary}}" autofocus>

templates/repo/home.tmpl

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@
111111
{{if eq $n 0}}
112112
<div class="ui action tiny input" id="clone-panel">
113113
{{if not $.DisableHTTP}}
114-
<button class="ui basic clone button" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
114+
<button class="ui basic clone button no-transition" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">
115115
{{if UseHTTPS}}HTTPS{{else}}HTTP{{end}}
116116
</button>
117117
{{end}}
118118
{{if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
119-
<button class="ui basic clone button" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
119+
<button class="ui basic clone button no-transition" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">
120120
SSH
121121
</button>
122122
{{end}}
@@ -125,6 +125,19 @@
125125
{{else if and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH)}}
126126
<input id="repo-clone-url" value="{{$.CloneLink.SSH}}" readonly>
127127
{{end}}
128+
<script defer>
129+
const isSSH = localStorage.getItem('repo-clone-protocol') === 'ssh';
130+
const sshButton = document.getElementById('repo-clone-ssh');
131+
const httpsButton = document.getElementById('repo-clone-https');
132+
const input = document.getElementById('repo-clone-url');
133+
if (input) input.value = (isSSH ? sshButton : httpsButton).dataset.link;
134+
if (sshButton) sshButton.classList[isSSH ? 'add' : 'remove']('primary');
135+
if (httpsButton) httpsButton.classList[isSSH ? 'remove' : 'add']('primary');
136+
setTimeout(() => {
137+
if (sshButton) sshButton.classList.remove('no-transition');
138+
if (httpsButto) httpsButton.classList.remove('no-transition');
139+
}, 100);
140+
</script>
128141
{{if or (not $.DisableHTTP) (and (not $.DisableSSH) (or $.IsSigned $.ExposeAnonSSH))}}
129142
<button class="ui basic icon button poping up clipboard" id="clipboard-btn" data-original="{{.i18n.Tr "repo.copy_link"}}" data-success="{{.i18n.Tr "repo.copy_link_success"}}" data-error="{{.i18n.Tr "repo.copy_link_error"}}" data-content="{{.i18n.Tr "repo.copy_link"}}" data-variation="inverted tiny" data-clipboard-target="#repo-clone-url">
130143
{{svg "octicon-clippy"}}

templates/repo/issue/view_content/comments.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -403,10 +403,10 @@
403403
<img src="{{.Poster.RelAvatarLink}}">
404404
</a>
405405
{{end}}
406-
<span class="badge {{if eq .Review.Type 1}}green
407-
{{- else if eq .Review.Type 2}}grey
408-
{{- else if eq .Review.Type 3}}red
409-
{{- else}}grey{{end}}">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span>
406+
<span class="badge {{if eq .Review.Type 1}}bg-green
407+
{{- else if eq .Review.Type 2}}bg-grey
408+
{{- else if eq .Review.Type 3}}bg-red
409+
{{- else}}bg-grey{{end}} text-white">{{svg (printf "octicon-%s" .Review.Type.Icon)}}</span>
410410
<span class="text grey">
411411
{{if .OriginalAuthor }}
412412
<span class="text black"><i class="fa {{MigrationIcon $.Repository.GetOriginalURLHostname}}" aria-hidden="true"></i> {{ .OriginalAuthor }}</span><span class="text grey"> {{if $.Repository.OriginalURL}}</span><span class="text migrate">({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}}</span>

templates/repo/settings/navbar.tmpl

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
2-
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
3-
{{.i18n.Tr "repo.settings.options"}}
4-
</a>
5-
<a class="{{if .PageIsSettingsCollaboration}}active{{end}} item" href="{{.RepoLink}}/settings/collaboration">
6-
{{.i18n.Tr "repo.settings.collaboration"}}
7-
</a>
8-
{{if not .Repository.IsEmpty}}
9-
<a class="{{if .PageIsSettingsBranches}}active{{end}} item" href="{{.RepoLink}}/settings/branches">
10-
{{.i18n.Tr "repo.settings.branches"}}
2+
<div class="new-menu-inner">
3+
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.RepoLink}}/settings">
4+
{{.i18n.Tr "repo.settings.options"}}
115
</a>
12-
{{end}}
13-
<a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks">
14-
{{.i18n.Tr "repo.settings.hooks"}}
15-
</a>
16-
{{if .SignedUser.CanEditGitHook}}
17-
<a class="{{if .PageIsSettingsGitHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks/git">
18-
{{.i18n.Tr "repo.settings.githooks"}}
6+
<a class="{{if .PageIsSettingsCollaboration}}active{{end}} item" href="{{.RepoLink}}/settings/collaboration">
7+
{{.i18n.Tr "repo.settings.collaboration"}}
198
</a>
20-
{{end}}
21-
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{.RepoLink}}/settings/keys">
22-
{{.i18n.Tr "repo.settings.deploy_keys"}}
23-
</a>
24-
{{if .LFSStartServer}}
25-
<a class="{{if .PageIsSettingsLFS}}active{{end}} item" href="{{.RepoLink}}/settings/lfs">
26-
{{.i18n.Tr "repo.settings.lfs"}}
9+
{{if not .Repository.IsEmpty}}
10+
<a class="{{if .PageIsSettingsBranches}}active{{end}} item" href="{{.RepoLink}}/settings/branches">
11+
{{.i18n.Tr "repo.settings.branches"}}
12+
</a>
13+
{{end}}
14+
<a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks">
15+
{{.i18n.Tr "repo.settings.hooks"}}
2716
</a>
28-
{{end}}
17+
{{if .SignedUser.CanEditGitHook}}
18+
<a class="{{if .PageIsSettingsGitHooks}}active{{end}} item" href="{{.RepoLink}}/settings/hooks/git">
19+
{{.i18n.Tr "repo.settings.githooks"}}
20+
</a>
21+
{{end}}
22+
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{.RepoLink}}/settings/keys">
23+
{{.i18n.Tr "repo.settings.deploy_keys"}}
24+
</a>
25+
{{if .LFSStartServer}}
26+
<a class="{{if .PageIsSettingsLFS}}active{{end}} item" href="{{.RepoLink}}/settings/lfs">
27+
{{.i18n.Tr "repo.settings.lfs"}}
28+
</a>
29+
{{end}}
30+
</div>
2931
</div>

templates/user/auth/link_account.tmpl

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,29 @@
22

33
<div class="user link-account">
44
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
5-
<!-- TODO handle .ShowRegistrationButton once other login bugs are fixed -->
6-
<a class="item {{if not .user_exists}}active{{end}}"
7-
data-tab="auth-link-signup-tab">
8-
{{.i18n.Tr "auth.oauth_signup_tab"}}
9-
</a>
10-
<a class="item {{if .user_exists}}active{{end}}"
11-
data-tab="auth-link-signin-tab">
12-
{{.i18n.Tr "auth.oauth_signin_tab"}}
13-
</a>
14-
</div>
15-
16-
<div class="ui middle very relaxed page grid">
17-
<div class="column">
18-
<div class="ui tab {{if not .user_exists}}active{{end}}"
5+
<div class="new-menu-inner">
6+
<!-- TODO handle .ShowRegistrationButton once other login bugs are fixed -->
7+
<a class="item {{if not .user_exists}}active{{end}}"
198
data-tab="auth-link-signup-tab">
20-
{{template "user/auth/signup_inner" .}}
21-
</div>
22-
<div class="ui tab {{if .user_exists}}active{{end}}"
9+
{{.i18n.Tr "auth.oauth_signup_tab"}}
10+
</a>
11+
<a class="item {{if .user_exists}}active{{end}}"
2312
data-tab="auth-link-signin-tab">
24-
<div class="ui user signin container icon">
25-
{{template "user/auth/signin_inner" .}}
13+
{{.i18n.Tr "auth.oauth_signin_tab"}}
14+
</a>
15+
</div>
16+
17+
<div class="ui middle very relaxed page grid">
18+
<div class="column">
19+
<div class="ui tab {{if not .user_exists}}active{{end}}"
20+
data-tab="auth-link-signup-tab">
21+
{{template "user/auth/signup_inner" .}}
22+
</div>
23+
<div class="ui tab {{if .user_exists}}active{{end}}"
24+
data-tab="auth-link-signin-tab">
25+
<div class="ui user signin container icon">
26+
{{template "user/auth/signin_inner" .}}
27+
</div>
2628
</div>
2729
</div>
2830
</div>
Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{{if or .EnableOpenIDSignIn .EnableSSPI}}
22
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
3-
<a class="{{if .PageIsLogin}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login">
4-
{{.i18n.Tr "auth.login_userpass"}}
5-
</a>
6-
{{if .EnableOpenIDSignIn}}
7-
<a class="{{if .PageIsLoginOpenID}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login/openid">
8-
<i class="fa fa-openid"></i>
9-
&nbsp;OpenID
10-
</a>
11-
{{end}}
12-
{{if .EnableSSPI}}
13-
<a class="item" rel="nofollow" href="{{AppSubUrl}}/user/login?auth_with_sspi=1">
14-
<i class="fa fa-windows"></i>
15-
&nbsp;SSPI
16-
</a>
17-
{{end}}
3+
<div class="new-menu-inner">
4+
<a class="{{if .PageIsLogin}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login">
5+
{{.i18n.Tr "auth.login_userpass"}}
6+
</a>
7+
{{if .EnableOpenIDSignIn}}
8+
<a class="{{if .PageIsLoginOpenID}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login/openid">
9+
<i class="fa fa-openid"></i>
10+
&nbsp;OpenID
11+
</a>
12+
{{end}}
13+
{{if .EnableSSPI}}
14+
<a class="item" rel="nofollow" href="{{AppSubUrl}}/user/login?auth_with_sspi=1">
15+
<i class="fa fa-windows"></i>
16+
&nbsp;SSPI
17+
</a>
18+
{{end}}
19+
</div>
1820
</div>
1921
{{end}}
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
2-
<a class="{{if .PageIsOpenIDConnect}}active{{end}} item" href="{{AppSubUrl}}/user/openid/connect">
3-
{{.i18n.Tr "auth.openid_connect_title"}}
4-
</a>
5-
{{if .EnableOpenIDSignUp}}
6-
<a class="{{if .PageIsOpenIDRegister}}active{{end}} item" href="{{AppSubUrl}}/user/openid/register">
7-
{{.i18n.Tr "auth.openid_register_title"}}
2+
<div class="new-menu-inner">
3+
<a class="{{if .PageIsOpenIDConnect}}active{{end}} item" href="{{AppSubUrl}}/user/openid/connect">
4+
{{.i18n.Tr "auth.openid_connect_title"}}
85
</a>
9-
{{end}}
6+
{{if .EnableOpenIDSignUp}}
7+
<a class="{{if .PageIsOpenIDRegister}}active{{end}} item" href="{{AppSubUrl}}/user/openid/register">
8+
{{.i18n.Tr "auth.openid_register_title"}}
9+
</a>
10+
{{end}}
11+
</div>
1012
</div>
1113

templates/user/profile.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{template "base/head" .}}
2-
<div class="user profile">
2+
<div class="user profile mt-5">
33
<div class="ui container">
44
<div class="ui stackable grid">
55
<div class="ui five wide column">

templates/user/settings/navbar.tmpl

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
2-
<a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
3-
{{.i18n.Tr "settings.profile"}}
4-
</a>
5-
<a class="{{if .PageIsSettingsAccount}}active{{end}} item" href="{{AppSubUrl}}/user/settings/account">
6-
{{.i18n.Tr "settings.account"}}
7-
</a>
8-
<a class="{{if .PageIsSettingsSecurity}}active{{end}} item" href="{{AppSubUrl}}/user/settings/security">
9-
{{.i18n.Tr "settings.security"}}
10-
</a>
11-
<a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
12-
{{.i18n.Tr "settings.applications"}}
13-
</a>
14-
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/keys">
15-
{{.i18n.Tr "settings.ssh_gpg_keys"}}
16-
</a>
17-
<a class="{{if .PageIsSettingsOrganization}}active{{end}} item" href="{{AppSubUrl}}/user/settings/organization">
18-
{{.i18n.Tr "settings.organization"}}
19-
</a>
20-
<a class="{{if .PageIsSettingsRepos}}active{{end}} item" href="{{AppSubUrl}}/user/settings/repos">
21-
{{.i18n.Tr "settings.repos"}}
22-
</a>
2+
<div class="new-menu-inner">
3+
<a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
4+
{{.i18n.Tr "settings.profile"}}
5+
</a>
6+
<a class="{{if .PageIsSettingsAccount}}active{{end}} item" href="{{AppSubUrl}}/user/settings/account">
7+
{{.i18n.Tr "settings.account"}}
8+
</a>
9+
<a class="{{if .PageIsSettingsSecurity}}active{{end}} item" href="{{AppSubUrl}}/user/settings/security">
10+
{{.i18n.Tr "settings.security"}}
11+
</a>
12+
<a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
13+
{{.i18n.Tr "settings.applications"}}
14+
</a>
15+
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/keys">
16+
{{.i18n.Tr "settings.ssh_gpg_keys"}}
17+
</a>
18+
<a class="{{if .PageIsSettingsOrganization}}active{{end}} item" href="{{AppSubUrl}}/user/settings/organization">
19+
{{.i18n.Tr "settings.organization"}}
20+
</a>
21+
<a class="{{if .PageIsSettingsRepos}}active{{end}} item" href="{{AppSubUrl}}/user/settings/repos">
22+
{{.i18n.Tr "settings.repos"}}
23+
</a>
24+
</div>
2325
</div>

web_src/js/index.js

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,16 +1138,16 @@ async function initRepository() {
11381138
$('#repo-clone-ssh').on('click', function () {
11391139
$('.clone-url').text($(this).data('link'));
11401140
$('#repo-clone-url').val($(this).data('link'));
1141-
$(this).addClass('blue');
1142-
$('#repo-clone-https').removeClass('blue');
1141+
$(this).addClass('primary');
1142+
$('#repo-clone-https').removeClass('primary');
11431143
localStorage.setItem('repo-clone-protocol', 'ssh');
11441144
});
11451145
$('#repo-clone-https').on('click', function () {
11461146
$('.clone-url').text($(this).data('link'));
11471147
$('#repo-clone-url').val($(this).data('link'));
1148-
$(this).addClass('blue');
1148+
$(this).addClass('primary');
11491149
if ($('#repo-clone-ssh').length > 0) {
1150-
$('#repo-clone-ssh').removeClass('blue');
1150+
$('#repo-clone-ssh').removeClass('primary');
11511151
localStorage.setItem('repo-clone-protocol', 'https');
11521152
}
11531153
});
@@ -2520,22 +2520,6 @@ $(document).ready(async () => {
25202520
initTableSort();
25212521
initNotificationsTable();
25222522

2523-
// Repo clone url.
2524-
if ($('#repo-clone-url').length > 0) {
2525-
switch (localStorage.getItem('repo-clone-protocol')) {
2526-
case 'ssh':
2527-
if ($('#repo-clone-ssh').length > 0) {
2528-
$('#repo-clone-ssh').trigger('click');
2529-
} else {
2530-
$('#repo-clone-https').trigger('click');
2531-
}
2532-
break;
2533-
default:
2534-
$('#repo-clone-https').trigger('click');
2535-
break;
2536-
}
2537-
}
2538-
25392523
const routes = {
25402524
'div.user.settings': initUserSettings,
25412525
'div.repository.settings.collaboration': initRepositoryCollaboration

0 commit comments

Comments
 (0)