mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Colab Cookie Saving Correction
This commit is contained in:
@@ -7694,12 +7694,9 @@ def UI_2_theme_list_refresh(data):
|
||||
#==================================================================#
|
||||
@socketio.on('save_cookies')
|
||||
def UI_2_save_cookies(data):
|
||||
print("Adding: {}".format(data))
|
||||
print("to: {}".format(koboldai_vars.cookies))
|
||||
for key in data:
|
||||
#Note this won't sync to the client automatically as we're modifying a variable rather than setting it
|
||||
koboldai_vars.cookies[key] = data[key]
|
||||
print("Updated: {}".format(koboldai_vars.cookies))
|
||||
with open("./settings/cookies.settings", "w") as f:
|
||||
f.write(json.dumps(koboldai_vars.cookies))
|
||||
|
||||
|
@@ -3389,16 +3389,24 @@ function open_finder() {
|
||||
function process_cookies() {
|
||||
if (getCookie("Settings_Pin") == "false") {
|
||||
settings_unpin();
|
||||
} else {
|
||||
} else if (getCookie("Settings_Pin") == "true") {
|
||||
settings_pin();
|
||||
}
|
||||
if (getCookie("Story_Pin") == "true") {
|
||||
story_pin();
|
||||
} else {
|
||||
} else if (getCookie("Story_Pin") == "false") {
|
||||
story_unpin();
|
||||
}
|
||||
preserve_game_space(!(getCookie("preserve_game_space") == "false"));
|
||||
options_on_right(!(getCookie("options_on_right") == "false"));
|
||||
if (getCookie("preserve_game_space") == "false") {
|
||||
preserve_game_space(false);
|
||||
} else if (getCookie("preserve_game_space") == "true") {
|
||||
preserve_game_space(true);
|
||||
}
|
||||
if (getCookie("options_on_right") == "false") {
|
||||
options_on_right(false);
|
||||
} else if (getCookie("options_on_right") == "true") {
|
||||
options_on_right(true);
|
||||
}
|
||||
|
||||
load_tweaks();
|
||||
}
|
||||
|
Reference in New Issue
Block a user