Change handleOptionalSelect name

This commit is contained in:
Crow
2025-04-24 20:21:24 +01:00
parent 7b1baed0d7
commit 4d483e7814

View File

@@ -3358,7 +3358,7 @@ export async function getWorldEntry(name, data, entry) {
}); });
useGroupScoringSelect.val((entry.useGroupScoring === null || entry.useGroupScoring === undefined) ? 'null' : entry.useGroupScoring ? 'true' : 'false').trigger('input'); useGroupScoringSelect.val((entry.useGroupScoring === null || entry.useGroupScoring === undefined) ? 'null' : entry.useGroupScoring ? 'true' : 'false').trigger('input');
function handleOptionalSelect(fieldName) { function handleMatchCheckbox(fieldName) {
const key = originalWIDataKeyMap[fieldName]; const key = originalWIDataKeyMap[fieldName];
const checkBoxElem = template.find(`input[type="checkbox"][name="${fieldName}"]`); const checkBoxElem = template.find(`input[type="checkbox"][name="${fieldName}"]`);
checkBoxElem.data('uid', entry.uid); checkBoxElem.data('uid', entry.uid);
@@ -3373,12 +3373,12 @@ export async function getWorldEntry(name, data, entry) {
checkBoxElem.prop('checked', !!entry[fieldName]).trigger('input'); checkBoxElem.prop('checked', !!entry[fieldName]).trigger('input');
} }
handleOptionalSelect('matchPersonaDescription'); handleMatchCheckbox('matchPersonaDescription');
handleOptionalSelect('matchCharacterDescription'); handleMatchCheckbox('matchCharacterDescription');
handleOptionalSelect('matchCharacterPersonality'); handleMatchCheckbox('matchCharacterPersonality');
handleOptionalSelect('matchCharacterDepthPrompt'); handleMatchCheckbox('matchCharacterDepthPrompt');
handleOptionalSelect('matchScenario'); handleMatchCheckbox('matchScenario');
handleOptionalSelect('matchCreatorNotes'); handleMatchCheckbox('matchCreatorNotes');
// automation id // automation id
const automationIdInput = template.find('input[name="automationId"]'); const automationIdInput = template.find('input[name="automationId"]');