samplerSelect.js: update for new popup

8c7dbedaa14eaa41550fc3ba9ccd2d4aa8875d0a

Cohee <18619528+Cohee1207@users.noreply.github.com>

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