A bit more polish

This commit is contained in:
somebody
2022-12-12 22:38:31 -06:00
parent 3b23d1f9c8
commit ff02a5444d
3 changed files with 23 additions and 1 deletions

View File

@@ -881,6 +881,23 @@ gensettingstf = [
"ui_level": 0 "ui_level": 0
}, },
{ {
"UI_V2_Only": True,
"uitype": "slider",
"unit": "int",
"label": "WI Gen Amount",
"id": "wigen_amount",
"min": 25,
"max": 125,
"step": 1,
"default": 80,
"tooltip": "How many tokens the World Info Generator creates.",
"menu_path": "World Info",
"sub_path": "",
"classname": "user",
"name": "wigen_amount",
"ui_level": 2
},
{
"UI_V2_Only": True, "UI_V2_Only": True,
"uitype": "toggle", "uitype": "toggle",
"unit": "bool", "unit": "bool",

View File

@@ -1153,6 +1153,7 @@ class user_settings(settings):
self.img_gen_cfg_scale = 7.0 self.img_gen_cfg_scale = 7.0
self.cluster_requested_models = [] # The models which we allow to generate during cluster mode self.cluster_requested_models = [] # The models which we allow to generate during cluster mode
self.wigen_use_own_wi = False self.wigen_use_own_wi = False
self.wigen_amount = 80
def __setattr__(self, name, value): def __setattr__(self, name, value):

View File

@@ -2265,9 +2265,11 @@ function world_info_entry(data) {
} }
// TODO: Make type input element // TODO: Make type input element
generateWIData(data.uid, "desc", title.innerText, type, null, 80); let genAmount = parseInt($el("#user_wigen_amount").value);
generateWIData(data.uid, "desc", title.innerText, type, null, genAmount);
this.innerText = "autorenew"; this.innerText = "autorenew";
this.classList.add("spinner"); this.classList.add("spinner");
manual_text.classList.add("disabled");
}); });
genTypeInput.addEventListener("focus", function() { genTypeInput.addEventListener("focus", function() {
@@ -6954,6 +6956,8 @@ function showGeneratedWIData(data) {
generating_summary = false; generating_summary = false;
console.warn(data) console.warn(data)
const card = $el(`.world_info_card[uid="${data.uid}"]`); const card = $el(`.world_info_card[uid="${data.uid}"]`);
const manualTextEl = card.querySelector(".world_info_entry_text");
manualTextEl.classList.remove("disabled");
// Stop spinning! // Stop spinning!
for (const littleRobotFriend of card.querySelectorAll(".generate-button.spinner")) { for (const littleRobotFriend of card.querySelectorAll(".generate-button.spinner")) {