Fixes slideshow from not working for first slide and adds padding to metadata list inside slideshow.

This commit is contained in:
mateuswetah 2020-10-29 15:22:27 -03:00
parent 3f9b4b9d24
commit dcda21ba3a
5 changed files with 11 additions and 7 deletions

View File

@ -135,7 +135,7 @@ export default {
}
// Emit slideshow-from to start this view mode from index
if (this.$route.query.view_mode != ['slideshow'] && this.$route.query['slideshow-from'] != null && this.$route.query['slideshow-from'] != undefined && this.$route.query['slideshow-from'] != false)
if (this.$route.query.view_mode != 'slideshow' && this.$route.query['slideshow-from'] !== null && this.$route.query['slideshow-from'] !== undefined && this.$route.query['slideshow-from'] !== false)
this.$emit('start-slideshow-from-item', this.$route.query['slideshow-from']);
// Admin View Modes

View File

@ -505,13 +505,13 @@ export default {
this.hideControls = !this.hideControls;
},
closeSlideViewMode() {
// Sets the perpage and paged from previous configuration
this.$eventBusSearch.setItemsPerPage(this.$parent.latestPerPageAfterViewModeWithoutPagination, true);
this.$eventBusSearch.setPage(this.$parent.latestPageAfterViewModeWithoutPagination);
let currentQuery = this.$route.query;
delete currentQuery['slideshow-from'];
this.$router.replace({ query: currentQuery });
// Sets the perpage and paged from previous configuration
this.$eventBusSearch.setItemsPerPage(this.$parent.latestPerPageAfterViewModeWithoutPagination, true);
this.$eventBusSearch.setPage(this.$parent.latestPageAfterViewModeWithoutPagination);
this.$parent.onChangeViewMode(this.$parent.latestNonFullscreenViewMode ? this.$parent.latestNonFullscreenViewMode : this.$parent.defaultViewMode);
},
moveToClikedSlide(index) {

View File

@ -54,7 +54,7 @@ export const viewModesMixin = {
return metadata.value_as_html;
},
starSlideshowFromHere(index) {
this.$router.replace({ query: {...this.$route.query, ...{'slideshow-from': index } }});
this.$router.replace({ query: {...this.$route.query, ...{'slideshow-from': index } }}).catch((error) => this.$console.log(error));
}
}
}

View File

@ -752,6 +752,10 @@
});
this.$eventBusSearch.$on('start-slideshow-from-item', (index) => {
let currentQuery = this.$route.query;
delete currentQuery['slideshow-from'];
this.$router.replace({ query: currentQuery }).catch((error) => this.$console.log(error));
this.latestNonFullscreenViewMode = JSON.parse(JSON.stringify(this.viewMode));
this.onChangeViewMode('slideshow');
this.initialItemPosition = index;

View File

@ -27,7 +27,7 @@
#gallery-help-button {
right: 10.5rem;
}
.metadata-menu {
.metadata-menu.tainacan-form {
background-color: var(--tainacan-black);
position: absolute;
z-index: 10;