diff --git a/public/index.html b/public/index.html index 9c0f396cd..0e3bf0dfd 100644 --- a/public/index.html +++ b/public/index.html @@ -121,7 +121,7 @@
Click slider numbers to input manually.
-
MAD LAB MODE ON
+ @@ -4643,4 +4643,4 @@ - + \ No newline at end of file diff --git a/public/script.js b/public/script.js index c38d423aa..327ae6438 100644 --- a/public/script.js +++ b/public/script.js @@ -993,7 +993,7 @@ function getTagBlock(item) { const count = Object.values(tag_map).flat().filter(x => x == item.id).length; const template = $('#bogus_folder_template .bogus_folder_select').clone(); template.attr({ 'tagid': item.id, 'id': `BogusFolder${item.id}` }); - template.find('.avatar').css({'background-color': item.color, 'color': item.color2 }); + template.find('.avatar').css({ 'background-color': item.color, 'color': item.color2 }); template.find('.ch_name').text(item.name); template.find('.bogus_folder_counter').text(count); return template; @@ -9057,7 +9057,7 @@ jQuery(async function () { //yolo anything for Lab Mode if (power_user.enableLabMode) { - console.log($(masterElement).attr('id'), myValue) + //console.log($(masterElement).attr('id'), myValue) $(masterElement).val(myValue).trigger('input') return } diff --git a/public/scripts/power-user.js b/public/scripts/power-user.js index efc4c9e14..61266b61f 100644 --- a/public/scripts/power-user.js +++ b/public/scripts/power-user.js @@ -432,10 +432,12 @@ var originalSliderValues = [] async function switchLabMode() { - if (power_user.enableZenSliders) { - //force disable ZenSliders for Lab Mode - $("#enableZenSliders").trigger('click') - } + /* if (power_user.enableZenSliders && power_user.enableLabMode) { + toastr.warning("Can't start Lab Mode while Zen Sliders are active") + return + //$("#enableZenSliders").trigger('click') + } + */ await delay(100) const value = localStorage.getItem(storage_keys.enableLabMode); power_user.enableLabMode = value === null ? false : value == "true"; @@ -457,7 +459,7 @@ async function switchLabMode() { .attr('min', '-99999') .attr('max', '99999') .attr('step', '0.001') - $("#labModeWarning").show() + $("#labModeWarning").removeClass('hidden') //$("#advanced-ai-config-block input[type='range']").hide() } else { @@ -470,7 +472,7 @@ async function switchLabMode() { .trigger('input') }); $("#advanced-ai-config-block input[type='range']").show() - $("#labModeWarning").hide() + $("#labModeWarning").addClass('hidden') } } @@ -1550,7 +1552,7 @@ export function fuzzySearchWorldInfo(data, searchValue) { export function fuzzySearchTags(searchValue) { const fuse = new Fuse(tags, { keys: [ - { name: 'name', weight: 1}, + { name: 'name', weight: 1 }, ], includeScore: true, ignoreLocation: true, @@ -2680,28 +2682,31 @@ $(document).ready(() => { }); $("#enableZenSliders").on("input", function () { - if (power_user.enableLabMode) { + const value = !!$(this).prop('checked'); + if (power_user.enableLabMode === true && value === true) { //disallow zenSliders while Lab Mode is active - toastr.warning('ZenSliders not allowed in Mad Lab Mode') - $(this).prop('checked', false); + toastr.warning('Disable Mad Lab Mode before enabling Zen Sliders') + $(this).prop('checked', false).trigger('input'); return } - const value = !!$(this).prop('checked'); power_user.enableZenSliders = value; localStorage.setItem(storage_keys.enableZenSliders, Boolean(power_user.enableZenSliders)); + saveSettingsDebounced(); switchZenSliders(); }); $("#enableLabMode").on("input", function () { - if (power_user.enableZenSliders) { + const value = !!$(this).prop('checked'); + if (power_user.enableZenSliders === true && value === true) { //disallow Lab Mode if ZenSliders are active - toastr.warning('Mad Lab Mode not allowed while ZenSliders are active') - $(this).prop('checked', false); + toastr.warning('Disable Zen Sliders before enabling Mad Lab Mode') + $(this).prop('checked', false).trigger('input');; return } - const value = !!$(this).prop('checked'); + power_user.enableLabMode = value; localStorage.setItem(storage_keys.enableLabMode, Boolean(power_user.enableLabMode)); + saveSettingsDebounced(); switchLabMode(); }); @@ -2815,7 +2820,7 @@ $(document).ready(() => { switchSimpleMode(); }); - $('#bogus_folders').on('input', function() { + $('#bogus_folders').on('input', function () { const value = !!$(this).prop('checked'); power_user.bogus_folders = value; saveSettingsDebounced();