mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fixed waifu mode expressions resizing
This commit is contained in:
@ -211,10 +211,12 @@ async function getExpressionsList() {
|
|||||||
console.log('getting expressions list');
|
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')) {
|
||||||
|
console.log('classify not available, loading default');
|
||||||
return DEFAULT_EXPRESSIONS;
|
return DEFAULT_EXPRESSIONS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Array.isArray(expressionsList)) {
|
if (Array.isArray(expressionsList)) {
|
||||||
|
console.log('got array, loading array');
|
||||||
return expressionsList;
|
return expressionsList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -222,12 +224,14 @@ async function getExpressionsList() {
|
|||||||
url.pathname = '/api/classify/labels';
|
url.pathname = '/api/classify/labels';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
console.log('trying for API');
|
||||||
const apiResult = await fetch(url, {
|
const apiResult = await fetch(url, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: { 'Bypass-Tunnel-Reminder': 'bypass' },
|
headers: { 'Bypass-Tunnel-Reminder': 'bypass' },
|
||||||
});
|
});
|
||||||
|
|
||||||
if (apiResult.ok) {
|
if (apiResult.ok) {
|
||||||
|
console.log('API ok, adding labels');
|
||||||
const data = await apiResult.json();
|
const data = await apiResult.json();
|
||||||
expressionsList = data.labels;
|
expressionsList = data.labels;
|
||||||
return expressionsList;
|
return expressionsList;
|
||||||
|
@ -5,41 +5,22 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.expression-holder {
|
.expression-holder {
|
||||||
/* max-height: 90vh;
|
|
||||||
max-width: calc((100vw - 800px)/2);
|
|
||||||
width: 100%;
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
bottom: 0;
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
text-align: center;
|
|
||||||
filter: drop-shadow(2px 2px 2px #51515199);
|
|
||||||
transition: 500ms;
|
|
||||||
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);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
||||||
bottom: 1px;
|
bottom: 1px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
|
||||||
filter: drop-shadow(2px 2px 2px #51515199);
|
filter: drop-shadow(2px 2px 2px #51515199);
|
||||||
|
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
resize: both;
|
resize: both;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
/* border: 1px solid red; */
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
img.expression {
|
img.expression {
|
||||||
/* max-width: 90vw;
|
|
||||||
max-height: 90vh; */
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
|
@ -3318,50 +3318,20 @@ body.waifuMode #chat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body.waifuMode .expression-holder {
|
body.waifuMode .expression-holder {
|
||||||
/* max-height: 90vh;
|
|
||||||
max-width: unset;
|
|
||||||
width: 100%;
|
|
||||||
position: fixed;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
text-align: center;
|
|
||||||
filter: drop-shadow(2px 2px 2px #51515199);
|
|
||||||
transition: 500ms;
|
|
||||||
z-index: 1; */
|
|
||||||
|
|
||||||
max-height: 90vh;
|
max-height: 90vh;
|
||||||
max-width: 90vw;
|
max-width: 90vw;
|
||||||
/* width: 100vw; */
|
|
||||||
/* width: min-content; */
|
|
||||||
height: 90vh;
|
height: 90vh;
|
||||||
width: 90vw;
|
width: 90vw;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 5vw;
|
left: 5vw;
|
||||||
/* right: calc(100vw / 2); */
|
|
||||||
/* display: flex !important; */
|
|
||||||
/* justify-self: center; */
|
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
/* padding-left: 10px; */
|
|
||||||
/* padding-right: 10px; */
|
|
||||||
/* text-align: center; */
|
|
||||||
filter: drop-shadow(2px 2px 2px #51515199);
|
filter: drop-shadow(2px 2px 2px #51515199);
|
||||||
/* transition: 500ms; */
|
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
resize: both;
|
resize: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.waifuMode img.expression {
|
body.waifuMode img.expression {
|
||||||
/* height: 90vh;
|
/* height: 90vh; */
|
||||||
max-width: 100%;
|
|
||||||
max-height: 90vh;
|
|
||||||
vertical-align: bottom; */
|
|
||||||
|
|
||||||
height: 90vh;
|
|
||||||
/* width: 100px; */
|
|
||||||
/* vertical-align: bottom; */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ---------- @media queries must always go at the bottom ------------*/
|
/* ---------- @media queries must always go at the bottom ------------*/
|
||||||
|
Reference in New Issue
Block a user