debian-mirror-gitlab/app/assets/javascripts/runner/components/runner_assigned_item.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.4 KiB
Vue
Raw Normal View History

2022-04-04 11:22:00 +05:30
<script>
2022-08-27 11:52:29 +05:30
import { GlAvatar, GlBadge, GlLink } from '@gitlab/ui';
2022-06-21 17:19:12 +05:30
import { AVATAR_SHAPE_OPTION_RECT } from '~/vue_shared/constants';
2022-04-04 11:22:00 +05:30
export default {
components: {
GlAvatar,
2022-08-27 11:52:29 +05:30
GlBadge,
2022-04-04 11:22:00 +05:30
GlLink,
},
props: {
href: {
type: String,
required: true,
},
name: {
type: String,
required: true,
},
fullName: {
type: String,
required: true,
},
avatarUrl: {
type: String,
required: false,
default: null,
},
2022-08-27 11:52:29 +05:30
description: {
type: String,
required: false,
default: null,
},
isOwner: {
type: Boolean,
required: false,
default: false,
},
2022-04-04 11:22:00 +05:30
},
2022-06-21 17:19:12 +05:30
AVATAR_SHAPE_OPTION_RECT,
2022-04-04 11:22:00 +05:30
};
</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">
2022-06-21 17:19:12 +05:30
<gl-avatar
:shape="$options.AVATAR_SHAPE_OPTION_RECT"
:entity-name="name"
:alt="name"
:src="avatarUrl"
:size="48"
/>
2022-04-04 11:22:00 +05:30
</gl-link>
2022-08-27 11:52:29 +05:30
<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__('Runner|Owner') }}</gl-badge>
</div>
<div v-if="description">{{ description }}</div>
</div>
2022-04-04 11:22:00 +05:30
</div>
</template>