samplerSelect.js: update for new popup
| @@ -10,6 +10,7 @@ import { power_user } from './power-user.js'; | ||
| 10 | 10 | //import { getCfgPrompt } from './cfg-scale.js'; |
| 11 | 11 | import { setting_names } from './textgen-settings.js'; |
| 12 | 12 | import { renderTemplateAsync } from './templates.js'; |
| 13 | +import { Popup, POPUP_TYPE } from './popup.js'; | |
| 13 | 14 | |
| 14 | 15 | |
| 15 | 16 | const TGsamplerNames = setting_names; |
| @@ -21,8 +22,6 @@ let userDisabledSamplers, userShownSamplers; | ||
| 21 | 22 | |
| 22 | 23 | // Goal 1: show popup with all samplers for active API |
| 23 | 24 | async function showSamplerSelectPopup() { |
| 24 | - const popup = $('#dialogue_popup'); | |
| 25 | - popup.addClass('large_dialogue_popup'); | |
| 26 | 25 | const html = $(document.createElement('div')); |
| 27 | 26 | html.attr('id', 'sampler_view_list') |
| 28 | 27 | .addClass('flex-container flexFlowColumn'); |
| @@ -33,7 +32,7 @@ async function showSamplerSelectPopup() { | ||
| 33 | 32 | listContainer.append(APISamplers); |
| 34 | 33 | html.append(listContainer); |
| 35 | 34 | |
| 36 | 35 | callPopupconst showPromise = new Popup(html, 'text'POPUP_TYPE.TEXT, null, { wide: true, large: true, allowVerticalScrolling: true }).show(); |
| 37 | 36 | |
| 38 | 37 | setSamplerListListeners(); |
| 39 | 38 | |
| @@ -54,6 +53,8 @@ async function showSamplerSelectPopup() { | ||
| 54 | 53 | power_user.selectSamplers.forceHidden = []; |
| 55 | 54 | await validateDisabledSamplers(); |
| 56 | 55 | }); |
| 56 | + | |
| 57 | + await showPromise; | |
| 57 | 58 | } |
| 58 | 59 | |
| 59 | 60 | function setSamplerListListeners() { |