mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
- min-sizes for input bar and expressions
- console log spam trying to debug expression image loading
This commit is contained in:
@@ -208,6 +208,7 @@ function getListItem(item, imageSrc, textClass) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getExpressionsList() {
|
async function getExpressionsList() {
|
||||||
|
console.log('getting expressions list');
|
||||||
// get something for offline mode (6 default images)
|
// get something for offline mode (6 default images)
|
||||||
if (!modules.includes('classify')) {
|
if (!modules.includes('classify')) {
|
||||||
return DEFAULT_EXPRESSIONS;
|
return DEFAULT_EXPRESSIONS;
|
||||||
@@ -233,17 +234,19 @@ async function getExpressionsList() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
console.log('got error!');
|
||||||
console.log(error);
|
console.log(error);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setExpression(character, expression, force) {
|
async function setExpression(character, expression, force) {
|
||||||
|
console.log('entered setExpressions');
|
||||||
const filename = `${expression}.png`;
|
const filename = `${expression}.png`;
|
||||||
const img = $('img.expression');
|
const img = $('img.expression');
|
||||||
|
console.log('checking for expression images to show..');
|
||||||
if (force || (existingExpressions.includes(expression))) {
|
if (force || (existingExpressions.includes(expression))) {
|
||||||
//console.log('setting expression from character images folder');
|
console.log('setting expression from character images folder');
|
||||||
const imgUrl = `/characters/${character}/${filename}`;
|
const imgUrl = `/characters/${character}/${filename}`;
|
||||||
img.attr('src', imgUrl);
|
img.attr('src', imgUrl);
|
||||||
img.removeClass('default');
|
img.removeClass('default');
|
||||||
@@ -256,12 +259,13 @@ async function setExpression(character, expression, force) {
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (extension_settings.expressions.showDefault) {
|
if (extension_settings.expressions.showDefault) {
|
||||||
//console.log('no character images, trying default expressions');
|
console.log('no character images, trying default expressions');
|
||||||
setDefault();
|
setDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDefault() {
|
function setDefault() {
|
||||||
|
console.log('setting default');
|
||||||
const defImgUrl = `/img/default-expressions/${filename}`;
|
const defImgUrl = `/img/default-expressions/${filename}`;
|
||||||
//console.log(defImgUrl);
|
//console.log(defImgUrl);
|
||||||
img.attr('src', defImgUrl);
|
img.attr('src', defImgUrl);
|
||||||
@@ -285,6 +289,7 @@ function onClickExpressionImage() {
|
|||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
function addExpressionImage() {
|
function addExpressionImage() {
|
||||||
|
console.log('entered addExpressionImage');
|
||||||
const html = `
|
const html = `
|
||||||
<div id="expression-holder" class="expression-holder">
|
<div id="expression-holder" class="expression-holder">
|
||||||
<div id="expression-holderheader" class="fa-solid fa-grip drag-grabber"></div>
|
<div id="expression-holderheader" class="fa-solid fa-grip drag-grabber"></div>
|
||||||
@@ -293,6 +298,7 @@ function onClickExpressionImage() {
|
|||||||
$('body').append(html);
|
$('body').append(html);
|
||||||
}
|
}
|
||||||
function addSettings() {
|
function addSettings() {
|
||||||
|
console.log('entered addSettings');
|
||||||
const html = `
|
const html = `
|
||||||
<div class="expression_settings">
|
<div class="expression_settings">
|
||||||
<div class="inline-drawer">
|
<div class="inline-drawer">
|
||||||
|
@@ -18,8 +18,8 @@
|
|||||||
transition: 500ms;
|
transition: 500ms;
|
||||||
z-index: 3; */
|
z-index: 3; */
|
||||||
|
|
||||||
/* min-width: 100px;
|
min-width: 100px;
|
||||||
min-height: 100px; */
|
min-height: 100px;
|
||||||
max-height: 90vh;
|
max-height: 90vh;
|
||||||
max-width: 90vh;
|
max-width: 90vh;
|
||||||
width: calc((100vw - var(--sheldWidth)) /2);
|
width: calc((100vw - var(--sheldWidth)) /2);
|
||||||
|
@@ -630,8 +630,8 @@ select {
|
|||||||
|
|
||||||
#send_textarea {
|
#send_textarea {
|
||||||
/* font-size: 1rem;
|
/* font-size: 1rem;
|
||||||
line-height: 1.5rem;
|
line-height: 1.5rem;*/
|
||||||
min-height: calc(1.5em + 0.75rem + 2px); */
|
min-height: 40px;
|
||||||
max-height: 50svh;
|
max-height: 50svh;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
Reference in New Issue
Block a user