mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Added World Info Settings
This commit is contained in:
@@ -6321,7 +6321,6 @@ def UI_2_Set_Selected_Text(data):
|
|||||||
def UI_2_Set_Selected_Text(data):
|
def UI_2_Set_Selected_Text(data):
|
||||||
print("Using Option Text: {}".format(data))
|
print("Using Option Text: {}".format(data))
|
||||||
if koboldai_vars.prompt == "":
|
if koboldai_vars.prompt == "":
|
||||||
print(koboldai_vars.actions.get_current_options())
|
|
||||||
koboldai_vars.prompt = koboldai_vars.actions.get_current_options()[int(data['option'])]['text']
|
koboldai_vars.prompt = koboldai_vars.actions.get_current_options()[int(data['option'])]['text']
|
||||||
koboldai_vars.actions.clear_unused_options()
|
koboldai_vars.actions.clear_unused_options()
|
||||||
else:
|
else:
|
||||||
|
@@ -78,7 +78,7 @@ function reset_story() {
|
|||||||
while (option_area.firstChild) {
|
while (option_area.firstChild) {
|
||||||
option_area.removeChild(option_area.firstChild);
|
option_area.removeChild(option_area.firstChild);
|
||||||
}
|
}
|
||||||
var world_info_area = document.getElementById("story_menu_wi");
|
var world_info_area = document.getElementById("WI_Area");
|
||||||
while (world_info_area.firstChild) {
|
while (world_info_area.firstChild) {
|
||||||
world_info_area.removeChild(world_info_area.firstChild);
|
world_info_area.removeChild(world_info_area.firstChild);
|
||||||
}
|
}
|
||||||
@@ -1297,22 +1297,22 @@ function world_info_folder(data) {
|
|||||||
for (var j = i+1; j < folders.length; j++) {
|
for (var j = i+1; j < folders.length; j++) {
|
||||||
if (document.getElementById("world_info_folder_"+folders[j])) {
|
if (document.getElementById("world_info_folder_"+folders[j])) {
|
||||||
found = true;
|
found = true;
|
||||||
document.getElementById("story_menu_wi").insertBefore(folder, document.getElementById("world_info_folder_"+folders[j]));
|
document.getElementById("WI_Area").insertBefore(folder, document.getElementById("world_info_folder_"+folders[j]));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!(found)) {
|
if (!(found)) {
|
||||||
if (document.getElementById("new_world_info_button")) {
|
if (document.getElementById("new_world_info_button")) {
|
||||||
document.getElementById("story_menu_wi").insertBefore(folder, document.getElementById("new_world_info_button"));
|
document.getElementById("WI_Area").insertBefore(folder, document.getElementById("new_world_info_button"));
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("story_menu_wi").append(folder);
|
document.getElementById("WI_Area").append(folder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (document.getElementById("new_world_info_button")) {
|
if (document.getElementById("new_world_info_button")) {
|
||||||
document.getElementById("story_menu_wi").insertBefore(folder, document.getElementById("new_world_info_button"));
|
document.getElementById("WI_Area").insertBefore(folder, document.getElementById("new_world_info_button"));
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("story_menu_wi").append(folder);
|
document.getElementById("WI_Area").append(folder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1350,7 +1350,7 @@ function world_info_folder(data) {
|
|||||||
}
|
}
|
||||||
temp.append(add_icon);
|
temp.append(add_icon);
|
||||||
add_folder.append(temp);
|
add_folder.append(temp);
|
||||||
document.getElementById("story_menu_wi").append(add_folder);
|
document.getElementById("WI_Area").append(add_folder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -56,6 +56,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="story_menu_wi" class="story_category_area hidden">
|
<div id="story_menu_wi" class="story_category_area hidden">
|
||||||
<span id="world_info_folder_root" class="WI_Folder"><h2>root</h2></span>
|
<div class="setting_tile_area">
|
||||||
|
{% with menu='World Info' %}
|
||||||
|
{% with sub_path='' %}
|
||||||
|
{% include 'settings item.html' %}
|
||||||
|
{% endwith %}
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
<div id="WI_Area">
|
||||||
|
<span id="world_info_folder_root" class="WI_Folder"><h2>root</h2></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
Reference in New Issue
Block a user