mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-06-13 02:49:37 +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)
44 lines
1 KiB
Vue
44 lines
1 KiB
Vue
<template>
|
|
<div v-if="build" class="flex items-center justify-center">
|
|
<Icon
|
|
:name="`status-${build.status}`"
|
|
:class="{
|
|
'text-yellow-400': build.status === 'pending',
|
|
'text-red-400': buildStatusColors[build.status] === 'red',
|
|
'text-gray-400': buildStatusColors[build.status] === 'gray',
|
|
'text-lime-400': buildStatusColors[build.status] === 'green',
|
|
'text-blue-400': buildStatusColors[build.status] === 'blue',
|
|
[buildStatusAnimations[build.status]]: true,
|
|
}"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { defineComponent, PropType } from 'vue';
|
|
|
|
import Icon from '~/components/atomic/Icon.vue';
|
|
import { Build } from '~/lib/api/types';
|
|
|
|
import { buildStatusAnimations, buildStatusColors } from './build-status';
|
|
|
|
export default defineComponent({
|
|
name: 'BuildStatusIcon',
|
|
|
|
components: {
|
|
Icon,
|
|
},
|
|
|
|
props: {
|
|
build: {
|
|
type: Object as PropType<Build>,
|
|
required: true,
|
|
},
|
|
},
|
|
|
|
setup() {
|
|
return { buildStatusColors, buildStatusAnimations };
|
|
},
|
|
});
|
|
</script>
|