Past chat histories in a side bar on desktop (#5098)
Lots of room for improvement, but that's a start.
This commit is contained in:
parent
372ef5e2d8
commit
4f7e1eeafd
3 changed files with 40 additions and 10 deletions
12
js/main.js
12
js/main.js
|
@ -385,3 +385,15 @@ new ResizeObserver(updateCssProperties)
|
|||
.observe(document.querySelector("#chat-input textarea"));
|
||||
|
||||
window.addEventListener("resize", updateCssProperties);
|
||||
|
||||
//------------------------------------------------
|
||||
// Keep track of the display width to position the past
|
||||
// chats dropdown on desktop
|
||||
//------------------------------------------------
|
||||
function updateDocumentWidth() {
|
||||
var updatedWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
||||
document.documentElement.style.setProperty("--document-width", updatedWidth + "px");
|
||||
}
|
||||
|
||||
updateDocumentWidth();
|
||||
window.addEventListener("resize", updateDocumentWidth);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue