diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-21 07:08:36 +0000 |
commit | 48aff82709769b098321c738f3444b9bdaa694c6 (patch) | |
tree | e00c7c43e2d9b603a5a6af576b1685e400410dee /app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue | |
parent | 879f5329ee916a948223f8f43d77fba4da6cd028 (diff) | |
download | gitlab-ce-48aff82709769b098321c738f3444b9bdaa694c6.tar.gz |
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue')
-rw-r--r-- | app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue index 6608381f348..ff0d065c71d 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue @@ -1,14 +1,16 @@ <script> -import { GlIcon } from '@gitlab/ui'; -import tooltip from '~/vue_shared/directives/tooltip'; -import { __ } from '~/locale'; +import { GlIcon, GlTooltipDirective } from '@gitlab/ui'; +import { SQUASH_BEFORE_MERGE } from '../../i18n'; export default { components: { GlIcon, }, directives: { - tooltip, + GlTooltip: GlTooltipDirective, + }, + i18n: { + ...SQUASH_BEFORE_MERGE, }, props: { value: { @@ -28,7 +30,10 @@ export default { }, computed: { tooltipTitle() { - return this.isDisabled ? __('Required in this project.') : false; + return this.isDisabled ? this.$options.i18n.tooltipTitle : null; + }, + tooltipFocusable() { + return this.isDisabled ? '0' : null; }, }, }; @@ -37,10 +42,11 @@ export default { <template> <div class="inline"> <label - v-tooltip + v-gl-tooltip :class="{ 'gl-text-gray-400': isDisabled }" + :tabindex="tooltipFocusable" data-testid="squashLabel" - :data-title="tooltipTitle" + :title="tooltipTitle" > <input :checked="value" @@ -50,19 +56,20 @@ export default { class="qa-squash-checkbox js-squash-checkbox" @change="$emit('input', $event.target.checked)" /> - {{ __('Squash commits') }} + {{ $options.i18n.checkboxLabel }} </label> <a v-if="helpPath" - v-tooltip + v-gl-tooltip :href="helpPath" - data-title="About this feature" - data-placement="bottom" + :title="$options.i18n.helpLabel" target="_blank" rel="noopener noreferrer nofollow" - data-container="body" > <gl-icon name="question" /> + <span class="sr-only"> + {{ $options.i18n.helpLabel }} + </span> </a> </div> </template> |