debian-mirror-gitlab/app/assets/javascripts/jobs/components/sidebar_detail_row.vue

46 lines
900 B
Vue
Raw Normal View History

2017-09-10 17:25:29 +05:30
<script>
2020-11-24 15:15:51 +05:30
import { GlIcon, GlLink } from '@gitlab/ui';
2018-12-13 13:39:08 +05:30
export default {
name: 'SidebarDetailRow',
components: {
2020-11-24 15:15:51 +05:30
GlIcon,
2018-12-13 13:39:08 +05:30
GlLink,
},
props: {
title: {
type: String,
required: false,
default: '',
},
value: {
type: String,
required: true,
},
helpUrl: {
type: String,
required: false,
default: '',
},
},
computed: {
hasTitle() {
return this.title.length > 0;
2017-09-10 17:25:29 +05:30
},
2018-12-13 13:39:08 +05:30
hasHelpURL() {
return this.helpUrl.length > 0;
2017-09-10 17:25:29 +05:30
},
2018-12-13 13:39:08 +05:30
},
};
2017-09-10 17:25:29 +05:30
</script>
<template>
<p class="build-detail-row">
2019-02-15 15:39:39 +05:30
<span v-if="hasTitle" class="font-weight-bold">{{ title }}:</span> {{ value }}
<span v-if="hasHelpURL" class="help-button float-right">
<gl-link :href="helpUrl" target="_blank" rel="noopener noreferrer nofollow">
2020-11-24 15:15:51 +05:30
<gl-icon name="question-o" />
2018-12-13 13:39:08 +05:30
</gl-link>
2018-05-09 12:01:36 +05:30
</span>
2017-09-10 17:25:29 +05:30
</p>
</template>