diff --git a/public/scripts/preset-manager.js b/public/scripts/preset-manager.js
index 90fe232ba..0176937b0 100644
--- a/public/scripts/preset-manager.js
+++ b/public/scripts/preset-manager.js
@@ -1,6 +1,5 @@
import {
amount_gen,
- callPopup,
characters,
eventSource,
event_types,
@@ -19,6 +18,7 @@ import {
import { groups, selected_group } from './group-chats.js';
import { instruct_presets } from './instruct-mode.js';
import { kai_settings } from './kai-settings.js';
+import { Popup } from './popup.js';
import { context_presets, getContextSettings, power_user } from './power-user.js';
import { SlashCommand } from './slash-commands/SlashCommand.js';
import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js';
@@ -165,11 +165,8 @@ class PresetManager {
async savePresetAs() {
const inputValue = this.getSelectedPresetName();
- const popupText = `
-
Preset name:
- ${!this.isNonGenericApi() ? 'Hint: Use a character/group name to bind preset to a specific chat.
' : ''}`;
- const name = await callPopup(popupText, 'input', inputValue);
-
+ const popupText = !this.isNonGenericApi() ? 'Hint: Use a character/group name to bind preset to a specific chat.
' : '';
+ const name = Popup.show.input('Preset name:', popupText, inputValue);
if (!name) {
console.log('Preset name not provided');
return;
@@ -597,8 +594,7 @@ export async function initPresetManager() {
return;
}
- const confirm = await callPopup('Delete the preset? This action is irreversible and your current settings will be overwritten.', 'confirm');
-
+ const confirm = await Popup.show.input('Delete the preset?', 'This action is irreversible and your current settings will be overwritten.');
if (!confirm) {
return;
}
@@ -641,8 +637,7 @@ export async function initPresetManager() {
return;
}
- const confirm = await callPopup('Are you sure?
Resetting a default preset will restore the default settings.', 'confirm');
-
+ const confirm = await Popup.show.confirm('Are you sure?', 'Resetting a default preset will restore the default settings.');
if (!confirm) {
return;
}
@@ -653,8 +648,7 @@ export async function initPresetManager() {
presetManager.selectPreset(option);
toastr.success('Default preset restored');
} else {
- const confirm = await callPopup('Are you sure?
Resetting a custom preset will restore to the last saved state.', 'confirm');
-
+ const confirm = await Popup.show.confirm('Are you sure?', 'Resetting a custom preset will restore to the last saved state.');
if (!confirm) {
return;
}