feat(commit-logs): 改善列表样式。

This commit is contained in:
Ivan Li 2021-04-05 10:23:27 +08:00
parent 283a5a82a5
commit 2ff7169e73
3 changed files with 10 additions and 1 deletions

View File

@ -21,3 +21,11 @@
@apply justify-self-end self-center; @apply justify-self-end self-center;
} }
} }
.taskList {
@apply text-sm bg-gray-100;
li {
@apply px-2 py-1 cursor-pointer;
@apply hover:bg-gray-200;
}
}

View File

@ -4,6 +4,7 @@ declare namespace CommitLogListScssNamespace {
component: string; component: string;
item: string; item: string;
list: string; list: string;
taskList: string;
} }
} }

View File

@ -55,7 +55,7 @@ export const CommitLogList = ({ pipelineId }: Props) => {
<CommitActions pipeline={pipeline} commit={log.hash} /> <CommitActions pipeline={pipeline} commit={log.hash} />
) : null} ) : null}
</header> </header>
<ol> <ol className={styles.taskList}>
{log.tasks.map(task => ( {log.tasks.map(task => (
<li key={task.id} onClick={() => setLocation(`/tasks/${task.id}`)}> <li key={task.id} onClick={() => setLocation(`/tasks/${task.id}`)}>
<PipelineTaskStatus status={task.status} /> {task.startedAt} <PipelineTaskStatus status={task.status} /> {task.startedAt}