|
|
@@ -1,17 +1,64 @@
|
|
|
<template>
|
|
|
- <div><project-build-card v-bind:buildState="1"></project-build-card></div>
|
|
|
+ <div>
|
|
|
+ <div v-if="detailLoading"><page-section-loading show /></div>
|
|
|
+ <div v-else>
|
|
|
+ <div
|
|
|
+ v-for="item in projectDetail.buildList"
|
|
|
+ :key="item.id"
|
|
|
+ class="gap-section"
|
|
|
+ >
|
|
|
+ <div class="page-section">
|
|
|
+ <div class="level">
|
|
|
+ <div class="level-left">
|
|
|
+ <build-tag :build-state="item.buildState" />
|
|
|
+ <strong style="padding-left: 10px">
|
|
|
+ {{ item.commitMessage }} · #{{ item.branchId }}
|
|
|
+ </strong>
|
|
|
+ </div>
|
|
|
+ <div v-if="item.buildState === 1" class="level-right">
|
|
|
+ <strong>mirror : {{ item.mirrorId }}</strong>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="code-section">{{ item.buildMessage }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import ProjectBuildCard from "@/components/ProjectBuildCard/index";
|
|
|
+import PageSectionLoading from "@/components/PageBody/PageSectionLoading/index";
|
|
|
+import BuildTag from "@/views/student/Code/ProjectDetail/components/BuildTag";
|
|
|
export default {
|
|
|
name: "BuildDetail",
|
|
|
- components: { ProjectBuildCard },
|
|
|
+ components: { BuildTag, PageSectionLoading },
|
|
|
props: {
|
|
|
projectDetail: {
|
|
|
type: Object,
|
|
|
default: () => {}
|
|
|
+ },
|
|
|
+ detailLoading: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+@import "../../../../assets/scss/app";
|
|
|
+.gap-section {
|
|
|
+ padding-bottom: $default-margin-between;
|
|
|
+}
|
|
|
+
|
|
|
+.gap-section:last-child {
|
|
|
+ padding-bottom: 0;
|
|
|
+}
|
|
|
+
|
|
|
+.code-section {
|
|
|
+ margin: $default-margin-between -#{$default-margin-between} -#{$default-margin-between};
|
|
|
+ padding: $default-margin-between;
|
|
|
+ background-color: #2d3044;
|
|
|
+ color: #cacff1;
|
|
|
+}
|
|
|
+</style>
|