mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
pr feedback implementation
This commit is contained in:
@ -1,11 +1,6 @@
|
||||
import { getStringHash, debounce } from "../../utils.js";
|
||||
import { chat_metadata, saveSettingsDebounced } from "../../../script.js";
|
||||
import { saveSettingsDebounced } from "../../../script.js";
|
||||
import { extension_settings, getContext } from "../../extensions.js";
|
||||
export { MODULE_NAME };
|
||||
|
||||
const saveChatDebounced = debounce(async () => await getContext().saveChat(), 1000);
|
||||
|
||||
const MODULE_NAME = '3_elevenlabs_tts'; // <= Deliberate, for sorting lower than memory
|
||||
const UPDATE_INTERVAL = 1000;
|
||||
let API_KEY
|
||||
|
||||
@ -403,8 +398,8 @@ function onElevenlabsEnableClick() {
|
||||
}
|
||||
|
||||
function updateUiPlayState() {
|
||||
const img = !audioElement.paused? `url(/img/circle-pause-solid.svg)`: `url(/img/circle-play-solid.svg)`
|
||||
audioControl.style.backgroundImage = img
|
||||
const img = !audioElement.paused? "fa-solid fa-circle-pause": "fa-solid fa-circle-play"
|
||||
audioControl.className = img
|
||||
}
|
||||
|
||||
function onAudioControlClicked(){
|
||||
@ -413,10 +408,10 @@ function onAudioControlClicked(){
|
||||
}
|
||||
|
||||
function addAudioControl() {
|
||||
$('#send_but_sheld').prepend('<input id="tts_media_control" type="button" />')
|
||||
$('#send_but_sheld').prepend('<div id="tts_media_control"/>')
|
||||
$('#send_but_sheld').on('click',onAudioControlClicked)
|
||||
audioControl = document.getElementById('tts_media_control');
|
||||
audioControl.style.backgroundImage = `url(/img/circle-play-solid.svg)`;
|
||||
audioControl.className = "fa-solid fa-circle-play";
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
@ -448,6 +443,7 @@ $(document).ready(function () {
|
||||
$('#elevenlabs_apply').on('click', onElevenlabsApplyClick);
|
||||
$('#elevenlabs_enabled').on('click', onElevenlabsEnableClick);
|
||||
}
|
||||
$('#send_form').css = "grid-template-columns: 40px auto 120px;"
|
||||
addAudioControl();
|
||||
addExtensionControls();
|
||||
loadSettings();
|
||||
|
@ -4,5 +4,8 @@
|
||||
"requires": [],
|
||||
"optional": [],
|
||||
"js": "index.js",
|
||||
"css": "style.css"
|
||||
"css": "style.css",
|
||||
"author": "Ouoertheo#7264",
|
||||
"version": "1.0.0",
|
||||
"homePage": "None"
|
||||
}
|
@ -4,17 +4,18 @@
|
||||
height: 40px;
|
||||
margin: 0;
|
||||
padding: 1px;
|
||||
background: no-repeat;
|
||||
background-size: 26px auto;
|
||||
background-position: center center;
|
||||
outline: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: 0.3s;
|
||||
filter: invert(1);
|
||||
opacity: 0.5;
|
||||
opacity: 0.7;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
}
|
||||
|
||||
#tts_media_control:hover {
|
||||
opacity: 1;
|
||||
filter: brightness(1.2);
|
||||
}
|
||||
|
Reference in New Issue
Block a user