Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-30 18:08:59 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-30 18:08:59 +0300
commit038366a0932c5f88019cc3db85382f26af3933e7 (patch)
tree584aec1f4ca189f85ccd0b067f6c2e712c8fc004 /app/assets/javascripts/diffs
parent347876a78ef1cc8b630ad99b919ae0f61abbae68 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs')
-rw-r--r--app/assets/javascripts/diffs/components/diff_file.vue22
-rw-r--r--app/assets/javascripts/diffs/i18n.js4
2 files changed, 16 insertions, 10 deletions
diff --git a/app/assets/javascripts/diffs/components/diff_file.vue b/app/assets/javascripts/diffs/components/diff_file.vue
index 6d74952b7a1..ff7be75265b 100644
--- a/app/assets/javascripts/diffs/components/diff_file.vue
+++ b/app/assets/javascripts/diffs/components/diff_file.vue
@@ -1,7 +1,7 @@
<script>
import { mapActions, mapGetters, mapState } from 'vuex';
import { escape } from 'lodash';
-import { GlLoadingIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
+import { GlButton, GlLoadingIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui';
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
import { sprintf } from '~/locale';
import { deprecatedCreateFlash as createFlash } from '~/flash';
@@ -19,6 +19,7 @@ export default {
components: {
DiffFileHeader,
DiffContent,
+ GlButton,
GlLoadingIcon,
},
directives: {
@@ -267,16 +268,21 @@ export default {
<div v-safe-html="errorMessage" class="nothing-here-block"></div>
</div>
<template v-else>
- <div v-show="showWarning" class="nothing-here-block diff-collapsed">
- {{ $options.i18n.collapsed }}
- <a
- class="click-to-expand"
- data-testid="toggle-link"
- href="#"
+ <div
+ v-show="showWarning"
+ class="collapsed-file-warning gl-p-7 gl-bg-orange-50 gl-text-center gl-rounded-bottom-left-base gl-rounded-bottom-right-base"
+ >
+ <p class="gl-mb-8">
+ {{ $options.i18n.autoCollapsed }}
+ </p>
+ <gl-button
+ data-testid="expand-button"
+ category="secondary"
+ variant="warning"
@click.prevent="handleToggle"
>
{{ $options.i18n.expand }}
- </a>
+ </gl-button>
</div>
<diff-content
v-show="showContent"
diff --git a/app/assets/javascripts/diffs/i18n.js b/app/assets/javascripts/diffs/i18n.js
index 361f8e1a6da..4ec24d452bf 100644
--- a/app/assets/javascripts/diffs/i18n.js
+++ b/app/assets/javascripts/diffs/i18n.js
@@ -13,6 +13,6 @@ export const DIFF_FILE = {
),
fork: __('Fork'),
cancel: __('Cancel'),
- collapsed: __('This diff is collapsed.'),
- expand: __('Click to expand it.'),
+ autoCollapsed: __('Files with large changes are collapsed by default.'),
+ expand: __('Expand file'),
};