mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-02-11 11:59:16 +00:00
merge
This commit is contained in:
commit
efacf539cc
@ -1,13 +1,25 @@
|
|||||||
.terminal {
|
.terminal {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
&_code {
|
&_code {
|
||||||
height: 300px;
|
height: 300px;
|
||||||
padding: 4px;
|
padding: 8px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
border: none;
|
border: none;
|
||||||
white-space: pre-wrap;
|
|
||||||
color: white;
|
color: white;
|
||||||
background-color: black;
|
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;
|
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) {
|
updateItems: function(build) {
|
||||||
// listen just our console update
|
// listen just our console update
|
||||||
if (build.buildId === this.props.build) {
|
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);
|
_.defer(this.ensureScrollPosition);
|
||||||
this.ensureScrollPosition();
|
this.ensureScrollPosition();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user