request failing packets

This commit is contained in:
Lewis Moten
2024-05-15 02:05:48 -04:00
parent c4a0d8afd1
commit d9b5391601
11 changed files with 187 additions and 823 deletions

View File

@@ -1,3 +1,4 @@
import { htmlEncode } from '../converters';
import BasePanel from './BasePanel';
class CodePanel extends BasePanel {
@@ -6,6 +7,18 @@ class CodePanel extends BasePanel {
this.addCode('code');
}
setCode = (html) => this.setHtmlById('code', html);
appendCode = html => {
let current = this.getHtmlById('code');
if(current !== '') current += document.createElement('br').outerHTML;
this.setHtmlById('code', current + html);
this.scrollToBottom('code');
}
appendText = text => {
let current = this.getHtmlById('code');
if(current !== '') current += document.createElement('br').outerHTML;
this.setHtmlById('code', current + htmlEncode(text));
this.scrollToBottom('code');
}
}
export default CodePanel;