mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-10 22:39:16 +00:00
merge
This commit is contained in:
commit
efacf539cc
@ -1,13 +1,25 @@
|
||||
.terminal {
|
||||
box-sizing: border-box;
|
||||
|
||||
&_code {
|
||||
height: 300px;
|
||||
padding: 4px;
|
||||
padding: 8px;
|
||||
box-sizing: border-box;
|
||||
overflow-y: scroll;
|
||||
border: none;
|
||||
white-space: pre-wrap;
|
||||
color: white;
|
||||
background-color: black;
|
||||
line-height: 0.8;
|
||||
font-size: 12px;
|
||||
font-family: Monaco, Monosapce, sans-serif;
|
||||
|
||||
&_newline {
|
||||
display: block;
|
||||
margin: 0.8em 0;
|
||||
white-space: pre;
|
||||
&:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -33,10 +33,17 @@ define([
|
||||
}
|
||||
this.ignoreScrollEvent = false;
|
||||
},
|
||||
prepareOutput: function(output) {
|
||||
var text = output.replace(
|
||||
/(.*)\n/gi,
|
||||
'<span class="terminal_code_newline">$1</span>'
|
||||
);
|
||||
return ansiUp.ansi_to_html(text);
|
||||
},
|
||||
updateItems: function(build) {
|
||||
// listen just our console update
|
||||
if (build.buildId === this.props.build) {
|
||||
this.setState({data: ansiUp.ansi_to_html(build.data)});
|
||||
this.setState({data: this.prepareOutput(build.data)});
|
||||
_.defer(this.ensureScrollPosition);
|
||||
this.ensureScrollPosition();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user