Fixes repository header not reloading after page transition, which caused wrong redirection of collection on theme and exporters link.

This commit is contained in:
Mateus Machado Luna 2019-03-26 11:02:57 -03:00
parent 80214a5ccc
commit 18bc6955ac
1 changed files with 10 additions and 7 deletions

View File

@ -105,6 +105,14 @@ export default {
return this.getCollectionURL();
}
},
watch: {
'$route' (to, from) {
if (!this.isRepositoryLevel && from.path != undefined && to.path != from.path) {
this.collectionId = this.$route.params.collectionId;
this.fetchCollectionNameAndURL(this.collectionId);
}
}
},
methods: {
...mapActions('collection', [
'fetchCollectionNameAndURL'
@ -114,6 +122,7 @@ export default {
'getCollectionURL'
]),
openAvailableExportersModal(){
this.$modal.open({
parent: this,
component: AvailableExportersModal,
@ -124,12 +133,6 @@ export default {
}
});
}
},
mounted() {
if (!this.isRepositoryLevel) {
this.collectionId = this.$route.params.collectionId;
this.fetchCollectionNameAndURL(this.collectionId);
}
}
}
</script>
@ -180,7 +183,7 @@ export default {
h1 {
font-size: 1.125rem;
color: white;
line-height: 1.125rem;
line-height: 1.4rem;
max-width: 100%;
text-overflow: ellipsis;
white-space: nowrap;