diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-12 00:10:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-12 00:10:36 +0300 |
commit | a6c51b887647aee631ed0144b3816fe696f2321d (patch) | |
tree | ff0a89cd20bf089ada731974b85af5d3c9da7a70 /app/assets/javascripts/design_management/pages | |
parent | dcacb5daf7941dd2be05e6f688027baae92a6c81 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/design_management/pages')
-rw-r--r-- | app/assets/javascripts/design_management/pages/design/index.vue | 42 | ||||
-rw-r--r-- | app/assets/javascripts/design_management/pages/index.vue | 8 |
2 files changed, 25 insertions, 25 deletions
diff --git a/app/assets/javascripts/design_management/pages/design/index.vue b/app/assets/javascripts/design_management/pages/design/index.vue index 4564e03a3e0..492ed2e8719 100644 --- a/app/assets/javascripts/design_management/pages/design/index.vue +++ b/app/assets/javascripts/design_management/pages/design/index.vue @@ -57,6 +57,27 @@ export default { DesignSidebar, }, mixins: [allVersionsMixin, glFeatureFlagsMixin()], + beforeRouteUpdate(to, from, next) { + // reset scale when the active design changes + this.scale = DEFAULT_SCALE; + next(); + }, + beforeRouteEnter(to, from, next) { + const pageEl = getPageLayoutElement(); + if (pageEl) { + pageEl.classList.add(...DESIGN_DETAIL_LAYOUT_CLASSLIST); + } + + next(); + }, + beforeRouteLeave(to, from, next) { + const pageEl = getPageLayoutElement(); + if (pageEl) { + pageEl.classList.remove(...DESIGN_DETAIL_LAYOUT_CLASSLIST); + } + + next(); + }, props: { id: { type: String, @@ -161,11 +182,6 @@ export default { beforeDestroy() { Mousetrap.unbind('esc', this.closeDesign); }, - beforeRouteUpdate(to, from, next) { - // reset scale when the active design changes - this.scale = DEFAULT_SCALE; - next(); - }, methods: { addImageDiffNoteToStore(store, { data: { createImageDiffNote } }) { updateStoreAfterAddImageDiffNote( @@ -296,22 +312,6 @@ export default { this.resolvedDiscussionsExpanded = !this.resolvedDiscussionsExpanded; }, }, - beforeRouteEnter(to, from, next) { - const pageEl = getPageLayoutElement(); - if (pageEl) { - pageEl.classList.add(...DESIGN_DETAIL_LAYOUT_CLASSLIST); - } - - next(); - }, - beforeRouteLeave(to, from, next) { - const pageEl = getPageLayoutElement(); - if (pageEl) { - pageEl.classList.remove(...DESIGN_DETAIL_LAYOUT_CLASSLIST); - } - - next(); - }, createImageDiffNoteMutation, DESIGNS_ROUTE_NAME, }; diff --git a/app/assets/javascripts/design_management/pages/index.vue b/app/assets/javascripts/design_management/pages/index.vue index fb05788a401..5c82a7331b6 100644 --- a/app/assets/javascripts/design_management/pages/index.vue +++ b/app/assets/javascripts/design_management/pages/index.vue @@ -72,6 +72,10 @@ export default { update: (data) => data.project.issue.userPermissions, }, }, + beforeRouteUpdate(to, from, next) { + this.selectedDesigns = []; + next(); + }, data() { return { permissions: { @@ -324,10 +328,6 @@ export default { this.reorderedDesigns = designs; }, }, - beforeRouteUpdate(to, from, next) { - this.selectedDesigns = []; - next(); - }, dragOptions: { animation: 200, ghostClass: 'gl-visibility-hidden', |