diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-14 03:10:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-14 03:10:05 +0300 |
commit | d2608eb839100e794930c246ee357c62d0482714 (patch) | |
tree | a04c214e54132062650f625e3374a6e3c102d44c /app/assets/javascripts/vue_shared/components/web_ide_link.vue | |
parent | 79ecd9a7489305e8357ca1df74ac7d7cc775b0d3 (diff) |
Add latest changes from gitlab-org/gitlab@master
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: { |