fixed waifu mode expressions resizing

This commit is contained in:
RossAscends
2023-04-18 20:50:50 +09:00
parent 5263383e80
commit 77f1d59b12
3 changed files with 5 additions and 50 deletions

View File

@ -211,10 +211,12 @@ async function getExpressionsList() {
console.log('getting expressions list');
// get something for offline mode (6 default images)
if (!modules.includes('classify')) {
console.log('classify not available, loading default');
return DEFAULT_EXPRESSIONS;
}
if (Array.isArray(expressionsList)) {
console.log('got array, loading array');
return expressionsList;
}
@ -222,12 +224,14 @@ async function getExpressionsList() {
url.pathname = '/api/classify/labels';
try {
console.log('trying for API');
const apiResult = await fetch(url, {
method: 'GET',
headers: { 'Bypass-Tunnel-Reminder': 'bypass' },
});
if (apiResult.ok) {
console.log('API ok, adding labels');
const data = await apiResult.json();
expressionsList = data.labels;
return expressionsList;

View File

@ -5,41 +5,22 @@
}
.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-height: 100px;
max-height: 90vh;
max-width: 90vh;
width: calc((100vw - var(--sheldWidth)) /2);
position: absolute;
bottom: 1px;
padding: 0;
filter: drop-shadow(2px 2px 2px #51515199);
z-index: 3;
resize: both;
overflow: hidden;
/* border: 1px solid red; */
}
img.expression {
/* max-width: 90vw;
max-height: 90vh; */
width: 100%;
height: 100%;
vertical-align: bottom;

View File

@ -3318,50 +3318,20 @@ body.waifuMode #chat {
}
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-width: 90vw;
/* width: 100vw; */
/* width: min-content; */
height: 90vh;
width: 90vw;
position: absolute;
left: 5vw;
/* right: calc(100vw / 2); */
/* display: flex !important; */
/* justify-self: center; */
bottom: 0;
/* padding-left: 10px; */
/* padding-right: 10px; */
/* text-align: center; */
filter: drop-shadow(2px 2px 2px #51515199);
/* transition: 500ms; */
z-index: 1;
resize: both;
}
body.waifuMode img.expression {
/* height: 90vh;
max-width: 100%;
max-height: 90vh;
vertical-align: bottom; */
height: 90vh;
/* width: 100px; */
/* vertical-align: bottom; */
/* height: 90vh; */
}
/* ---------- @media queries must always go at the bottom ------------*/