diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 12:09:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 12:09:31 +0300 |
commit | 04baa85554ff13bdd4d6f4e6bb24119d17608fee (patch) | |
tree | 7cb9c0977e09d97da340f48703d79b2dbd3579a0 /app/assets/javascripts/diffs | |
parent | 42f41de46525ce0065f02ee07c1a79f5669526a0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/diffs')
5 files changed, 36 insertions, 32 deletions
diff --git a/app/assets/javascripts/diffs/components/compare_versions.vue b/app/assets/javascripts/diffs/components/compare_versions.vue index 3a2146147cc..34716c214c6 100644 --- a/app/assets/javascripts/diffs/components/compare_versions.vue +++ b/app/assets/javascripts/diffs/components/compare_versions.vue @@ -1,6 +1,6 @@ <script> import { mapActions, mapGetters, mapState } from 'vuex'; -import { GlTooltipDirective, GlLink, GlButton, GlSprintf } from '@gitlab/ui'; +import { GlTooltipDirective, GlLink, GlDeprecatedButton, GlSprintf } from '@gitlab/ui'; import { __ } from '~/locale'; import { polyfillSticky } from '~/lib/utils/sticky'; import Icon from '~/vue_shared/components/icon.vue'; @@ -14,7 +14,7 @@ export default { CompareVersionsDropdown, Icon, GlLink, - GlButton, + GlDeprecatedButton, GlSprintf, SettingsDropdown, DiffStats, @@ -140,16 +140,20 @@ export default { :added-lines="addedLines" :removed-lines="removedLines" /> - <gl-button + <gl-deprecated-button v-if="commit || startVersion" :href="latestVersionPath" class="append-right-8 js-latest-version" > {{ __('Show latest version') }} - </gl-button> - <gl-button v-show="hasCollapsedFile" class="append-right-8" @click="expandAllFiles"> + </gl-deprecated-button> + <gl-deprecated-button + v-show="hasCollapsedFile" + class="append-right-8" + @click="expandAllFiles" + > {{ __('Expand all') }} - </gl-button> + </gl-deprecated-button> <settings-dropdown /> </div> </div> diff --git a/app/assets/javascripts/diffs/components/diff_file_header.vue b/app/assets/javascripts/diffs/components/diff_file_header.vue index c51f711fb81..d601c3769a3 100644 --- a/app/assets/javascripts/diffs/components/diff_file_header.vue +++ b/app/assets/javascripts/diffs/components/diff_file_header.vue @@ -1,7 +1,7 @@ <script> import { escape as esc } from 'lodash'; import { mapActions, mapGetters } from 'vuex'; -import { GlButton, GlTooltipDirective, GlLoadingIcon } from '@gitlab/ui'; +import { GlDeprecatedButton, GlTooltipDirective, GlLoadingIcon } from '@gitlab/ui'; import { polyfillSticky } from '~/lib/utils/sticky'; import ClipboardButton from '~/vue_shared/components/clipboard_button.vue'; import Icon from '~/vue_shared/components/icon.vue'; @@ -16,7 +16,7 @@ import { scrollToElement } from '~/lib/utils/common_utils'; export default { components: { GlLoadingIcon, - GlButton, + GlDeprecatedButton, ClipboardButton, EditButton, Icon, @@ -229,7 +229,7 @@ export default { <div class="btn-group" role="group"> <template v-if="diffFile.blob && diffFile.blob.readable_text"> <span v-gl-tooltip.hover :title="s__('MergeRequests|Toggle comments for this file')"> - <gl-button + <gl-deprecated-button ref="toggleDiscussionsButton" :disabled="!diffHasDiscussions(diffFile)" :class="{ active: diffHasExpandedDiscussions(diffFile) }" @@ -242,7 +242,7 @@ export default { @click="toggleFileDiscussionWrappers(diffFile)" > <icon name="comment" /> - </gl-button> + </gl-deprecated-button> </span> <edit-button @@ -265,7 +265,7 @@ export default { v-html="viewReplacedFileButtonText" > </a> - <gl-button + <gl-deprecated-button v-if="!diffFile.is_fully_expanded" ref="expandDiffToFullFileButton" v-gl-tooltip.hover @@ -279,8 +279,8 @@ export default { <gl-loading-icon v-if="diffFile.isLoadingFullFile" color="dark" inline /> <icon v-else-if="diffFile.isShowingFullFile" name="doc-changes" /> <icon v-else name="doc-expand" /> - </gl-button> - <gl-button + </gl-deprecated-button> + <gl-deprecated-button ref="viewButton" v-gl-tooltip.hover :href="diffFile.view_path" @@ -292,7 +292,7 @@ export default { :title="viewFileButtonText" > <icon name="doc-text" /> - </gl-button> + </gl-deprecated-button> <a v-if="diffFile.external_url" diff --git a/app/assets/javascripts/diffs/components/edit_button.vue b/app/assets/javascripts/diffs/components/edit_button.vue index dcb79cd5e16..91e296f8572 100644 --- a/app/assets/javascripts/diffs/components/edit_button.vue +++ b/app/assets/javascripts/diffs/components/edit_button.vue @@ -1,10 +1,10 @@ <script> -import { GlTooltipDirective, GlButton } from '@gitlab/ui'; +import { GlTooltipDirective, GlDeprecatedButton } from '@gitlab/ui'; import Icon from '~/vue_shared/components/icon.vue'; export default { components: { - GlButton, + GlDeprecatedButton, Icon, }, directives: { @@ -37,7 +37,7 @@ export default { </script> <template> - <gl-button + <gl-deprecated-button v-gl-tooltip.top :href="editPath" :title="__('Edit file')" @@ -45,5 +45,5 @@ export default { @click.native="handleEditClick" > <icon name="pencil" /> - </gl-button> + </gl-deprecated-button> </template> diff --git a/app/assets/javascripts/diffs/components/no_changes.vue b/app/assets/javascripts/diffs/components/no_changes.vue index 09cb542c3dc..5fd68471094 100644 --- a/app/assets/javascripts/diffs/components/no_changes.vue +++ b/app/assets/javascripts/diffs/components/no_changes.vue @@ -1,12 +1,12 @@ <script> import { mapGetters } from 'vuex'; import { escape as esc } from 'lodash'; -import { GlButton } from '@gitlab/ui'; +import { GlDeprecatedButton } from '@gitlab/ui'; import { __, sprintf } from '~/locale'; export default { components: { - GlButton, + GlDeprecatedButton, }, props: { changesEmptyStateIllustration: { @@ -43,9 +43,9 @@ export default { <div class="text-content text-center"> <span v-html="emptyStateText"></span> <div class="text-center"> - <gl-button :href="getNoteableData.new_blob_path" variant="success">{{ + <gl-deprecated-button :href="getNoteableData.new_blob_path" variant="success">{{ __('Create commit') - }}</gl-button> + }}</gl-deprecated-button> </div> </div> </div> diff --git a/app/assets/javascripts/diffs/components/settings_dropdown.vue b/app/assets/javascripts/diffs/components/settings_dropdown.vue index 08e991c4791..c45de481a17 100644 --- a/app/assets/javascripts/diffs/components/settings_dropdown.vue +++ b/app/assets/javascripts/diffs/components/settings_dropdown.vue @@ -1,11 +1,11 @@ <script> import { mapActions, mapGetters, mapState } from 'vuex'; -import { GlButton } from '@gitlab/ui'; +import { GlDeprecatedButton } from '@gitlab/ui'; import Icon from '~/vue_shared/components/icon.vue'; export default { components: { - GlButton, + GlDeprecatedButton, Icon, }, computed: { @@ -37,26 +37,26 @@ export default { <div> <span class="bold d-block mb-1">{{ __('File browser') }}</span> <div class="btn-group d-flex"> - <gl-button + <gl-deprecated-button :class="{ active: !renderTreeList }" class="w-100 js-list-view" @click="setRenderTreeList(false)" > {{ __('List view') }} - </gl-button> - <gl-button + </gl-deprecated-button> + <gl-deprecated-button :class="{ active: renderTreeList }" class="w-100 js-tree-view" @click="setRenderTreeList(true)" > {{ __('Tree view') }} - </gl-button> + </gl-deprecated-button> </div> </div> <div class="mt-2"> <span class="bold d-block mb-1">{{ __('Compare changes') }}</span> <div class="btn-group d-flex js-diff-view-buttons"> - <gl-button + <gl-deprecated-button id="inline-diff-btn" :class="{ active: isInlineView }" class="w-100 js-inline-diff-button" @@ -64,8 +64,8 @@ export default { @click="setInlineDiffViewType" > {{ __('Inline') }} - </gl-button> - <gl-button + </gl-deprecated-button> + <gl-deprecated-button id="parallel-diff-btn" :class="{ active: isParallelView }" class="w-100 js-parallel-diff-button" @@ -73,7 +73,7 @@ export default { @click="setParallelDiffViewType" > {{ __('Side-by-side') }} - </gl-button> + </gl-deprecated-button> </div> </div> <div class="mt-2"> |