diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-28 18:10:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-28 18:10:08 +0300 |
commit | f7f0c0502763777f48964774a87b0a34dfb1d9ab (patch) | |
tree | 777821671f0eba38eadd5f60da96a1e54870350a /app/assets/javascripts/vue_merge_request_widget/components | |
parent | 10cb807543dca60b59a380100d1b70730d0e8b29 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget/components')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue | 77 | ||||
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue | 6 |
2 files changed, 6 insertions, 77 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue index 8cdaa3316ee..e1d88099580 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue @@ -1,9 +1,5 @@ <script> import { - GlButton, - GlDropdown, - GlDropdownSectionHeader, - GlDropdownItem, GlLink, GlTooltipDirective, GlModalDirective, @@ -14,8 +10,6 @@ import { constructWebIDEPath } from '~/lib/utils/url_utility'; import { s__ } from '~/locale'; import clipboardButton from '~/vue_shared/components/clipboard_button.vue'; import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue'; -import WebIdeLink from '~/vue_shared/components/web_ide_link.vue'; -import MrWidgetHowToMergeModal from './mr_widget_how_to_merge_modal.vue'; import MrWidgetIcon from './mr_widget_icon.vue'; export default { @@ -24,14 +18,8 @@ export default { clipboardButton, TooltipOnTruncate, MrWidgetIcon, - MrWidgetHowToMergeModal, - GlButton, - GlDropdown, - GlDropdownSectionHeader, - GlDropdownItem, GlLink, GlSprintf, - WebIdeLink, }, directives: { GlTooltip: GlTooltipDirective, @@ -107,71 +95,6 @@ export default { </gl-sprintf> </div> </div> - - <div class="branch-actions d-flex"> - <template v-if="mr.isOpen"> - <web-ide-link - v-if="!mr.sourceBranchRemoved" - :show-edit-button="false" - :show-web-ide-button="true" - :web-ide-url="webIdePath" - :web-ide-text="$options.i18n.webIdeText" - :show-gitpod-button="mr.showGitpodButton" - :gitpod-url="mr.gitpodUrl" - :gitpod-enabled="mr.gitpodEnabled" - :user-preferences-gitpod-path="mr.userPreferencesGitpodPath" - :user-profile-enable-gitpod-path="mr.userProfileEnableGitpodPath" - :gitpod-text="$options.i18n.gitpodText" - class="gl-display-none gl-md-display-inline-block gl-mr-3" - data-placement="bottom" - tabindex="0" - data-qa-selector="open_in_web_ide_button" - /> - <gl-button - v-gl-modal-directive="'modal-merge-info'" - :disabled="mr.sourceBranchRemoved" - class="js-check-out-branch gl-mr-3" - > - {{ s__('mrWidget|Check out branch') }} - </gl-button> - <mr-widget-how-to-merge-modal - :is-fork="isFork" - :can-merge="mr.canMerge" - :source-branch="mr.sourceBranch" - :source-project="mr.sourceProject" - :source-project-path="mr.sourceProjectFullPath" - :target-branch="mr.targetBranch" - :source-project-default-url="mr.sourceProjectDefaultUrl" - :reviewing-docs-path="mr.reviewingDocsPath" - /> - </template> - <gl-dropdown - v-gl-tooltip - :title="__('Download as')" - :aria-label="__('Download as')" - icon="download" - right - data-qa-selector="download_dropdown" - > - <gl-dropdown-section-header>{{ __('Download as') }}</gl-dropdown-section-header> - <gl-dropdown-item - :href="mr.emailPatchesPath" - class="js-download-email-patches" - download - data-qa-selector="download_email_patches_menu_item" - > - {{ s__('mrWidget|Email patches') }} - </gl-dropdown-item> - <gl-dropdown-item - :href="mr.plainDiffPath" - class="js-download-plain-diff" - download - data-qa-selector="download_plain_diff_menu_item" - > - {{ s__('mrWidget|Plain diff') }} - </gl-dropdown-item> - </gl-dropdown> - </div> </div> </div> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue index e906b8c3b59..729782cd7a1 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_how_to_merge_modal.vue @@ -112,11 +112,17 @@ export default { return escapeShellString(this.sourceBranch); }, }, + mounted() { + document.querySelector('.js-check-out-modal-trigger')?.addEventListener('click', () => { + this.$refs.modal.show(); + }); + }, }; </script> <template> <gl-modal + ref="modal" modal-id="modal-merge-info" :no-enforce-focus="true" :title="$options.i18n.title" |