diff options
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/images/bot_avatars/alert-bot.png | bin | 9362 -> 0 bytes | |||
-rw-r--r-- | app/assets/images/bot_avatars/security-bot.png | bin | 9561 -> 0 bytes | |||
-rw-r--r-- | app/assets/images/bot_avatars/support-bot.png | bin | 9806 -> 0 bytes | |||
-rw-r--r-- | app/assets/javascripts/design_management_new/pages/index.vue | 24 | ||||
-rw-r--r-- | app/assets/javascripts/diffs/store/actions.js | 6 | ||||
-rw-r--r-- | app/assets/stylesheets/components/design_management/design_list_item.scss | 9 |
6 files changed, 25 insertions, 14 deletions
diff --git a/app/assets/images/bot_avatars/alert-bot.png b/app/assets/images/bot_avatars/alert-bot.png Binary files differdeleted file mode 100644 index 985d67d6179..00000000000 --- a/app/assets/images/bot_avatars/alert-bot.png +++ /dev/null diff --git a/app/assets/images/bot_avatars/security-bot.png b/app/assets/images/bot_avatars/security-bot.png Binary files differdeleted file mode 100644 index 0709f62f07b..00000000000 --- a/app/assets/images/bot_avatars/security-bot.png +++ /dev/null diff --git a/app/assets/images/bot_avatars/support-bot.png b/app/assets/images/bot_avatars/support-bot.png Binary files differdeleted file mode 100644 index 1335205c191..00000000000 --- a/app/assets/images/bot_avatars/support-bot.png +++ /dev/null diff --git a/app/assets/javascripts/design_management_new/pages/index.vue b/app/assets/javascripts/design_management_new/pages/index.vue index 2a100fae280..700fa903a9c 100644 --- a/app/assets/javascripts/design_management_new/pages/index.vue +++ b/app/assets/javascripts/design_management_new/pages/index.vue @@ -246,28 +246,28 @@ export default { this.onUploadDesign([newFile]); } }, - toggleOnPasteListener(route) { - if (route === DESIGNS_ROUTE_NAME) { - document.addEventListener('paste', this.onDesignPaste); - } else { - document.removeEventListener('paste', this.onDesignPaste); - } + toggleOnPasteListener() { + document.addEventListener('paste', this.onDesignPaste); + }, + toggleOffPasteListener() { + document.removeEventListener('paste', this.onDesignPaste); }, }, beforeRouteUpdate(to, from, next) { - this.toggleOnPasteListener(to.name); this.selectedDesigns = []; next(); }, - beforeRouteLeave(to, from, next) { - this.toggleOnPasteListener(to.name); - next(); - }, }; </script> <template> - <div data-testid="designs-root" class="gl-mt-5"> + <div + data-testid="designs-root" + class="gl-mt-5" + :class="{ 'designs-root': !isDesignListEmpty }" + @mouseenter="toggleOnPasteListener" + @mouseleave="toggleOffPasteListener" + > <header v-if="showToolbar" class="row-content-block border-top-0 p-2 d-flex"> <div class="gl-display-flex gl-justify-content-space-between gl-align-items-center gl-w-full"> <div> diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js index d469ed8ee82..fcc4a8160f4 100644 --- a/app/assets/javascripts/diffs/store/actions.js +++ b/app/assets/javascripts/diffs/store/actions.js @@ -748,9 +748,11 @@ export const setCurrentDiffFileIdFromNote = ({ commit, rootGetters }, noteId) => if (!note) return; - const fileHash = rootGetters.getDiscussion(note.discussion_id).diff_file.file_hash; + const fileHash = rootGetters.getDiscussion(note.discussion_id).diff_file?.file_hash; - commit(types.UPDATE_CURRENT_DIFF_FILE_ID, fileHash); + if (fileHash) { + commit(types.UPDATE_CURRENT_DIFF_FILE_ID, fileHash); + } }; export const navigateToDiffFileIndex = ({ commit, state }, index) => { diff --git a/app/assets/stylesheets/components/design_management/design_list_item.scss b/app/assets/stylesheets/components/design_management/design_list_item.scss index b7f6b2026fe..3a6781b666e 100644 --- a/app/assets/stylesheets/components/design_management/design_list_item.scss +++ b/app/assets/stylesheets/components/design_management/design_list_item.scss @@ -1,3 +1,12 @@ +.designs-root { + border: 2px dashed transparent; + transition: border $gl-transition-duration-medium $general-hover-transition-curve; + + &:hover { + border-color: $gray-100; + } +} + .design-list-item { height: 280px; text-decoration: none; |