Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/clone_panel.js7
-rw-r--r--app/views/projects/buttons/_clone.html.haml14
2 files changed, 18 insertions, 3 deletions
diff --git a/app/assets/javascripts/clone_panel.js b/app/assets/javascripts/clone_panel.js
index ec831a77bde..79280c13f0f 100644
--- a/app/assets/javascripts/clone_panel.js
+++ b/app/assets/javascripts/clone_panel.js
@@ -17,7 +17,12 @@ export default function initClonePanel() {
$('a', $cloneOptions).on('click', (e) => {
const $this = $(e.currentTarget);
const url = $this.attr('href');
- if (url && (url.startsWith('vscode://') || url.startsWith('xcode://'))) {
+ if (
+ url &&
+ (url.startsWith('vscode://') ||
+ url.startsWith('xcode://') ||
+ url.startsWith('jetbrains://'))
+ ) {
// Clone with "..." should open like a normal link
return;
}
diff --git a/app/views/projects/buttons/_clone.html.haml b/app/views/projects/buttons/_clone.html.haml
index 74d10f11898..5fd1c5cd403 100644
--- a/app/views/projects/buttons/_clone.html.haml
+++ b/app/views/projects/buttons/_clone.html.haml
@@ -30,13 +30,23 @@
%label.label-bold{ class: 'gl-px-4!' }
= _('Open in your IDE')
- if ssh_enabled?
- %a.dropdown-item.open-with-link{ href: 'vscode://vscode.git/clone?url=' + CGI.escape(project.ssh_url_to_repo) }
+ - escaped_ssh_url_to_repo = CGI.escape(project.ssh_url_to_repo)
+ %a.dropdown-item.open-with-link{ href: 'vscode://vscode.git/clone?url=' + escaped_ssh_url_to_repo }
.gl-new-dropdown-item-text-wrapper
= _('Visual Studio Code (SSH)')
- if http_enabled?
- %a.dropdown-item.open-with-link{ href: 'vscode://vscode.git/clone?url=' + CGI.escape(project.http_url_to_repo) }
+ - escaped_http_url_to_repo = CGI.escape(project.http_url_to_repo)
+ %a.dropdown-item.open-with-link{ href: 'vscode://vscode.git/clone?url=' + escaped_http_url_to_repo }
.gl-new-dropdown-item-text-wrapper
= _('Visual Studio Code (HTTPS)')
+ - if ssh_enabled?
+ %a.dropdown-item.open-with-link{ href: 'jetbrains://idea/checkout/git?idea.required.plugins.id=Git4Idea&checkout.repo=' + escaped_ssh_url_to_repo }
+ .gl-new-dropdown-item-text-wrapper
+ = _('IntelliJ IDEA (SSH)')
+ - if http_enabled?
+ %a.dropdown-item.open-with-link{ href: 'jetbrains://idea/checkout/git?idea.required.plugins.id=Git4Idea&checkout.repo=' + escaped_http_url_to_repo }
+ .gl-new-dropdown-item-text-wrapper
+ = _('IntelliJ IDEA (HTTPS)')
- if show_xcode_link?(@project)
%a.dropdown-item.open-with-link{ href: xcode_uri_to_repo(@project) }
.gl-new-dropdown-item-text-wrapper