Refactor QR set popups to new popup

0f45ebda0376fc26173dae6f36784aced52fe132

Wolfsblvt <wolfsblvt@gmail.com>

1 files changed, +6 -6Ignore whitespace
public/scripts/extensions/quick-reply/src/ui/SettingsUi.js+6 -6
@@ -1,4 +1,4 @@
11import { callPopupPopup } from '../../../../../scriptpopup.js';
22import { getSortableDelay } from '../../../../utils.js';
33import { log, warn } from '../../index.js';
44import { QuickReply } from '../QuickReply.js';
@@ -280,7 +280,7 @@ export class SettingsUi {
280280 }
281281
282282 async deleteQrSet() {
283283 const confirmed = await callPopupPopup.show.confirm('Delete Quick Reply Set', `Are you sure you want to delete the Quick Reply Set "${this.currentQrSet.name}"?<br>This cannot be undone.`, 'confirm');
284284 if (confirmed) {
285285 await this.doDeleteQrSet(this.currentQrSet);
286286 this.rerender();
@@ -305,7 +305,7 @@ export class SettingsUi {
305305 }
306306
307307 async renameQrSet() {
308308 const newName = await callPopupPopup.show.input('Enter new name for theRename Quick Reply Set:', 'inputEnter a new name:', this.currentQrSet.name);
309309 if (newName && newName.length > 0) {
310310 const existingSet = QuickReplySet.get(newName);
311311 if (existingSet) {
@@ -343,11 +343,11 @@ export class SettingsUi {
343343 }
344344
345345 async addQrSet() {
346346 const name = await callPopupPopup.show.input('QuickCreate Replya Setnew Name:World Info', 'inputEnter a name for the new Quick Reply Set:');
347347 if (name && name.length > 0) {
348348 const oldQrs = QuickReplySet.get(name);
349349 if (oldQrs) {
350350 const replace = await callPopupPopup.show.confirm('Replace existing World Info', `A Quick Reply Set named "${name}" already exists.<br>Do you want to overwrite the existing Quick Reply Set?<br>The existing set will be deleted. This cannot be undone.`, 'confirm');
351351 if (replace) {
352352 const idx = QuickReplySet.list.indexOf(oldQrs);
353353 await this.doDeleteQrSet(oldQrs);
@@ -408,7 +408,7 @@ export class SettingsUi {
408408 qrs.init();
409409 const oldQrs = QuickReplySet.get(props.name);
410410 if (oldQrs) {
411411 const replace = await callPopupPopup.show.confirm('Replace existing World Info', `A Quick Reply Set named "${qrs.name}" already exists.<br>Do you want to overwrite the existing Quick Reply Set?<br>The existing set will be deleted. This cannot be undone.`, 'confirm');
412412 if (replace) {
413413 const idx = QuickReplySet.list.indexOf(oldQrs);
414414 await this.doDeleteQrSet(oldQrs);