summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-23 06:09:28 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-23 06:09:28 +0000
commit1635eacd2a9293cd04d21e82def6e2c14ed01242 (patch)
tree257df93e8de5920c325651811af841128f20f2bc /app
parent5b51129e3356a12283f0ba2da15db897ee30cf1a (diff)
downloadgitlab-ce-1635eacd2a9293cd04d21e82def6e2c14ed01242.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/registry/explorer/components/registry_breadcrumb.vue8
-rw-r--r--app/assets/javascripts/registry/explorer/router.js4
2 files changed, 7 insertions, 5 deletions
diff --git a/app/assets/javascripts/registry/explorer/components/registry_breadcrumb.vue b/app/assets/javascripts/registry/explorer/components/registry_breadcrumb.vue
index f51948da8cc..d935ca091a1 100644
--- a/app/assets/javascripts/registry/explorer/components/registry_breadcrumb.vue
+++ b/app/assets/javascripts/registry/explorer/components/registry_breadcrumb.vue
@@ -24,10 +24,10 @@ export default {
},
lastCrumb() {
const { children } = last(this.crumbs);
- const { tagName, classList } = first(children);
+ const { tagName, className } = first(children);
return {
tagName,
- classList: [...classList],
+ className,
text: this.$route.meta.nameGenerator(this.$route),
path: { to: this.$route.name },
};
@@ -41,7 +41,7 @@ export default {
<li
v-for="(crumb, index) in rootCrumbs"
:key="index"
- :class="crumb.classList"
+ :class="crumb.className"
v-html="crumb.innerHTML"
></li>
<li v-if="!isRootRoute">
@@ -51,7 +51,7 @@ export default {
<component :is="divider.tagName" :class="divider.classList" v-html="divider.innerHTML" />
</li>
<li>
- <component :is="lastCrumb.tagName" ref="lastCrumb" :class="lastCrumb.classList">
+ <component :is="lastCrumb.tagName" ref="lastCrumb" :class="lastCrumb.className">
<router-link ref="childRouteLink" :to="lastCrumb.path">{{ lastCrumb.text }}</router-link>
</component>
</li>
diff --git a/app/assets/javascripts/registry/explorer/router.js b/app/assets/javascripts/registry/explorer/router.js
index 7e4c3d28623..28df3177df4 100644
--- a/app/assets/javascripts/registry/explorer/router.js
+++ b/app/assets/javascripts/registry/explorer/router.js
@@ -21,7 +21,9 @@ export default function createRouter(base, store) {
root: true,
},
beforeEnter: (to, from, next) => {
- store.dispatch('requestImagesList');
+ if (!from.name || !store.state.images?.length) {
+ store.dispatch('requestImagesList');
+ }
next();
},
},