:zap: [Enhance] Screenshot for whole chat, and add padding
Browse files
apps/llm_mixer/index.html
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
<body>
|
29 |
<div id="main-container">
|
30 |
<div id="chat-session-container">
|
31 |
-
<div id="messagers-container" class="container m-3"></div>
|
32 |
</div>
|
33 |
<div id="user-interactions" class="container fixed-bottom mb-3">
|
34 |
<div class="row mt-2 no-gutters">
|
|
|
28 |
<body>
|
29 |
<div id="main-container">
|
30 |
<div id="chat-session-container">
|
31 |
+
<div id="messagers-container" class="container m-3 py-2"></div>
|
32 |
</div>
|
33 |
<div id="user-interactions" class="container fixed-bottom mb-3">
|
34 |
<div class="row mt-2 no-gutters">
|
apps/llm_mixer/js/buttons_binder.js
CHANGED
@@ -201,7 +201,12 @@ class ScreenshotButtonBinder {
|
|
201 |
const button = $("#screenshot-button");
|
202 |
button.attr("title", "Take screenshot for whole chat");
|
203 |
button.click(() => {
|
204 |
-
|
|
|
|
|
|
|
|
|
|
|
205 |
var link = document.createElement("a");
|
206 |
let date = new Date();
|
207 |
let date_string = date.toISOString().split("T")[0];
|
|
|
201 |
const button = $("#screenshot-button");
|
202 |
button.attr("title", "Take screenshot for whole chat");
|
203 |
button.click(() => {
|
204 |
+
let screenshot_padding = 10;
|
205 |
+
html2canvas($("#messagers-container")[0], {
|
206 |
+
x: -screenshot_padding,
|
207 |
+
width:
|
208 |
+
$("#messagers-container").width() + 2 * screenshot_padding,
|
209 |
+
}).then((canvas) => {
|
210 |
var link = document.createElement("a");
|
211 |
let date = new Date();
|
212 |
let date_string = date.toISOString().split("T")[0];
|
apps/llm_mixer/js/default.css
CHANGED
@@ -16,6 +16,7 @@
|
|
16 |
|
17 |
#chat-session-container {
|
18 |
overflow-y: auto;
|
|
|
19 |
}
|
20 |
|
21 |
#user-input {
|
|
|
16 |
|
17 |
#chat-session-container {
|
18 |
overflow-y: auto;
|
19 |
+
overflow-x: hidden;
|
20 |
}
|
21 |
|
22 |
#user-input {
|