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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 18:09:11 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 18:09:11 +0300
commit0eb3d2f799ce4f4de87fb9fc6fd98e592323bc89 (patch)
treefd70d5bc63fe152e0a67aaa5a70e4c9f16dc6ffc /app/assets/javascripts/repository
parent5564275a0b378298dc6281599cbfe71a937109ff (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/repository')
-rw-r--r--app/assets/javascripts/repository/components/breadcrumbs.vue8
-rw-r--r--app/assets/javascripts/repository/components/table/parent_row.vue2
-rw-r--r--app/assets/javascripts/repository/components/table/row.vue2
-rw-r--r--app/assets/javascripts/repository/index.js2
-rw-r--r--app/assets/javascripts/repository/log_tree.js5
5 files changed, 9 insertions, 10 deletions
diff --git a/app/assets/javascripts/repository/components/breadcrumbs.vue b/app/assets/javascripts/repository/components/breadcrumbs.vue
index 9d6eda55c1e..751565ad542 100644
--- a/app/assets/javascripts/repository/components/breadcrumbs.vue
+++ b/app/assets/javascripts/repository/components/breadcrumbs.vue
@@ -45,7 +45,7 @@ export default {
currentPath: {
type: String,
required: false,
- default: '/',
+ default: '',
},
canCollaborate: {
type: Boolean,
@@ -107,7 +107,7 @@ export default {
return acc.concat({
name,
path,
- to: `/-/tree/${escape(this.ref)}${path}`,
+ to: `/-/tree/${escape(this.ref)}${escape(path)}`,
});
},
[
@@ -133,7 +133,7 @@ export default {
},
{
attrs: {
- href: `${this.newBlobPath}${this.currentPath}`,
+ href: `${this.newBlobPath}/${this.currentPath ? escape(this.currentPath) : ''}`,
class: 'qa-new-file-option',
},
text: __('New file'),
@@ -242,7 +242,7 @@ export default {
<template slot="button-content">
<span class="sr-only">{{ __('Add to tree') }}</span>
<icon name="plus" :size="16" class="float-left" />
- <icon name="arrow-down" :size="16" class="float-left" />
+ <icon name="chevron-down" :size="16" class="float-left" />
</template>
<template v-for="(item, i) in dropdownItems">
<component :is="getComponent(item.type)" :key="i" v-bind="item.attrs">
diff --git a/app/assets/javascripts/repository/components/table/parent_row.vue b/app/assets/javascripts/repository/components/table/parent_row.vue
index 096c25a693f..a5c6c9822fb 100644
--- a/app/assets/javascripts/repository/components/table/parent_row.vue
+++ b/app/assets/javascripts/repository/components/table/parent_row.vue
@@ -28,7 +28,7 @@ export default {
return splitArray.join('/');
},
parentRoute() {
- return { path: `/-/tree/${escape(this.commitRef)}/${this.parentPath}` };
+ return { path: `/-/tree/${escape(this.commitRef)}/${escape(this.parentPath)}` };
},
},
methods: {
diff --git a/app/assets/javascripts/repository/components/table/row.vue b/app/assets/javascripts/repository/components/table/row.vue
index e7bbca957c1..f97c8ae1f74 100644
--- a/app/assets/javascripts/repository/components/table/row.vue
+++ b/app/assets/javascripts/repository/components/table/row.vue
@@ -90,7 +90,7 @@ export default {
},
computed: {
routerLinkTo() {
- return this.isFolder ? { path: `/-/tree/${escape(this.ref)}/${this.path}` } : null;
+ return this.isFolder ? { path: `/-/tree/${escape(this.ref)}/${escape(this.path)}` } : null;
},
iconName() {
return `fa-${getIconName(this.type, this.path)}`;
diff --git a/app/assets/javascripts/repository/index.js b/app/assets/javascripts/repository/index.js
index aefbef5467d..637060f6ed9 100644
--- a/app/assets/javascripts/repository/index.js
+++ b/app/assets/javascripts/repository/index.js
@@ -100,7 +100,7 @@ export default function setupVueRepositoryList() {
render(h) {
return h(TreeActionLink, {
props: {
- path: `${historyLink}/${this.$route.params.path || ''}`,
+ path: `${historyLink}/${this.$route.params.path ? escape(this.$route.params.path) : ''}`,
text: __('History'),
},
});
diff --git a/app/assets/javascripts/repository/log_tree.js b/app/assets/javascripts/repository/log_tree.js
index aefa4963d5f..192e410b36f 100644
--- a/app/assets/javascripts/repository/log_tree.js
+++ b/app/assets/javascripts/repository/log_tree.js
@@ -27,9 +27,8 @@ export function fetchLogsTree(client, path, offset, resolver = null) {
fetchpromise = axios
.get(
- `${gon.relative_url_root}/${projectPath}/-/refs/${escape(ref)}/logs_tree/${path.replace(
- /^\//,
- '',
+ `${gon.relative_url_root}/${projectPath}/-/refs/${escape(ref)}/logs_tree/${escape(
+ path.replace(/^\//, ''),
)}`,
{
params: { format: 'json', offset },