Merge pull request #150 from chenilim/main

Add padding and margins to replay display elements
This commit is contained in:
Chen Qian 2023-10-09 13:53:20 +08:00 committed by GitHub
commit 0dbeb5c8b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -34,8 +34,8 @@
</div>
</div>
<div id="show" style="display: grid;">
<div id="humanRequest" style="position: relative; overflow: auto;">
<div id="humanRequest" style="position: relative; overflow: auto; padding: 0 10px">
<p id="Requesttext" style=" color:aliceblue; display: block;font-weight: 900; max-height: 18px; max-width: 800px;">Task: </p>
</div>
<div id="dialogBody" style="top:20px;display: flex;flex-direction: column;">

View File

@ -207,7 +207,7 @@ function watchfileInput(files) {
}
}
//extract information
//extract information
function extraction(contents) {
const regex = /\[(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} \w+)\] ([.\s\S\n\r\d\D\t]*?)(?=\n\[\d|$)/g;
@ -381,7 +381,7 @@ function extraction(contents) {
return dialog;
}
//show dailog
//show dailog
function createPara(d, i) {
const singleDialog = document.createElement("div");
singleDialog.style.position = "relative";
@ -399,6 +399,8 @@ function createPara(d, i) {
character.style.backgroundColor = "lightblue";
character.style.width = "fit-content";
character.style.padding = "5px 20px";
character.style.marginBottom = "5px";
character.style.fontSize = "13px ";
character.style.border = "1px solid rgba(11, 20, 150, .3)";
character.style.borderRadius = "10px";
@ -441,6 +443,7 @@ function createPara(d, i) {
characterimg.style.height = "40px";
characterimg.style.width = "30px";
characterimg.style.position = "relative";
characterimg.style.marginLeft = "10px";
character.appendChild(characterimg);
character.style.width = "fit-content";