minor fixes & stacktrace folding in terminal

This commit is contained in:
bordun 2020-03-13 16:28:43 +01:00
parent f58db44858
commit c4559315f7
11 changed files with 56 additions and 17 deletions

View file

@ -16,9 +16,18 @@ class Terminal {
})
ipcRenderer.on('stderr', (e, msg)=>{
if (msg.includes('\n at') && msg.split('\n at').length > 2) {
msg = msg.replace('\n at', '<div class="trace"><div class="trace-button"></div> at') + '</div>'
}
this.log(ansiHTML(msg), 'error')
})
this.content.addEventListener('click', (e)=>{
if (e.target.classList.contains('trace-button')) {
e.target.parentNode.classList.toggle('show')
}
})
}
log(message, iclass = '') {