Skip to content

Commit

Permalink
[Improve] project state style improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfboys committed Oct 9, 2024
1 parent 90c86ea commit ae5b84b
Showing 1 changed file with 24 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@
</a-card>
<BasicTable @register="registerTable">
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'name'">
{{ record.name }}
<a-badge
class="build-badge"
v-if="
record.buildState == BuildStateEnum.NEED_REBUILD ||
record.buildState == BuildStateEnum.BUILDING
"
count="NEW"
title="this project has changed, need rebuild"
/>
</template>
<template v-if="column.dataIndex === 'branches'">
<a-tag
v-if="record.refs.startsWith('refs/tags/')"
Expand All @@ -67,15 +79,7 @@
</a-tag>
</template>
<template v-if="column.dataIndex === 'type'">
<a-badge
class="build-badge"
v-if="record.buildState == BuildStateEnum.NEED_REBUILD"
count="NEW"
title="this project has changed, need rebuild"
>
<svg-icon class="avatar" :name="projectMap[record.type]" :size="20" />
</a-badge>
<svg-icon v-else class="avatar" :name="projectMap[record.type]" :size="20" />
<svg-icon class="avatar" :name="projectMap[record.type]" :size="20" />
{{ projectMap[record.type].toUpperCase() }}
</template>
<template v-if="column.dataIndex === 'buildState'">
Expand Down Expand Up @@ -360,4 +364,15 @@
.status-processing-running {
animation: running-color 800ms ease-out infinite alternate;
}
.build-badge {
float: right;
margin-right: 5px;
font-size: 12px;
transform: scale(0.7, 0.7);
.ant-badge-count {
padding: 0 5px 1px;
}
}
</style>

0 comments on commit ae5b84b

Please sign in to comment.