mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-29 21:50:16 +01:00
Lint the JS/CSS
This commit is contained in:
parent
648c2d1cc2
commit
c419206ce1
@ -1,13 +1,13 @@
|
||||
.chat {
|
||||
background: var(--block-background-fill);
|
||||
padding: 24px 19px;
|
||||
padding-right: 19px !important;
|
||||
padding-top: 0px;
|
||||
border: 1px solid var(--block-border-color);
|
||||
background: var(--block-background-fill);
|
||||
padding: 24px 19px;
|
||||
padding-right: 19px !important;
|
||||
padding-top: 0;
|
||||
border: 1px solid var(--block-border-color);
|
||||
}
|
||||
|
||||
.chat > .messages {
|
||||
padding-top: 28px !important;
|
||||
padding-top: 28px !important;
|
||||
}
|
||||
|
||||
.message {
|
||||
@ -62,7 +62,6 @@
|
||||
.gradio-container .chat .user-message {
|
||||
padding: 20px;
|
||||
background-color: var(--color-accent-soft);
|
||||
border-radius: 20px;
|
||||
margin-bottom: 12px !important;
|
||||
margin-left: 16px;
|
||||
border-radius: 22px;
|
||||
|
@ -92,7 +92,7 @@ div.svelte-15lo0d8 > *, div.svelte-15lo0d8 > .form > * {
|
||||
.header_bar {
|
||||
background-color: #f7f7f7;
|
||||
box-shadow: 0 2px 3px rgba(22 22 22 / 35%);
|
||||
margin-bottom: 0px;
|
||||
margin-bottom: 0;
|
||||
overflow-x: scroll;
|
||||
margin-left: calc(-1 * var(--size-4));
|
||||
margin-right: calc(-1 * var(--size-4));
|
||||
@ -303,7 +303,7 @@ div.svelte-362y77>*, div.svelte-362y77>.form>* {
|
||||
}
|
||||
|
||||
#chat-tab {
|
||||
padding-top: 0px;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
#chat-tab button#Generate, #chat-tab button#stop {
|
||||
|
26
js/main.js
26
js/main.js
@ -178,11 +178,11 @@ for(i = 0; i < noBackgroundelements.length; i++) {
|
||||
noBackgroundelements[i].parentNode.parentNode.parentNode.style.alignItems = "center";
|
||||
}
|
||||
|
||||
const slimDropdownElements = document.querySelectorAll('.slim-dropdown');
|
||||
const slimDropdownElements = document.querySelectorAll(".slim-dropdown");
|
||||
for (i = 0; i < slimDropdownElements.length; i++) {
|
||||
const parentNode = slimDropdownElements[i].parentNode;
|
||||
parentNode.style.background = 'transparent';
|
||||
parentNode.style.border = '0';
|
||||
const parentNode = slimDropdownElements[i].parentNode;
|
||||
parentNode.style.background = "transparent";
|
||||
parentNode.style.border = "0";
|
||||
}
|
||||
|
||||
//------------------------------------------------
|
||||
@ -313,7 +313,7 @@ function addBigPicture() {
|
||||
}
|
||||
|
||||
function deleteBigPicture() {
|
||||
var bigProfilePictures = document.querySelectorAll('.bigProfilePicture');
|
||||
var bigProfilePictures = document.querySelectorAll(".bigProfilePicture");
|
||||
bigProfilePictures.forEach(function (element) {
|
||||
element.parentNode.removeChild(element);
|
||||
});
|
||||
@ -337,16 +337,16 @@ let currentChatInputHeight = 0;
|
||||
|
||||
function updateCssProperties() {
|
||||
// Set the height of the chat area
|
||||
const chatContainer = document.getElementById('chat').parentNode.parentNode.parentNode;
|
||||
const chatInputHeight = document.querySelector('#chat-input textarea').clientHeight;
|
||||
const chatContainer = document.getElementById("chat").parentNode.parentNode.parentNode;
|
||||
const chatInputHeight = document.querySelector("#chat-input textarea").clientHeight;
|
||||
const newChatHeight = `${chatContainer.clientHeight - chatInputHeight + 40}px`;
|
||||
document.documentElement.style.setProperty('--chat-height', newChatHeight);
|
||||
document.documentElement.style.setProperty('--input-delta', `${chatInputHeight - 40}px`);
|
||||
document.documentElement.style.setProperty("--chat-height", newChatHeight);
|
||||
document.documentElement.style.setProperty("--input-delta", `${chatInputHeight - 40}px`);
|
||||
|
||||
// Set the position offset of the chat input box
|
||||
const header = document.querySelector('.header_bar');
|
||||
const header = document.querySelector(".header_bar");
|
||||
const headerHeight = `${header.clientHeight}px`;
|
||||
document.documentElement.style.setProperty('--header-height', headerHeight);
|
||||
document.documentElement.style.setProperty("--header-height", headerHeight);
|
||||
|
||||
// Offset the scroll position of the chat area
|
||||
if (chatInputHeight !== currentChatInputHeight) {
|
||||
@ -356,6 +356,6 @@ function updateCssProperties() {
|
||||
}
|
||||
|
||||
new ResizeObserver(updateCssProperties)
|
||||
.observe(document.querySelector('#chat-input textarea'));
|
||||
.observe(document.querySelector("#chat-input textarea"));
|
||||
|
||||
window.addEventListener('resize', updateCssProperties);
|
||||
window.addEventListener("resize", updateCssProperties);
|
||||
|
@ -12,9 +12,9 @@ function toggle_controls(value) {
|
||||
document.getElementById("chat-col").classList.remove("bigchat");
|
||||
document.getElementById("chat-tab").style.paddingBottom = "";
|
||||
|
||||
let gallery_element = document.getElementById('gallery-extension');
|
||||
let gallery_element = document.getElementById("gallery-extension");
|
||||
if (gallery_element) {
|
||||
gallery_element.style.display = 'block';
|
||||
gallery_element.style.display = "block";
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -1,5 +1,5 @@
|
||||
function updateBigPicture() {
|
||||
var existingElement = document.querySelector('.bigProfilePicture');
|
||||
var existingElement = document.querySelector(".bigProfilePicture");
|
||||
if (existingElement) {
|
||||
var timestamp = new Date().getTime();
|
||||
existingElement.src = "/file/cache/pfp_character.png?time=" + timestamp;
|
||||
|
Loading…
Reference in New Issue
Block a user