diff --git a/public/scripts/samplerSelect.js b/public/scripts/samplerSelect.js index 687bbe0a3..49d18dc7f 100644 --- a/public/scripts/samplerSelect.js +++ b/public/scripts/samplerSelect.js @@ -10,6 +10,7 @@ import { power_user } from './power-user.js'; //import { getCfgPrompt } from './cfg-scale.js'; import { setting_names } from './textgen-settings.js'; import { renderTemplateAsync } from './templates.js'; +import { Popup, POPUP_TYPE } from './popup.js'; const TGsamplerNames = setting_names; @@ -21,8 +22,6 @@ let userDisabledSamplers, userShownSamplers; // Goal 1: show popup with all samplers for active API async function showSamplerSelectPopup() { - const popup = $('#dialogue_popup'); - popup.addClass('large_dialogue_popup'); const html = $(document.createElement('div')); html.attr('id', 'sampler_view_list') .addClass('flex-container flexFlowColumn'); @@ -33,7 +32,7 @@ async function showSamplerSelectPopup() { listContainer.append(APISamplers); html.append(listContainer); - callPopup(html, 'text', null, { allowVerticalScrolling: true }); + const showPromise = new Popup(html, POPUP_TYPE.TEXT, null, { wide: true, large: true, allowVerticalScrolling: true }).show(); setSamplerListListeners(); @@ -54,6 +53,8 @@ async function showSamplerSelectPopup() { power_user.selectSamplers.forceHidden = []; await validateDisabledSamplers(); }); + + await showPromise; } function setSamplerListListeners() {