mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Fix checkbox syncing and disrupt on reset
This commit is contained in:
@@ -251,6 +251,7 @@ function disruptStoryState() {
|
|||||||
|
|
||||||
function reset_story() {
|
function reset_story() {
|
||||||
//console.log("Resetting story");
|
//console.log("Resetting story");
|
||||||
|
disruptStoryState();
|
||||||
clearTimeout(calc_token_usage_timeout);
|
clearTimeout(calc_token_usage_timeout);
|
||||||
clearTimeout(game_text_scroll_timeout);
|
clearTimeout(game_text_scroll_timeout);
|
||||||
clearTimeout(font_size_cookie_timout);
|
clearTimeout(font_size_cookie_timout);
|
||||||
@@ -6834,6 +6835,7 @@ function imgGenRetry() {
|
|||||||
class: "story",
|
class: "story",
|
||||||
name: "commentary_enabled",
|
name: "commentary_enabled",
|
||||||
func: function(commentaryEnabled) {
|
func: function(commentaryEnabled) {
|
||||||
|
this.checked = commentaryEnabled;
|
||||||
if (commentaryEnabled) {
|
if (commentaryEnabled) {
|
||||||
settingsContainer.classList.remove("disabled");
|
settingsContainer.classList.remove("disabled");
|
||||||
} else {
|
} else {
|
||||||
@@ -6860,11 +6862,17 @@ for (const el of document.querySelectorAll("[sync-var]")) {
|
|||||||
sync_to_server(this);
|
sync_to_server(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const proxy = $el(`[sync-proxy-host="${varName}"]`);
|
const proxy = $el(`[sync-proxy-host="${varName}"]`);
|
||||||
if (proxy) {
|
if (proxy) {
|
||||||
el.addEventListener("input", function() {
|
el.addEventListener("input", function() {
|
||||||
proxy.value = this.value;
|
proxy.value = this.value;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
el.addEventListener("sync", function() {
|
||||||
|
proxy.value = this.value;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let slug = varName.replaceAll(".", "_");
|
let slug = varName.replaceAll(".", "_");
|
||||||
|
Reference in New Issue
Block a user