2c517740 by Jonille Arreglo

29047_export_pdf

1 parent 8e616d2e
...@@ -13,11 +13,12 @@ export default function ExportButton({ ...@@ -13,11 +13,12 @@ export default function ExportButton({
13 for(var i = 0; i < response_to_export.children.length; i++) { 13 for(var i = 0; i < response_to_export.children.length; i++) {
14 if(!response_to_export.children[i].querySelector(".message")) continue; 14 if(!response_to_export.children[i].querySelector(".message")) continue;
15 let img_url = window.location.origin + "/assets/images/"; 15 let img_url = window.location.origin + "/assets/images/";
16 let msg = "<div style='float: left; margin-left: 10px; padding-top: 5px; margin-bottom: 5px;'>"+response_to_export.children[i].querySelector(".message").innerHTML+"</div>";
17 if(response_to_export.children[i].classList.contains("chatgpt")) { 16 if(response_to_export.children[i].classList.contains("chatgpt")) {
17 let msg = "<div style='float: left; margin-left: 10px; padding-top: 5px;'>"+response_to_export.children[i].querySelector(".message").innerHTML+"</div>";
18 let profile = "<div style='width: 36px; height: 36px; background: #4c66ef; border-radius: 5px; float: left;'><img style='width: 24px; height: 24px; margin-top: 6px; margin-left: 6px;' src='" + img_url + "bot.png'></div>"; 18 let profile = "<div style='width: 36px; height: 36px; background: #4c66ef; border-radius: 5px; float: left;'><img style='width: 24px; height: 24px; margin-top: 6px; margin-left: 6px;' src='" + img_url + "bot.png'></div>";
19 response = response + "<div style='background: #ddf1f9; padding: 5px'>"+ profile + msg +"</div>"; 19 response = response + "<div style='background: #ddf1f9; padding: 5px'>"+ profile + msg +"</div>";
20 } else { 20 } else {
21 let msg = "<div style='float: left; margin-left: 10px;'>"+response_to_export.children[i].querySelector(".message").innerHTML+"</div>";
21 let profile = "<div style='width: 36px; height: 36px; background: #6BA447; border-radius: 5px; float: left;'><img style='width: 24px; height: 24px; margin-top: 6px; margin-left: 6px;' src='" + img_url + "user.png'></div>"; 22 let profile = "<div style='width: 36px; height: 36px; background: #6BA447; border-radius: 5px; float: left;'><img style='width: 24px; height: 24px; margin-top: 6px; margin-left: 6px;' src='" + img_url + "user.png'></div>";
22 response = response + "<div style='padding: 5px'>"+ profile + msg +"</div>"; 23 response = response + "<div style='padding: 5px'>"+ profile + msg +"</div>";
23 } 24 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!