mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Properly hide TTS in extensions menu
This commit is contained in:
@ -71,7 +71,6 @@ async function moduleWorker() {
|
|||||||
processAudioJobQueue()
|
processAudioJobQueue()
|
||||||
updateUiAudioPlayState()
|
updateUiAudioPlayState()
|
||||||
|
|
||||||
|
|
||||||
// Auto generation is disabled
|
// Auto generation is disabled
|
||||||
if (extension_settings.tts.auto_generation == false) {
|
if (extension_settings.tts.auto_generation == false) {
|
||||||
return
|
return
|
||||||
@ -229,7 +228,7 @@ async function onTtsVoicesClick() {
|
|||||||
|
|
||||||
function updateUiAudioPlayState() {
|
function updateUiAudioPlayState() {
|
||||||
if (extension_settings.tts.enabled == true) {
|
if (extension_settings.tts.enabled == true) {
|
||||||
audioControl.style.display = 'flex'
|
$('#ttsExtensionMenuItem').show();
|
||||||
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()) {
|
||||||
@ -237,9 +236,9 @@ function updateUiAudioPlayState() {
|
|||||||
} else {
|
} else {
|
||||||
img = 'fa-solid fa-circle-play extensionsMenuExtensionButton'
|
img = 'fa-solid fa-circle-play extensionsMenuExtensionButton'
|
||||||
}
|
}
|
||||||
audioControl.className = img
|
$('#tts_media_control').attr('class', img);
|
||||||
} else {
|
} else {
|
||||||
audioControl.style.display = 'none'
|
$('#ttsExtensionMenuItem').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -543,6 +543,11 @@ code {
|
|||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#extensionsMenu>div:hover {
|
||||||
|
filter: brightness(1.2);
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.options-content a div:first-child {
|
.options-content a div:first-child {
|
||||||
min-width: 20px;
|
min-width: 20px;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user