debian-mirror-gitlab/app/assets/javascripts/ide/components/branches/item.vue

47 lines
1.1 KiB
Vue
Raw Normal View History

2018-11-18 11:00:15 +05:30
<script>
2020-04-22 19:07:51 +05:30
/* eslint-disable @gitlab/vue-require-i18n-strings */
2018-11-18 11:00:15 +05:30
import Icon from '~/vue_shared/components/icon.vue';
import Timeago from '~/vue_shared/components/time_ago_tooltip.vue';
export default {
components: {
Icon,
Timeago,
},
props: {
item: {
type: Object,
required: true,
},
projectId: {
type: String,
required: true,
},
isActive: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
branchHref() {
2020-06-23 00:09:42 +05:30
return this.$router.resolve(`/project/${this.projectId}/edit/${this.item.name}`).href;
2018-11-18 11:00:15 +05:30
},
},
};
</script>
<template>
2019-02-15 15:39:39 +05:30
<a :href="branchHref" class="btn-link d-flex align-items-center">
2018-11-18 11:00:15 +05:30
<span class="d-flex append-right-default ide-search-list-current-icon">
2019-02-15 15:39:39 +05:30
<icon v-if="isActive" :size="18" name="mobile-issue-close" />
2018-11-18 11:00:15 +05:30
</span>
<span>
2019-02-15 15:39:39 +05:30
<strong> {{ item.name }} </strong>
<span class="ide-merge-request-project-path d-block mt-1">
Updated <timeago :time="item.committedDate || ''" />
2018-11-18 11:00:15 +05:30
</span>
</span>
</a>
</template>