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

runner_assigned_item.vue « components « runner « ci « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5e61e4d73773061b40df798aa4741a4cbcf4e1ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<script>
import { GlAvatar, GlBadge, GlLink } from '@gitlab/ui';
import { AVATAR_SHAPE_OPTION_RECT } from '~/vue_shared/constants';

export default {
  components: {
    GlAvatar,
    GlBadge,
    GlLink,
  },
  props: {
    href: {
      type: String,
      required: true,
    },
    name: {
      type: String,
      required: true,
    },
    fullName: {
      type: String,
      required: true,
    },
    avatarUrl: {
      type: String,
      required: false,
      default: null,
    },
    description: {
      type: String,
      required: false,
      default: null,
    },
    isOwner: {
      type: Boolean,
      required: false,
      default: false,
    },
  },
  AVATAR_SHAPE_OPTION_RECT,
};
</script>

<template>
  <div class="gl-display-flex gl-align-items-center gl-py-5">
    <gl-link :href="href" data-testid="item-avatar" class="gl-text-decoration-none! gl-mr-3">
      <gl-avatar
        :shape="$options.AVATAR_SHAPE_OPTION_RECT"
        :entity-name="name"
        :alt="name"
        :src="avatarUrl"
        :size="48"
      />
    </gl-link>
    <div>
      <div class="gl-mb-1">
        <gl-link :href="href" class="gl-font-weight-bold gl-text-gray-900!">{{ fullName }}</gl-link>
        <gl-badge v-if="isOwner" variant="info">{{ s__('Runners|Owner') }}</gl-badge>
      </div>
      <div v-if="description">{{ description }}</div>
    </div>
  </div>
</template>