diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/assets/javascripts/vue_shared/components/web_ide_link.vue | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/assets/javascripts/vue_shared/components/web_ide_link.vue')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/web_ide_link.vue | 36 |
1 files changed, 26 insertions, 10 deletions
diff --git a/app/assets/javascripts/vue_shared/components/web_ide_link.vue b/app/assets/javascripts/vue_shared/components/web_ide_link.vue index 5ba7c107c12..df0981aea7a 100644 --- a/app/assets/javascripts/vue_shared/components/web_ide_link.vue +++ b/app/assets/javascripts/vue_shared/components/web_ide_link.vue @@ -59,11 +59,21 @@ export default { required: false, default: '', }, + webIdeText: { + type: String, + required: false, + default: '', + }, gitpodUrl: { type: String, required: false, default: '', }, + gitpodText: { + type: String, + required: false, + default: '', + }, }, data() { return { @@ -99,6 +109,17 @@ export default { ...handleOptions, }; }, + webIdeActionText() { + if (this.webIdeText) { + return this.webIdeText; + } else if (this.isBlob) { + return __('Edit in Web IDE'); + } else if (this.isFork) { + return __('Edit fork in Web IDE'); + } + + return __('Web IDE'); + }, webIdeAction() { if (!this.showWebIdeButton) { return null; @@ -111,17 +132,9 @@ export default { } : { href: this.webIdeUrl }; - let text = __('Web IDE'); - - if (this.isBlob) { - text = __('Edit in Web IDE'); - } else if (this.isFork) { - text = __('Edit fork in Web IDE'); - } - return { key: KEY_WEB_IDE, - text, + text: this.webIdeActionText, secondaryText: __('Quickly and easily edit multiple files in your project.'), tooltip: '', attrs: { @@ -132,6 +145,9 @@ export default { ...handleOptions, }; }, + gitpodActionText() { + return this.gitpodText || __('Gitpod'); + }, gitpodAction() { if (!this.showGitpodButton) { return null; @@ -145,7 +161,7 @@ export default { return { key: KEY_GITPOD, - text: __('Gitpod'), + text: this.gitpodActionText, secondaryText, tooltip: secondaryText, attrs: { |