mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-06-12 18:39:33 +00:00
58838f225c
Rewrite of the UI using Typescript, Vue3, Windicss and Vite. The design should be close to the current one with some changes: - latest pipeline in a sidebar on the right - secrets and registry as part of the repo-settings (secrets and registry entries shouldn't be used as much so they can be "hidden" under settings IMO) - start page shows list of active repositories with button to enable / add new ones (currently you see all repositories and in most cases you only add new repositories once in a while)
49 lines
1.3 KiB
Vue
49 lines
1.3 KiB
Vue
<template>
|
|
<div v-if="build" class="flex text-gray-600 dark:text-gray-500">
|
|
<BuildStatusIcon :build="build" class="flex items-center" />
|
|
<div class="flex flex-col ml-4">
|
|
<span class="underline">{{ build.owner }} / {{ build.name }}</span>
|
|
<span>{{ message }}</span>
|
|
<div class="flex flex-col mt-2">
|
|
<div class="flex space-x-2 items-center">
|
|
<Icon name="duration" />
|
|
<span>{{ duration }}</span>
|
|
</div>
|
|
<div class="flex space-x-2 items-center">
|
|
<Icon name="since" />
|
|
<span>{{ since }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, PropType, toRef } from 'vue';
|
|
|
|
import Icon from '~/components/atomic/Icon.vue';
|
|
import BuildStatusIcon from '~/components/repo/build/BuildStatusIcon.vue';
|
|
import useBuild from '~/compositions/useBuild';
|
|
import { BuildFeed } from '~/lib/api/types';
|
|
|
|
export default defineComponent({
|
|
name: 'BuildFeedItem',
|
|
|
|
components: { BuildStatusIcon, Icon },
|
|
|
|
props: {
|
|
build: {
|
|
type: Object as PropType<BuildFeed>,
|
|
required: true,
|
|
},
|
|
},
|
|
|
|
setup(props) {
|
|
const build = toRef(props, 'build');
|
|
const { since, duration, message } = useBuild(build);
|
|
|
|
return { since, duration, message };
|
|
},
|
|
});
|
|
</script>
|