mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
collapsed mesButtons
This commit is contained in:
@@ -2649,12 +2649,15 @@
|
|||||||
<span class="name_text">${characterName}</span>
|
<span class="name_text">${characterName}</span>
|
||||||
|
|
||||||
<div class="mes_buttons">
|
<div class="mes_buttons">
|
||||||
<div title="Translate message" class="mes_translate fa-solid fa-language"></div>
|
<div class="extraMesButtonsHint fa-solid fa-ellipsis"></div>
|
||||||
<div title="Open bookmark chat" class="mes_bookmark fa-solid fa-bookmark"></div>
|
<div class="extraMesButtons">
|
||||||
<div title="Generate Image" class="sd_message_gen fa-solid fa-paintbrush"></div>
|
<div title="Translate message" class="mes_translate fa-solid fa-language"></div>
|
||||||
<div title="Narrate" class="mes_narrate fa-solid fa-bullhorn"></div>
|
<div title="Open bookmark chat" class="mes_bookmark fa-solid fa-bookmark"></div>
|
||||||
<div title="Prompt" class="mes_prompt fa-solid fa-square-poll-horizontal "></div>
|
<div title="Generate Image" class="sd_message_gen fa-solid fa-paintbrush"></div>
|
||||||
<div title="Copy" class="mes_copy fa-solid fa-copy "></div>
|
<div title="Narrate" class="mes_narrate fa-solid fa-bullhorn"></div>
|
||||||
|
<div title="Prompt" class="mes_prompt fa-solid fa-square-poll-horizontal "></div>
|
||||||
|
<div title="Copy" class="mes_copy fa-solid fa-copy "></div>
|
||||||
|
</div>
|
||||||
<div title="Edit" class="mes_edit fa-solid fa-pencil "></div>
|
<div title="Edit" class="mes_edit fa-solid fa-pencil "></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mes_edit_buttons">
|
<div class="mes_edit_buttons">
|
||||||
@@ -2837,4 +2840,4 @@
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@@ -6360,6 +6360,25 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
$(document).on("click", ".extraMesButtonsHint", function (e) {
|
||||||
|
const elmnt = e.target;
|
||||||
|
$(elmnt).transition({
|
||||||
|
opacity: 0,
|
||||||
|
duration: 150,
|
||||||
|
easing: 'ease-in-out',
|
||||||
|
});
|
||||||
|
setTimeout(function () {
|
||||||
|
$(elmnt).hide();
|
||||||
|
$(elmnt).siblings(".extraMesButtons").css('opcacity', '0');
|
||||||
|
$(elmnt).siblings(".extraMesButtons").css('display', 'flex');
|
||||||
|
$(elmnt).siblings(".extraMesButtons").transition({
|
||||||
|
opacity: 1,
|
||||||
|
duration: 150,
|
||||||
|
easing: 'ease-in-out',
|
||||||
|
});
|
||||||
|
}, 150);
|
||||||
|
})
|
||||||
|
|
||||||
$(document).on("click", ".mes_edit_cancel", function () {
|
$(document).on("click", ".mes_edit_cancel", function () {
|
||||||
let text = chat[this_edit_mes_id]["mes"];
|
let text = chat[this_edit_mes_id]["mes"];
|
||||||
|
|
||||||
|
@@ -2284,14 +2284,21 @@ input[type="range"]::-webkit-slider-thumb {
|
|||||||
backdrop-filter: blur(var(--SmartThemeBlurStrength));
|
backdrop-filter: blur(var(--SmartThemeBlurStrength));
|
||||||
}
|
}
|
||||||
|
|
||||||
.mes_buttons {
|
|
||||||
height: 20px;
|
.mes_buttons,
|
||||||
grid-row-start: 1;
|
.extraMesButtons {
|
||||||
|
/* height: 20px; */
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
|
transition: all 200ms;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.extraMesButtons {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.last_mes .mes_buttons {
|
.last_mes .mes_buttons {
|
||||||
@@ -2302,14 +2309,18 @@ input[type="range"]::-webkit-slider-thumb {
|
|||||||
margin-right: 30px;
|
margin-right: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mes_buttons>div {
|
.mes_buttons .mes_edit,
|
||||||
|
.extraMesButtonsHint,
|
||||||
|
.extraMesButtons div {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: 0.3s ease-in-out;
|
transition: 0.3s ease-in-out;
|
||||||
filter: drop-shadow(0px 0px 2px black);
|
filter: drop-shadow(0px 0px 2px black);
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mes_buttons>div:hover {
|
.mes_buttons .mes_edit:hover,
|
||||||
|
.extraMesButtonsHint:hover,
|
||||||
|
.extraMesButtons div:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user