diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:10:18 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:10:18 +0300 |
commit | 520f3178665de5e7d313d332989cd445da83817b (patch) | |
tree | 9db17960cfdd6f6be1deaee57d32e7d7956f2d84 /app/assets/javascripts/snippets | |
parent | 3b963d69199b2e4dd0a0c0b64efcf715242a5d8b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/snippets')
-rw-r--r-- | app/assets/javascripts/snippets/components/edit.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/snippets/components/snippet_header.vue | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/app/assets/javascripts/snippets/components/edit.vue b/app/assets/javascripts/snippets/components/edit.vue index 6e3a670dc38..2c067a36f75 100644 --- a/app/assets/javascripts/snippets/components/edit.vue +++ b/app/assets/javascripts/snippets/components/edit.vue @@ -88,7 +88,9 @@ export default { }, cancelButtonHref() { if (this.newSnippet) { - return this.projectPath ? `/${this.projectPath}/-/snippets` : `/-/snippets`; + return this.projectPath + ? `${gon.relative_url_root}${this.projectPath}/-/snippets` + : `${gon.relative_url_root}-/snippets`; } return this.snippet.webUrl; }, diff --git a/app/assets/javascripts/snippets/components/snippet_header.vue b/app/assets/javascripts/snippets/components/snippet_header.vue index ed087dcfaf9..057756f7d64 100644 --- a/app/assets/javascripts/snippets/components/snippet_header.vue +++ b/app/assets/javascripts/snippets/components/snippet_header.vue @@ -97,7 +97,7 @@ export default { text: __('New snippet'), href: this.snippet.project ? `${this.snippet.project.webUrl}/-/snippets/new` - : '/-/snippets/new', + : `${gon.relative_url_root}-/snippets/new`, variant: 'success', category: 'secondary', cssClass: 'ml-2', @@ -137,7 +137,7 @@ export default { redirectToSnippets() { window.location.pathname = this.snippet.project ? `${this.snippet.project.fullPath}/-/snippets` - : 'dashboard/snippets'; + : `${gon.relative_url_root}dashboard/snippets`; }, closeDeleteModal() { this.$refs.deleteModal.hide(); |