Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-09 12:07:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-09 12:07:45 +0300
commitf4186a753b86625a83e8499af14b5badd63a2ac2 (patch)
treeb960dd9f4255e9eee9f87d28e853f163836aa4c5 /app/assets/javascripts/boards
parent0221116862ee66024a03492b4fbbe4e069d84303 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/boards')
-rw-r--r--app/assets/javascripts/boards/components/issue_card_inner.vue36
-rw-r--r--app/assets/javascripts/boards/components/issue_card_inner_scoped_label.vue45
2 files changed, 9 insertions, 72 deletions
diff --git a/app/assets/javascripts/boards/components/issue_card_inner.vue b/app/assets/javascripts/boards/components/issue_card_inner.vue
index 274565adab0..00da039c235 100644
--- a/app/assets/javascripts/boards/components/issue_card_inner.vue
+++ b/app/assets/javascripts/boards/components/issue_card_inner.vue
@@ -1,7 +1,7 @@
<script>
import _ from 'underscore';
import { mapState } from 'vuex';
-import { GlTooltipDirective } from '@gitlab/ui';
+import { GlLabel, GlTooltipDirective } from '@gitlab/ui';
import issueCardInner from 'ee_else_ce/boards/mixins/issue_card_inner';
import { sprintf, __ } from '~/locale';
import Icon from '~/vue_shared/components/icon.vue';
@@ -10,18 +10,17 @@ import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_
import IssueDueDate from './issue_due_date.vue';
import IssueTimeEstimate from './issue_time_estimate.vue';
import boardsStore from '../stores/boards_store';
-import IssueCardInnerScopedLabel from './issue_card_inner_scoped_label.vue';
import { isScopedLabel } from '~/lib/utils/common_utils';
export default {
components: {
+ GlLabel,
Icon,
UserAvatarLink,
TooltipOnTruncate,
IssueDueDate,
IssueTimeEstimate,
IssueCardWeight: () => import('ee_component/boards/components/issue_card_weight.vue'),
- IssueCardInnerScopedLabel,
},
directives: {
GlTooltip: GlTooltipDirective,
@@ -145,12 +144,6 @@ export default {
boardsStore.toggleFilter(filter);
},
- labelStyle(label) {
- return {
- backgroundColor: label.color,
- color: label.textColor,
- };
- },
showScopedLabel(label) {
return boardsStore.scopedLabels.enabled && isScopedLabel(label);
},
@@ -184,27 +177,16 @@ export default {
</div>
<div v-if="showLabelFooter" class="board-card-labels prepend-top-4 d-flex flex-wrap">
<template v-for="label in orderedLabels">
- <issue-card-inner-scoped-label
- v-if="showScopedLabel(label)"
+ <gl-label
:key="label.id"
- :label="label"
- :label-style="labelStyle(label)"
+ :background-color="label.color"
+ :title="label.title"
+ :description="label.description"
+ size="sm"
+ :scoped="showScopedLabel(label)"
:scoped-labels-documentation-link="helpLink"
- @scoped-label-click="filterByLabel($event)"
- />
-
- <button
- v-else
- :key="label.id"
- v-gl-tooltip
- :style="labelStyle(label)"
- :title="label.description"
- class="badge color-label append-right-4 prepend-top-4"
- type="button"
@click="filterByLabel(label)"
- >
- {{ label.title }}
- </button>
+ />
</template>
</div>
<div class="board-card-footer d-flex justify-content-between align-items-end">
diff --git a/app/assets/javascripts/boards/components/issue_card_inner_scoped_label.vue b/app/assets/javascripts/boards/components/issue_card_inner_scoped_label.vue
deleted file mode 100644
index fa4c68964cb..00000000000
--- a/app/assets/javascripts/boards/components/issue_card_inner_scoped_label.vue
+++ /dev/null
@@ -1,45 +0,0 @@
-<script>
-import { GlLink, GlTooltip } from '@gitlab/ui';
-
-export default {
- components: {
- GlTooltip,
- GlLink,
- },
- props: {
- label: {
- type: Object,
- required: true,
- },
- labelStyle: {
- type: Object,
- required: true,
- },
- scopedLabelsDocumentationLink: {
- type: String,
- required: true,
- },
- },
-};
-</script>
-
-<template>
- <span
- class="d-inline-block position-relative scoped-label-wrapper append-right-4 prepend-top-4 board-label"
- >
- <a @click="$emit('scoped-label-click', label)">
- <span :ref="'labelTitleRef'" :style="labelStyle" class="badge label color-label">
- {{ label.title }}
- </span>
- <gl-tooltip :target="() => $refs.labelTitleRef" placement="top" boundary="viewport">
- <span class="font-weight-bold scoped-label-tooltip-title">{{ __('Scoped label') }}</span
- ><br />
- {{ label.description }}
- </gl-tooltip>
- </a>
-
- <gl-link :href="scopedLabelsDocumentationLink" target="_blank" class="label scoped-label"
- ><i class="fa fa-question-circle" :style="labelStyle"></i
- ></gl-link>
- </span>
-</template>