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

59 lines
1.2 KiB
Vue
Raw Normal View History

2018-11-20 20:47:30 +05:30
<script>
2020-04-22 19:07:51 +05:30
/* eslint-disable @gitlab/vue-require-i18n-strings */
2019-02-15 15:39:39 +05:30
import { GlLink } from '@gitlab/ui';
2018-12-13 13:39:08 +05:30
import ClipboardButton from '~/vue_shared/components/clipboard_button.vue';
2018-11-20 20:47:30 +05:30
2018-12-13 13:39:08 +05:30
export default {
components: {
ClipboardButton,
GlLink,
},
props: {
commit: {
type: Object,
required: true,
2018-11-20 20:47:30 +05:30
},
2018-12-13 13:39:08 +05:30
mergeRequest: {
type: Object,
required: false,
default: null,
2018-11-20 20:47:30 +05:30
},
2018-12-13 13:39:08 +05:30
isLastBlock: {
type: Boolean,
required: true,
},
},
};
2018-11-20 20:47:30 +05:30
</script>
<template>
2018-12-05 23:21:45 +05:30
<div
:class="{
'block-last': isLastBlock,
2019-02-15 15:39:39 +05:30
block: !isLastBlock,
}"
>
2020-07-28 23:09:34 +05:30
<p class="gl-mb-2">
2019-02-15 15:39:39 +05:30
<span class="font-weight-bold">{{ __('Commit') }}</span>
2018-11-20 20:47:30 +05:30
2019-02-15 15:39:39 +05:30
<gl-link :href="commit.commit_path" class="js-commit-sha commit-sha link-commit">
{{ commit.short_id }}
</gl-link>
2018-11-20 20:47:30 +05:30
<clipboard-button
2019-07-07 11:18:12 +05:30
:text="commit.id"
2019-12-21 20:55:43 +05:30
:title="__('Copy commit SHA')"
2018-12-05 23:21:45 +05:30
css-class="btn btn-clipboard btn-transparent"
2018-11-20 20:47:30 +05:30
/>
2019-02-15 15:39:39 +05:30
<span v-if="mergeRequest">
2019-03-02 22:35:43 +05:30
in
2019-02-15 15:39:39 +05:30
<gl-link :href="mergeRequest.path" class="js-link-commit link-commit"
>!{{ mergeRequest.iid }}</gl-link
>
</span>
2018-11-20 20:47:30 +05:30
</p>
2020-06-23 00:09:42 +05:30
<p class="gl-mb-0">{{ commit.title }}</p>
2018-11-20 20:47:30 +05:30
</div>
</template>