diff options
Diffstat (limited to 'app/assets/javascripts/diffs')
5 files changed, 12 insertions, 15 deletions
diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index 7bc75127876..35d1a564178 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -389,10 +389,7 @@ export default { () => { this.setDiscussions(); - if ( - this.$store.state.notes.doneFetchingBatchDiscussions && - window.gon?.features?.paginatedMrDiscussions - ) { + if (this.$store.state.notes.doneFetchingBatchDiscussions) { this.unwatchDiscussions(); } }, @@ -402,10 +399,6 @@ export default { () => `${this.retrievingBatches}:${this.$store.state.notes.discussions.length}`, () => { if (!this.retrievingBatches && this.$store.state.notes.discussions.length) { - if (!window.gon?.features?.paginatedMrDiscussions) { - this.unwatchDiscussions(); - } - this.unwatchRetrievingBatches(); } }, diff --git a/app/assets/javascripts/diffs/components/diff_file_header.vue b/app/assets/javascripts/diffs/components/diff_file_header.vue index dff61acdfba..16f45c3ad6a 100644 --- a/app/assets/javascripts/diffs/components/diff_file_header.vue +++ b/app/assets/javascripts/diffs/components/diff_file_header.vue @@ -427,6 +427,7 @@ export default { :href="diffFile.ide_edit_path" class="js-ide-edit-blob" data-qa-selector="edit_in_ide_button" + target="_blank" > {{ __('Open in Web IDE') }} </gl-dropdown-item> diff --git a/app/assets/javascripts/diffs/components/merge_conflict_warning.vue b/app/assets/javascripts/diffs/components/merge_conflict_warning.vue index c37a1d75650..6cb1ed4cbcf 100644 --- a/app/assets/javascripts/diffs/components/merge_conflict_warning.vue +++ b/app/assets/javascripts/diffs/components/merge_conflict_warning.vue @@ -36,7 +36,7 @@ export default { <p class="gl-mb-0"> {{ __( - 'Resolve these conflicts or ask someone with write access to this repository to merge it locally.', + 'Resolve these conflicts, or ask someone with write access to this repository to resolve them locally.', ) }} </p> @@ -54,7 +54,7 @@ export default { v-gl-modal-directive="'modal-merge-info'" class="gl-alert-action" > - {{ __('Merge locally') }} + {{ __('Resolve locally') }} </gl-button> </template> </gl-alert> diff --git a/app/assets/javascripts/diffs/components/tree_list.vue b/app/assets/javascripts/diffs/components/tree_list.vue index ffbea854001..abf77fa2ede 100644 --- a/app/assets/javascripts/diffs/components/tree_list.vue +++ b/app/assets/javascripts/diffs/components/tree_list.vue @@ -2,10 +2,13 @@ import { GlTooltipDirective, GlIcon } from '@gitlab/ui'; import { mapActions, mapGetters, mapState } from 'vuex'; import micromatch from 'micromatch'; +import { getModifierKey } from '~/constants'; import { s__, sprintf } from '~/locale'; import FileTree from '~/vue_shared/components/file_tree.vue'; import DiffFileRow from './diff_file_row.vue'; +const MODIFIER_KEY = getModifierKey(); + export default { directives: { GlTooltip: GlTooltipDirective, @@ -65,8 +68,8 @@ export default { this.search = ''; }, }, - searchPlaceholder: sprintf(s__('MergeRequest|Search (e.g. *.vue) (%{modifier_key}P)'), { - modifier_key: /Mac/i.test(navigator.userAgent) ? '⌘' : 'Ctrl+', + searchPlaceholder: sprintf(s__('MergeRequest|Search (e.g. *.vue) (%{MODIFIER_KEY}P)'), { + MODIFIER_KEY, }), DiffFileRow, }; diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js index 96a73917820..9f90de9abde 100644 --- a/app/assets/javascripts/diffs/store/actions.js +++ b/app/assets/javascripts/diffs/store/actions.js @@ -9,7 +9,7 @@ import { createAlert, VARIANT_WARNING } from '~/flash'; import { diffViewerModes } from '~/ide/constants'; import axios from '~/lib/utils/axios_utils'; -import httpStatusCodes from '~/lib/utils/http_status'; +import { HTTP_STATUS_NOT_FOUND, HTTP_STATUS_OK } from '~/lib/utils/http_status'; import Poll from '~/lib/utils/poll'; import { mergeUrlParams, getLocationHash } from '~/lib/utils/url_utility'; import { __, s__ } from '~/locale'; @@ -232,7 +232,7 @@ export const fetchDiffFilesMeta = ({ commit, state }) => { .catch((error) => { worker.terminate(); - if (error.response.status === httpStatusCodes.NOT_FOUND) { + if (error.response.status === HTTP_STATUS_NOT_FOUND) { createAlert({ message: __('Building your merge request. Wait a few moments, then refresh this page.'), variant: VARIANT_WARNING, @@ -248,7 +248,7 @@ export const fetchCoverageFiles = ({ commit, state }) => { data: state.endpointCoverage, method: 'getCoverageReports', successCallback: ({ status, data }) => { - if (status === httpStatusCodes.OK) { + if (status === HTTP_STATUS_OK) { commit(types.SET_COVERAGE_DATA, data); coveragePoll.stop(); |