mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix styles for extensions menu
This commit is contained in:
@ -29,7 +29,10 @@ async function doDiceRoll() {
|
|||||||
|
|
||||||
function addDiceRollButton() {
|
function addDiceRollButton() {
|
||||||
const buttonHtml = `
|
const buttonHtml = `
|
||||||
<div id="roll_dice" class="fa-solid fa-dice list-group-item" title="Roll the dice" /></div>
|
<div id="roll_dice" class="list-group-item flex-container flexGap5">
|
||||||
|
<div class="fa-solid fa-dice extensionsMenuExtensionButton" title="Roll Dice" /></div>
|
||||||
|
Roll Dice
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
const dropdownHtml = `
|
const dropdownHtml = `
|
||||||
<div id="dice_dropdown">
|
<div id="dice_dropdown">
|
||||||
@ -55,7 +58,7 @@ function addDiceRollButton() {
|
|||||||
button.hide();
|
button.hide();
|
||||||
|
|
||||||
let popper = Popper.createPopper(button.get(0), dropdown.get(0), {
|
let popper = Popper.createPopper(button.get(0), dropdown.get(0), {
|
||||||
placement: 'left-end',
|
placement: 'bottom',
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click touchend', function (e) {
|
$(document).on('click touchend', function (e) {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#roll_dice {
|
#roll_dice {
|
||||||
order: 100;
|
/* order: 100; */
|
||||||
/* width: 40px;
|
/* width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -11,7 +11,7 @@
|
|||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
/* justify-content: center; */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -537,11 +537,14 @@ async function sendMessage(prompt, image) {
|
|||||||
function addSDGenButtons() {
|
function addSDGenButtons() {
|
||||||
|
|
||||||
const buttonHtml = `
|
const buttonHtml = `
|
||||||
<div id="sd_gen" class="fa-solid fa-paintbrush list-group-item" title="Trigger Stable Diffusion" /></div>
|
<div id="sd_gen" class="list-group-item flex-container flexGap5">
|
||||||
|
<div class="fa-solid fa-paintbrush extensionsMenuExtensionButton" title="Trigger Stable Diffusion" /></div>
|
||||||
|
StableDiffusion
|
||||||
|
</div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const waitButtonHtml = `
|
const waitButtonHtml = `
|
||||||
<div id="sd_gen_wait" class="fa-solid fa-hourglass-half list-group-item" /></div>
|
<div id="sd_gen_wait" class="fa-solid fa-hourglass-half" /></div>
|
||||||
`
|
`
|
||||||
const dropdownHtml = `
|
const dropdownHtml = `
|
||||||
<div id="sd_dropdown">
|
<div id="sd_dropdown">
|
||||||
@ -570,7 +573,7 @@ function addSDGenButtons() {
|
|||||||
messageButton.hide();
|
messageButton.hide();
|
||||||
|
|
||||||
let popper = Popper.createPopper(button.get(0), dropdown.get(0), {
|
let popper = Popper.createPopper(button.get(0), dropdown.get(0), {
|
||||||
placement: 'left-end',
|
placement: 'bottom',
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.sd_message_gen', sdMessageButton);
|
$(document).on('click', '.sd_message_gen', sdMessageButton);
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#sd_gen {
|
#sd_gen {
|
||||||
order: 100;
|
/*order: 100;
|
||||||
/* width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 1px; */
|
padding: 1px; */
|
||||||
@ -15,7 +15,7 @@
|
|||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
/* justify-content: center; */
|
||||||
}
|
}
|
||||||
|
|
||||||
#sd_gen:hover {
|
#sd_gen:hover {
|
||||||
|
@ -233,9 +233,9 @@ function updateUiAudioPlayState() {
|
|||||||
let img
|
let img
|
||||||
// Give user feedback that TTS is active by setting the stop icon if processing or playing
|
// Give user feedback that TTS is active by setting the stop icon if processing or playing
|
||||||
if (!audioElement.paused || isTtsProcessing()) {
|
if (!audioElement.paused || isTtsProcessing()) {
|
||||||
img = 'fa-solid fa-stop-circle list-group-item'
|
img = 'fa-solid fa-stop-circle extensionsMenuExtensionButton'
|
||||||
} else {
|
} else {
|
||||||
img = 'fa-solid fa-circle-play list-group-item'
|
img = 'fa-solid fa-circle-play extensionsMenuExtensionButton'
|
||||||
}
|
}
|
||||||
audioControl.className = img
|
audioControl.className = img
|
||||||
} else {
|
} else {
|
||||||
@ -256,7 +256,12 @@ function onAudioControlClicked() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function addAudioControl() {
|
function addAudioControl() {
|
||||||
$('#extensionsMenu').prepend('<div id="tts_media_control" class="list-group-item" />')
|
|
||||||
|
$('#extensionsMenu').prepend(`
|
||||||
|
<div id="ttsExtensionMenuItem" class="list-group-item flex-container flexGap5">
|
||||||
|
<div id="tts_media_control" class="extensionsMenuExtensionButton "/></div>
|
||||||
|
TTS Playback
|
||||||
|
</div>`)
|
||||||
$('#tts_media_control').attr('title', 'TTS play/pause').on('click', onAudioControlClicked)
|
$('#tts_media_control').attr('title', 'TTS play/pause').on('click', onAudioControlClicked)
|
||||||
audioControl = document.getElementById('tts_media_control')
|
audioControl = document.getElementById('tts_media_control')
|
||||||
updateUiAudioPlayState()
|
updateUiAudioPlayState()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#tts_media_control {
|
#tts_media_control {
|
||||||
order: 100;
|
/* order: 100; */
|
||||||
/* width: 40px;
|
/* width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@ -7,14 +7,24 @@
|
|||||||
outline: none;
|
outline: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: 0.3s;
|
/* transition: 0.3s;
|
||||||
opacity: 0.7;
|
opacity: 0.7; */
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
/* justify-content: center; */
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ttsExtensionMenuItem {
|
||||||
|
transition: 0.3s;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ttsExtensionMenuItem:hover {
|
||||||
|
opacity: 1;
|
||||||
|
filter: brightness(1.2);
|
||||||
|
}
|
||||||
|
|
||||||
#tts_media_control:hover {
|
#tts_media_control:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
filter: brightness(1.2);
|
filter: brightness(1.2);
|
||||||
|
@ -512,10 +512,14 @@ code {
|
|||||||
#extensionsMenu {
|
#extensionsMenu {
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
backdrop-filter: blur(var(--SmartThemeBlurStrength));
|
backdrop-filter: blur(var(--SmartThemeBlurStrength));
|
||||||
font-size: 30px;
|
|
||||||
/* padding: 10px; */
|
/* padding: 10px; */
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
}
|
||||||
|
|
||||||
|
.extensionsMenuExtensionButton {
|
||||||
|
font-size: 20px;
|
||||||
|
height: 20px;
|
||||||
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#right-nav-panel hr,
|
#right-nav-panel hr,
|
||||||
@ -526,7 +530,7 @@ code {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.options-content a,
|
.options-content a,
|
||||||
#extensionsMenu div {
|
#extensionsMenu>div {
|
||||||
color: var(--SmartThemeBodyColor);
|
color: var(--SmartThemeBodyColor);
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
Reference in New Issue
Block a user