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

62 lines
1 KiB
Vue
Raw Normal View History

2017-09-10 17:25:29 +05:30
<script>
2018-12-13 13:39:08 +05:30
import { GlLink } from '@gitlab-org/gitlab-ui';
export default {
name: 'SidebarDetailRow',
components: {
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">
<span
v-if="hasTitle"
2018-03-17 18:26:18 +05:30
class="build-light-text"
>
{{ title }}:
2017-09-10 17:25:29 +05:30
</span>
2018-03-17 18:26:18 +05:30
{{ value }}
2018-05-09 12:01:36 +05:30
<span
v-if="hasHelpURL"
2018-11-08 19:23:39 +05:30
class="help-button float-right"
2018-05-09 12:01:36 +05:30
>
2018-12-13 13:39:08 +05:30
<gl-link
2018-05-09 12:01:36 +05:30
:href="helpUrl"
target="_blank"
rel="noopener noreferrer nofollow"
>
<i
class="fa fa-question-circle"
aria-hidden="true"
></i>
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>