diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-20 15:08:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-20 15:08:50 +0300 |
commit | 81fb153d0550c2c0b707a374cb6ee9f2ad089790 (patch) | |
tree | 0326c005bea62adc258bb0d4d1a3a7f5fc6a9532 /app/assets/javascripts/vue_shared | |
parent | 084d7453e0866f2b29923552fb1c5f380f283ab5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared')
3 files changed, 17 insertions, 10 deletions
diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/label_token.vue b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/label_token.vue index 6f24955814c..914d146fcc3 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/label_token.vue +++ b/app/assets/javascripts/vue_shared/components/filtered_search_bar/tokens/label_token.vue @@ -43,9 +43,7 @@ export default { }, methods: { getActiveLabel(labels, data) { - return labels.find( - (label) => this.getLabelName(label).toLowerCase() === stripQuotes(data).toLowerCase(), - ); + return labels.find((label) => this.getLabelName(label) === stripQuotes(data)); }, /** * There's an inconsistency between private and public API diff --git a/app/assets/javascripts/vue_shared/issuable/show/components/issuable_header.vue b/app/assets/javascripts/vue_shared/issuable/show/components/issuable_header.vue index 649dbd6576b..d883abd2dfd 100644 --- a/app/assets/javascripts/vue_shared/issuable/show/components/issuable_header.vue +++ b/app/assets/javascripts/vue_shared/issuable/show/components/issuable_header.vue @@ -114,7 +114,6 @@ export default { <div class="detail-page-header"> <div class="detail-page-header-body"> <gl-badge - data-testid="status" class="issuable-status-badge gl-mr-3" :class="statusBadgeClass" :variant="badgeVariant" diff --git a/app/assets/javascripts/vue_shared/issuable/show/components/issuable_title.vue b/app/assets/javascripts/vue_shared/issuable/show/components/issuable_title.vue index 47f05a2cee2..8038b7a80a0 100644 --- a/app/assets/javascripts/vue_shared/issuable/show/components/issuable_title.vue +++ b/app/assets/javascripts/vue_shared/issuable/show/components/issuable_title.vue @@ -1,12 +1,14 @@ <script> import { GlIcon, + GlBadge, GlButton, GlIntersectionObserver, GlTooltipDirective, GlSafeHtmlDirective as SafeHtml, } from '@gitlab/ui'; import { __ } from '~/locale'; +import { IssuableStates } from '~/vue_shared/issuable/list/constants'; export default { i18n: { @@ -14,6 +16,7 @@ export default { }, components: { GlIcon, + GlBadge, GlButton, GlIntersectionObserver, }, @@ -44,6 +47,11 @@ export default { stickyTitleVisible: false, }; }, + computed: { + badgeVariant() { + return this.issuable.state === IssuableStates.Opened ? 'success' : 'info'; + }, + }, methods: { handleTitleAppear() { this.stickyTitleVisible = false; @@ -84,14 +92,16 @@ export default { <div class="issue-sticky-header-text gl-display-flex gl-align-items-center gl-mx-auto gl-px-5" > - <p - data-testid="status" - class="issuable-status-box status-box gl-white-space-nowrap gl-my-0" + <gl-badge + class="gl-white-space-nowrap gl-mr-3" :class="statusBadgeClass" + :variant="badgeVariant" > - <gl-icon :name="statusIcon" class="gl-display-block d-sm-none gl-h-6!" /> - <span class="gl-display-none d-sm-block"><slot name="status-badge"></slot></span> - </p> + <gl-icon v-if="statusIcon" class="gl-sm-display-none" :name="statusIcon" /> + <span class="gl-display-none gl-sm-display-block"> + <slot name="status-badge"></slot> + </span> + </gl-badge> <p class="gl-font-weight-bold gl-overflow-hidden gl-white-space-nowrap gl-text-overflow-ellipsis gl-my-0" :title="issuable.title" |