summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-23 18:27:09 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-23 18:27:09 +0000
commitbcc70301531b6c3118120173389f2aaa7452bf11 (patch)
tree161f1ee56e15ec9e59f48c5e1a9cb86b62469a49 /app/assets
parentd47fc5085a706ab37d038636c9d5934da69853f0 (diff)
downloadgitlab-ce-bcc70301531b6c3118120173389f2aaa7452bf11.tar.gz
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/images/bot_avatars/alert-bot.pngbin9362 -> 0 bytes
-rw-r--r--app/assets/images/bot_avatars/security-bot.pngbin9561 -> 0 bytes
-rw-r--r--app/assets/images/bot_avatars/support-bot.pngbin9806 -> 0 bytes
-rw-r--r--app/assets/javascripts/design_management_new/pages/index.vue24
-rw-r--r--app/assets/javascripts/diffs/store/actions.js6
-rw-r--r--app/assets/stylesheets/components/design_management/design_list_item.scss9
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
deleted file mode 100644
index 985d67d6179..00000000000
--- a/app/assets/images/bot_avatars/alert-bot.png
+++ /dev/null
Binary files differ
diff --git a/app/assets/images/bot_avatars/security-bot.png b/app/assets/images/bot_avatars/security-bot.png
deleted file mode 100644
index 0709f62f07b..00000000000
--- a/app/assets/images/bot_avatars/security-bot.png
+++ /dev/null
Binary files differ
diff --git a/app/assets/images/bot_avatars/support-bot.png b/app/assets/images/bot_avatars/support-bot.png
deleted file mode 100644
index 1335205c191..00000000000
--- a/app/assets/images/bot_avatars/support-bot.png
+++ /dev/null
Binary files differ
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;