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