Issue #75 - Reshuffled some links for the DiffViewer (#93)

This commit is contained in:
Dottori 2018-01-31 07:59:14 -05:00 коммит произвёл Armen Zambrano
Родитель 06927afa3a
Коммит df5a39a4f3
2 изменённых файлов: 28 добавлений и 14 удалений

Просмотреть файл

@ -86,33 +86,42 @@ const DiffViewer = ({ appError, coverage, node, parsedDiff, summary }) => (
coverage.diffs[diffBlock.from] : undefined}
/>
))}
{(parsedDiff.length > 0) &&
<DiffFooter
{...coverage.parentMeta(coverage)}
{...coverage.diffMeta(node)}
coverage={coverage}
/>}
</div>
);
const CoverageMeta = ({ ccovBackend, codecov, coverage, gh, hgRev, pushlog, summary }) => (
const CoverageMeta = ({ coverage, hgRev, pushlog, summary }) => (
<div className="coverage-meta">
<div className="coverage-meta-row">
<span className="meta parent-meta-subtitle">Parent meta</span>
<span className="meta">
{`Current coverage: ${coverage.overall_cur.substring(0, 4)}%`}
</span>
<span className="meta meta-right">
<a href={pushlog} target="_blank">Push log</a>&nbsp;
<a href={gh} target="_blank">GitHub</a>&nbsp;
<a href={codecov} target="_blank">Codecov</a>
<a href={pushlog} target="_blank">Push Log</a>
</span>
</div>
<div className="coverage-meta-row">
<span className="meta parent-meta-subtitle">Changeset meta</span>
<span className="meta">{summary}</span>
<span className="meta meta-right">
<a href={hgRev} target="_blank">Hg diff</a>&nbsp;
<a href={ccovBackend} target="_blank">Coverage backend</a>
<a href={hgRev} target="_blank">Hg Diff</a>
</span>
</div>
</div>
);
const DiffFooter = ({ gh, codecov, ccovBackend }) => (
<div className="meta-footer">
<a href={gh} target="_blank">GitHub</a>
<a href={codecov} target="_blank">Codecov</a>
<a href={ccovBackend} target="_blank">Coverage Backend</a>
</div>
);
/* A DiffLine contains all diff changes for a specific file */
const DiffFile = ({ fileCoverageDiffs, diffBlock }) => (
<div className="diff-file">

Просмотреть файл

@ -41,17 +41,22 @@ pre { margin: 0; }
display: flex;
flex-direction: column;
margin: 0em 0em 1em;
min-width: 530px;
max-width: 600px;
}
.meta-footer {
display: flex;
justify-content: space-around;
width: 20%;
min-width: 320px;
margin: auto;
}
.meta-footer a{
color: gray;
font-size:0.75em;
}
.coverage-meta-row {
display: flex;
justify-content: space-between;
}
.parent-meta-subtitle {
font-weight: 400;
text-align: left;
}
.meta {
flex-direction: row;
}